Wednesday, December 30, 2015

Exception While running Application module (oracle.jbo.ConfigException) JBO-33001: Configuration file /tester.xcfg

Dear ALl,


if you are running the Application module and found that exception 

While Running AppModule of Model project I am getting in following error in swing window

(oracle.jbo.ConfigException) JBO-33001: Configuration file /tester.xcfg is not found in the classpath.

and following are the stacktrace 

Aug 25, 2011 8:24:51 PM oracle.adf.share.ADFContext getCurrent
WARNING: Automatically initializing a DefaultContext for getCurrent.
Caller should ensure that a DefaultContext is proper for this use.
Memory leaks and/or unexpected behaviour may occur if the automatic initialization is performed improperly.
This message may be avoided by performing initADFContext before using getCurrent().
To see the stack trace for thread that is initializing this, set the logging level of oracle.adf.share.ADFContext to FINEST
Aug 25, 2011 8:24:54 PM oracle.adf.share.config.ADFMDSConfig createMDSInstanceFromelement
SEVERE: MDSConfigurationException encountered in parseADFConfigurationMDS-01330: unable to load MDS configuration document 
MDS-01329: unable to load element "persistence-config"
MDS-01370: MetadataStore configuration for metadata-store-usage "mstore-usage_1" is invalid. 
MDS-01368: Variable "oracle.home" used in configuration document is not defined either as system property or as envrionment variable.

oracle.mds.config.MDSConfigurationException: MDS-01330: unable to load MDS configuration document 
MDS-01329: unable to load element "persistence-config"
MDS-01370: MetadataStore configuration for metadata-store-usage "mstore-usage_1" is invalid. 
MDS-01368: Variable "oracle.home" used in configuration document is not defined either as system property or as envrionment variable.

     at oracle.mds.config.PConfig.loadFromBean(PConfig.java:690)
     at oracle.mds.config.PConfig.<init>(PConfig.java:499)
     at oracle.mds.config.MDSConfig.loadFromBean(MDSConfig.java:707)
     at oracle.mds.config.MDSConfig.loadFromElement(MDSConfig.java:764)
     at oracle.mds.config.MDSConfig.<init>(MDSConfig.java:420)
     at oracle.mds.core.MDSInstance.getMDSConfigFromDocument(MDSInstance.java:2055)
     at oracle.mds.core.MDSInstance.createMDSInstanceWithCustomizedConfig(MDSInstance.java:1197)
     at oracle.mds.core.MDSInstance.getOrCreateInstance(MDSInstance.java:580)
     at oracle.adf.share.config.ADFMDSConfig.createMDSInstanceFromelement(ADFMDSConfig.java:243)
     at oracle.adf.share.config.MDSConfigFactory.createApplication(MDSConfigFactory.java:123)
     at oracle.adf.share.config.ADFConfigFactory.findOrCreateADFConfig(ADFConfigFactory.java:143)
     at oracle.adf.share.config.ADFConfigFactory.findOrCreateADFConfig(ADFConfigFactory.java:79)
     at oracle.adf.share.config.ADFConfigFactory.findOrCreateADFConfig(ADFConfigFactory.java:57)
     at oracle.adf.share.ADFContext.getADFConfigEx(ADFContext.java:865)
     at oracle.adf.share.ADFContext.getADFConfig(ADFContext.java:712)
     at oracle.adf.share.config.ADFContextMDSConfigHelperImpl.createMDSSession(ADFContextMDSConfigHelperImpl.java:50)
     at oracle.adf.share.ADFContext.getMDSSessionAsObject(ADFContext.java:1541)
     at oracle.adf.share.jndi.MDSBackingStore.getMDSSession(MDSBackingStore.java:359)
     at oracle.adf.share.jndi.MDSBackingStore.isReadOnlyMDSStore(MDSBackingStore.java:181)
     at oracle.adf.share.jndi.MDSBackingStore.<init>(MDSBackingStore.java:141)
     at oracle.jbo.client.Configuration.loadFromClassPath(Configuration.java:442)
     at oracle.jbo.jbotester.MainFrame.loadConfiguration(MainFrame.java:622)
     at oracle.jbo.jbotester.MainFrame.processArgs(MainFrame.java:597)
     at oracle.jbo.jbotester.MainFrame.main(MainFrame.java:428)
Caused by: oracle.mds.exception.MDSExceptionList: MDS-01329: unable to load element "persistence-config"
MDS-01370: MetadataStore configuration for metadata-store-usage "mstore-usage_1" is invalid. 
MDS-01368: Variable "oracle.home" used in configuration document is not defined either as system property or as envrionment variable.

     at oracle.mds.config.PConfig.loadFromBean(PConfig.java:684)
     ... 23 more


then try to do that 
Solution :
1-open Application Resources Tab in jdeveloper
2-open ADF META_INF
3- you will find adf-config.xml
4-  search for <mds:mds-config>  Tag
5- try to Comment what inside the Tag /*  */ then try to run application module 
note : (if these lines will affect in your application then comment the line only in case of you want to test application module)
<mds:persistence-config>
        <mds:metadata-namespaces>
          <mds:namespace metadata-store-usage="WebCenterFileMetadataStore"
                         path="/oracle/adf/share/prefs"/>
          <mds:namespace metadata-store-usage="WebCenterFileMetadataStore"
                         path="/oracle/webcenter/lifecycle/importexport"/>
          <mds:namespace metadata-store-usage="WebCenterFileMetadataStore"
                         path="/oracle/webcenter/lock"/>
          <mds:namespace metadata-store-usage="WebCenterFileMetadataStore"
                         path="/oracle/webcenter/rc"/>
          <mds:namespace metadata-store-usage="WebCenterFileMetadataStore"
                         path="/persdef/"/>
          <mds:namespace metadata-store-usage="WebCenterFileMetadataStore"
                         path="/shared/oracle/wcps"/>
          <mds:namespace metadata-store-usage="WebCenterFileMetadataStore"
                         path="/oracle/webcenter/search/scopedMD"/>
          <mds:namespace metadata-store-usage="WebCenterFileMetadataStore"
                         path="/oracle/webcenter/doclib/scopedMD"/>
          <mds:namespace metadata-store-usage="WebCenterFileMetadataStore"
                         path="/oracle/webcenter/lifecycle"/>
        </mds:metadata-namespaces>
        <mds:metadata-store-usages>
          <mds:metadata-store-usage default-cust-store="true"
                                    deploy-target="true"
                                    id="WebCenterFileMetadataStore">
            <mds:metadata-store class-name="oracle.mds.dt.persistence.stores.file.SrcControlFileMetadataStore">
              <mds:property value="mds-SpacesDS" name="repository-name"/>
              <mds:property value="nbp" name="partition-name"/>
              <mds:property value="jdbc/mds/SpacesDS" name="jndi-datasource"/>
            </mds:metadata-store>
          </mds:metadata-store-usage>
        </mds:metadata-store-usages>
      </mds:persistence-config>

or
 <persistence-config>        <metadata-namespaces>          <namespace path="/soa/shared" metadata-store-usage="mstore-usage_1"/>        </metadata-namespaces>        <metadata-store-usages>          <metadata-store-usage id="mstore-usage_1">            <metadata-store class-name="oracle.mds.persistence.stores.file.FileMetadataStore">              <property name="metadata-path"                        value="${oracle.home}/integration"/>              <property name="partition-name" value="seed"/>            </metadata-store>          </metadata-store-usage>        </metadata-store-usages>      </persistence-config>


with my best regards 




Sunday, October 18, 2015

Monitoring Jdeveloper Memory and enhancing it for Better Performance

If You are using Jdeveloper and you are facing memory consumption and want to monitor the memory and force the garbage Collector to clean up the memory ,
 you can follow the coming steps 

1- Go to Oracle Home where you setup your Jdeveloper (ex: c:/Oracle)
2- Go to (jdev/bin) you will find file named "jdev.conf"
3- open the file for edit and add this line 

AddVMOption -DMainWindow.MemoryMonitorOn=true

4- restart jdeveloper (close & open ) after restart you will see in lower right corner  the memory consumed and button for enforcing garbage collector to clean the memory 


    
  5- to maximize the memory then under the oracle home (ex: c:/oracle) you will find 
  (ide/bin ) folders and you will find file named ide.conf open the file to edit 
 

6- modify the two values as you see in the screen (if you are using JDK32bit) as following 
AddVMOption  -Xmx1024M
AddVMOption  -Xms1024M

 do not increase the memory over then 1024M rather than jdeveloper will not open ,
if you are using JDK64bit you  Can modify it to

AddVMOption  -Xmx2048M
AddVMOption  -Xms1024M

7- Restart jdeveloper you will see the memory changed in the Lower right Corner 

Wednesday, January 28, 2015

implement selectBooleanCheckbox on column that contain [Y, N] or [0,1]

if you have a column in table that contain values like Y,N  or 0,1
and want to display it to user in selectBooleanCheckBox

then you can do it in a simple way like what i will explain

first of all we will do that by using converter Class ,
it will play the role to Convert Y --> true and N-->false and vice versa

create Converter Class like the following

package youPackage.converters;
 
import java.util.Collection;
import java.util.Collections;
 
import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
import javax.faces.convert.Converter;
 
import org.apache.myfaces.trinidad.convert.ClientConverter;
 
public class YNConverter
  implements Converter, ClientConverter
{
  public Object getAsObject(FacesContext facesContext, UIComponent uiComponent, String value)
  {
    return "true".equals(value) ? "Y" : "N";
  }
 
  public String getAsString(FacesContext facesContext, UIComponent uiComponent, Object value)
  {
    return "Y".equals(value) ? "true" : "false";
  }
 
  public String getClientLibrarySource(FacesContext facesContext)
  {
    return null;
  }
 
  public Collection<String> getClientImportNames()
  {
    return Collections.emptySet();
  }
 
  public String getClientScript(FacesContext facesContext, UIComponent uiComponent)
  {
    return null;
  }
 
  public String getClientConversion(FacesContext facesContext, UIComponent uiComponent)
  {
    return null;
  }
}

the second step is to add this Converter in faces-config.xml:

<converter>
  <converter-id>YNConverter</converter-id>
  <converter-class>youPackage.converters.YNConverter</converter-class>
</converter>

the Final step  is to use   this converter in the Component 

<af:selectBooleanCheckbox value="#{row.bindings.Disabled.inputValue}"
                          label="#{bindings.VipUserVO.hints.Disabled.label}"
                          converter="YNConverter"
                          id="sbc1"/>