Thursday, December 6, 2012

ORABPEL-05250 Error

I faced ORABPEL-05250 error during my composite deployment with below message.


[08:54:32 AM] Error deploying archive sca_QueryCommitmentDetailsBRMCommsProvABCSImpl_rev1.0.jar to partition "default" on server soa_server1 [http://myserver:8001]
[08:54:32 AM] HTTP error code returned [500]
[08:54:32 AM] Error message from server:
There was an error deploying the composite on soa_server1: Deployment Failed: Error occurred during deployment of component: QueryCommitmentDetailsBRMCommsProvABCSImpl to service engine: implementation.bpel, for composite: QueryCommitmentDetailsBRMCommsProvABCSImpl: ORABPEL-05250


BPEL Document provides below explanation for error code ORABPEL-05250, but this information is generic and insufficient for analysis.

ORABPEL-05250
severity: 10
type: error
name: Error deploying BPEL suitcase
description: An error occurred while attempting to deploy the BPEL
suitcase file \"{0}\"; the exception reported is: {1}
To rectify this problem, you need to increase the log level and need to analyze the problem from the log file step by step.

Increase loglevel to debug mode.
  • Oracle 10g: default.collaxa.cube.engine.deployment set it to ‘debug’
  • Oracle 11g: oracle.soa.bpel.engine.deployment set it to ‘TRACE:32 (FINEST)’
I used 11g, so referred soa_server1.log and soa_server1.out to debug, after receiving deployment error. I found detailed error message in soa_server1.out as below.



This error got escaped during compilation in Jdeveloper and it was strange partnerLinkType and role in wsdl is proper and it is same as what is provided in .bpel file partnerlink element.
I changed the partnerRole and partnerLinkType name both in .bpel and wsdl file and redeployed the composite. Now no error, problem got resolved.

ORABPEL-05250 error can occur for number of reasons like ‘disk memory full’, ‘XSD / WSDL imports are unavailable or unreachable’ etc., proper analysis of log file will help out in resolving this problem.

Thursday, November 22, 2012

AIA/SOA 11g Project: Get rid of oramds error from Jdeveloper

I had a problem while opening the AIA 11g project using JDeveloper, when I opened the composite.xml I got error ‘Failed to find WSDL definition and/or locate WSDL file’. I clicked on details button to get more information and found below error.


- WSDLException: faultCode=PARSER_ERROR: Failed to read wsdl file at: "oramds:/apps/AIAMetaData/AIAComponents/BusinessProcessServiceLibrary/EBF/CommsProcessFulfillmentOrderBillingAccountListEBF.wsdl", caused by: java.io.IOException. : java.io.IOException: oracle.mds.exception.MDSException: MDS-00054: The file to be loaded oramds:/apps/AIAMetaData/AIAComponents/BusinessProcessServiceLibrary/EBF/CommsProcessFulfillmentOrderBillingAccountListEBF.wsdl does not exist.



To get rid of these problems follow below steps.

1) Create new SOA application in JDeveloper, It will create below Application Resources.



2) Double click on adf-config.xml and click on Source tab.

3) Add below highlighted tag inside <metadata-namespaces>

<metadata-namespaces>
     <namespace path="/soa/shared" metadata-store-usage="mstore-usage_1"/>
     <namespace path="/apps" metadata-store-usage="dev_mds"/>
</metadata-namespaces>

4) Add below highlighted tags inside <metadata-store-usages>, with your system values and save it.

<metadata-store-usages>
     <metadata-store-usage id="dev_mds">
          <metadata-store class-name="oracle.mds.persistence.stores.db.DBMetadataStore">
          <property name="jdbc-userid" value="DEV_MDS"/>
          <property name="jdbc-password" value="devmds_password"/>
          <property name="jdbc-url" value="jdbc:oracle:thin:@hostname:port:sid"/>
          <property name="partition-name" value="soa-infra"/>
          </metadata-store>
     </metadata-store-usage>
..
</metadata-store-usage>

5) Open any .jpr AIA projects and open the composite.xml file. Now Jdeveloper will refer given MDS repository for all oramds reference and it will open without any error.


If you still facing the problem check your MDS configuration, by creating SOA-MDS connection as mentioned in Task 3 and Task 4 of below Oracle link.

http://docs.oracle.com/cd/E23549_01/doc.1111/e17364/bldgintflows.htm

Tuesday, June 19, 2012

JDBC OCI Data Source Connection For OAS 10.1.3.x/Oracle SOA 10.1.3.x

I came across an article to use Oracle OCI driver to increase Oracle SOA performance and its mentioned it will boost the performance by 35%.

Here I'm depicting The documents which I followed to create OCI connection, The errors I encountered and how resolved it. Hope this will help the people facing similar problem.

Created OCI connection pool as per oracle support note [How to Create a JDBC OCI Data Source Connection For OAS 10.1.3.x [ID 728235.1]]

Used OAS server version 10.1.3.5 running on HP Unix.

After configuring as per [ID 728235.1], Started testing by following below links in OAS.

OC4J->Administration->Services->JDBC Resources-> Select Connection Pool[OCI] -> Test Connection -> Test

But during the test it thrown below error and there is no clue where went wrong.

Error invoking method: testConnection on MBean: oc4j:j2eeType=JDBCResource,name="OCIConnectionPool",J2EEApplication=default,J2EEServer=standalone
oracle.oc4j.admin.jmx.shared.exceptions.JMXRuntimeException: Error invoking method: testConnection on MBean: oc4j:j2eeType=JDBCResource,name="OCIConnectionPool",J2EEApplication=default,J2EEServer=standalone at
oracle.oc4j.admin.jmx.distributed.SimpleInstanceMBeanServerDelegate.invoke(SimpleInstanceMBeanServerDelegate.java:970)

Aternate way to test the connection

OC4J->Administration->JMX->System MBean Browser->J2EE Aplication->default->JDBC Driver->OCI Connection Factory->Operations->testConnection[1 parameter]

In the value field give 'select * from dual' and click on 'Invoke Operation' buttion.

It gives the actual error as below.

Error:
Failed to execute operation. no ocijdbc10 in java.library.path
Caused by: java.lang.UnsatisfiedLinkError: no ocijdbc10 in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1707)
at java.lang.Runtime.loadLibrary0(Runtime.java:822)

Error due to missing library file

Solution: Create a directory '$ORACLE_HOME/jdbc/lib/oci' and copy below set of jar files from Oracle database server[In my case oracle DB is of 10.2.0.4 version] or Point to Database client library files.

libclntsh.so.10.1
libnnz10.so
libocijdbc10.a
libocijdbc10.so

Add below environment value in opmn.xml file.
<environment>
<variable id="TNS_ADMIN" value="$ORACLE_HOME/network/admin"/>
<variable id="SHLIB_PATH" value="$ORACLE_HOME/jdbc/lib/oci"/>
</environment>

Note: Environment variable name for loading library differs on OS type for HP Unix it's SHLIB_PATH and for LINUX it's 'LD_LIBRARY_PATH'

After making this change restarted and tested again using JMX. Failed with below error.

Error:
Failed to execute operation. t2cGetCharSet
Caused by: java.lang.UnsatisfiedLinkError: t2cGetCharSet
at oracle.jdbc.driver.T2CConnection.t2cGetCharSet(Native Method)
at oracle.jdbc.driver.T2CConnection.getCharSetIds(T2CConnection.java:2957)

Solution: Copied ojdbc14dms.jar from Oracle DB server and replaced existing $ORACLE_HOME/jdbc/lib/ojdbc14dms.jar

After making this change restarted and tested again using JMX. Operation executed successfully, but received below error return value.

Error:
Exception occurred testing connection. Exception: java.sql.SQLException: ORA-12705: invalid or unknown NLS parameter value specified


Solution: Add environment variable 'NLS_LANG' as below and retart the server.
<environment>
<variable id="TNS_ADMIN" value="/home3/soaaia/product/10.1.3.1/OracleAS_1/network/admin"/>
<variable id="SHLIB_PATH" value="/home3/soaaia/product/10.1.3.1/OracleAS_1/jdbc/lib/oci"/>
<variable id="NLS_LANG" value=""/>
</environment>

During testing using JMX, got another new error.

Error:
Failed to execute operation. oracle.i18n.text.OraBoot.getCharSetIsFixed()Ljava/util/List;

Caused by: java.lang.NoSuchMethodError: oracle.i18n.text.OraBoot.getCharSetIsFixed()Ljava/util/List;
at oracle.sql.converter.Orai18nCharacterSetMetaData.isFixedWidth(Orai18nCharacterSetMetaData.java:47)
at oracle.sql.converter.CharacterSetMetaData.getRatio(CharacterSetMetaData.java:1244)

Solution: Copy orai18n.jar from Oracle DB server and replaced existing $ORACLE_HOME/jdbc/lib/orai18n.jar, restart the server to take effect.

Friday, May 4, 2012

Oracle 11g: Fusion Order Demo

I’m listing out all the problems which I faced during Oracle 11G Fusion Order Demo setup. This may help others who facing similar problem.


Key points I learned was, the correct version selection of Fusion Order Demo application. My JDeveloper version was 11.1.1.6, So I selected FusionOrderDemo_R1PS5.zip(http://www.oracle.com/technetwork/developer-tools/jdev/learnmore/fod1111-407812.html). Wrong selection of demo application leads to lot of trouble.

Problem:

BUILD FAILED

D:\Zia\SOA11g\11.1.1.6\FusionOrderDemo_R1\Infrastructure\Ant\build.xml:52: The following error occurred while executing this line:

D:\Zia\SOA11g\11.1.1.6\FusionOrderDemo_R1\Infrastructure\DBSchema\build.xml:334: C:\oracle\Middleware\jdeveloper\modules\oracle.javacache_11.1.1 not found.

Solution:

DatabaseSchema build.xml pointing to wrong module location

Search and replace '${jdeveloper.home}/modules' with '${jdeveloper.home}/../oracle_common/modules'

------------------------------------------------------------------------------------------------------------
Problem:

[java] oracle.jbo.JboException: JBO-29000: Unexpected exception caught: java.lang.NoClassDefFoundError, msg=oracle/jdbc/OracleClob
at org.apache.tools.ant.taskdefs.ExecuteJava.execute(ExecuteJava.java:194)
at org.apache.tools.ant.taskdefs.Java.run(Java.java:764)
at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:218)
at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:132)
at org.apache.tools.ant.taskdefs.Java.execute(Java.java:105)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)

Solution:
Move to directory $DEMO_HOME\Infrastructure\DBSchema
Edit build.xml and add below elements after ' '

<fileset dir="${jdeveloper.home}/../oracle_common/modules/oracle.jdbc_11.1.1">
<include name="ojdbc6dms.jar"/>
</fileset>

------------------------------------------------------------------------------------------------------------
Problem:

Error(9,6): The code of method _jspService(HttpServletRequest, HttpServletResponse) is exceeding the 65535 bytes limit

Solution:

Might be temporary memory issue repeat the step-> 6.Right click StoreFrontUI and choose Run. The home.jspx page within the StoreFrontUI project is the default run target and will launch the main application screen or follow below link

http://www.velocityreviews.com/forums/t146001-reached-the-65535-bytes-limit.html
------------------------------------------------------------------------------------------------------------
Problem:

<BEA-149265> <Failure occurred in the execution of deployment request with ID '1321910416823' for task '14'. Error is: 'weblogic.application.ModuleException: Failed to load webapp: 'StoreFrontModule''

weblogic.application.ModuleException: Failed to load webapp: 'StoreFrontModule'

Solution:

Error occured due to wrong version selection of the tutorial. Follow below link to get the correct version.

http://www.oracle.com/technetwork/developer-tools/jdev/learnmore/fod1111-407812.html

------------------------------------------------------------------------------------------------------------
Problem:

BUILD FAILED

D:\Zia\SOA11g\11.1.1.6\FusionOrderDemo_R1\CompositeServices\bin\build.xml:495: The following error occurred while executing this line:

D:\Zia\SOA11g\11.1.1.6\FusionOrderDemo_R1\CompositeServices\bin\build.xml:199: The following error occurred while executing this line:

D:\Zia\SOA11g\11.1.1.6\FusionOrderDemo_R1\CompositeServices\OrderApprovalHumanTask\bin\build.xml:89: C:\oracle\Middleware\jdeveloper\modules\oracle.javatools_11.1.1 not found.

Solution:

Error occured due to wrong version selection of the tutorial. Follow below link to get the correct version.

http://www.oracle.com/technetwork/developer-tools/jdev/learnmore/fod1111-407812.html

------------------------------------------------------------------------------------------------------------
Problem:

Error while trying to access http://hostname:port/StoreFrontModule/faces/home.jspx. FODDS is not found pop up message displayed continously and at the end shows NullPointerException message.

FOD user account also get locked.

Solution:

1) Release the lock from the database using below scripts as sys or system user.
i) select s.sid, s.serial#, s.status, p.spid from v$session s, v$process p where s.username = 'FOD' and p.addr (+) = s.paddr;
ii) alter system kill session '197,27241';


2) Global JNDI Name configuration
i) create a global JDBC Data Source for the FOD user created earlier via the infrastructure project. Go to the Weblogic Server Console and select Services - Data Sources - New - GenericDataSource. Define a FODDS similar as follows. It is important to use a JNDI name that will also be defined in the StoreFrontModule accordingly:

Use JNDI Name as 'jdbc/FODDS', Give proper hostname and credentials(FOD/fusion)

ii) In StoreFrontService - Application Sources - oracle.foddemo.storefront - store - service - StoreServiceAM (RightClick) - Configurations, define the correct JNDI name for JDBCDataSource in all available Names like StoreServiceAM, StoreServiceAMLocalWeb and StoreFrontService

Thursday, April 12, 2012

How to remove the block in Oracle ESB Resequencer?

A Resequencer is used to rearrange a stream of related but out-of-sequence messages back into order. The messages are rearranged on an identifier that is a part of the message. The Resequencer should be aware of the identifier sequence for rearranging the messages. While rearranging the messages, the Resequencer typically uses the identifier sequence to decide the position of a message.

In resequencer the message that generates an error is moved to the error hospital. The group is moved to an error state and is not picked up by the dequeue system of any ESB instance. The user can resubmit the error-generating message using the error hospital. On resubmission of the message, the group is moved to a normal state, so that it can be picked up by the dequeue system of any ESB instance.

Example:

'ProcessSalesOrderFulfillmentSiebelCommsSequencer' resequencer is grouped with AccountId, If an order for customer X fails, then the resequencer will not allow new orders for same customer X to process. You will not see errors any errors.

To enable the block to process further orders from the customer X, you need to execute below scripts in ORAESB schema.

Note: You need to executed the script, only if the errored problem is fixed.

1) select GUID from wf_events where Name = '<Resequencer ESB Service Name>';

2) update esb_group_status set error=0, lockConId='NONE' where error!=0 and group_id='<GROUP_ID>' and service_guid='<GUID>';

3) commit;

Example:

-- Get service_guid(B4B82FA18B3911DEBFD0D7F6B776077D)
select guid from wf_events where name = 'ProcessSalesOrderFulfillmentSiebelCommsSequencer'

-- Account Id(1-70KX)
update esb_group_status set error=0, lockConId='NONE' where error!=0 and group_id='1-70KX' and service_guid='B4B82FA18B3911DEBFD0D7F6B776077D';
commit;

Tuesday, March 27, 2012

Oracle SOA/BPEL/ESB Timeout Configuration

Transaction timeout configuration settings are need to be carried out in below set of configuration points.


1. Global Transaction Timeout: Set the global transaction time out value in transaction-timeout attribute of transaction-manager.xml.

  a) Edit transaction-manager.xml from $ORACLE_HOME\j2ee\oc4j_soa\config\transaction-manager.xml
  b) Find the transaction-timeout parameter and change its value to 7200(Seconds).
  c) Save and close the file.

2. EJB Timeout: transaction-timeout attribute controls the transaction timeout interval (in seconds), If the transaction has not completed in this timeframe, the transaction is rolled back.

  a) Edit orion-ejb-jar.xml from $ORACLE_HOME\j2ee\oc4j_soa \application-deployments\orabpel\ejb_ob_engine\orion-ejb-jar.xml
  b) Find all occurrences of the transaction-timeout parameter and change its value to 3600 (Seconds).
  c) Save and close the file.

3. SyncMaxWaitTime is a domain level property and its setting is applicable for synchronous durable bpel processes

  a) Log in to the BPEL Console.
  b) Click the Configuration tab.
  c) Change the value of syncMaxWaitTime to 240 (seconds) and click on Apply

4. ESB Timeout: Edit esb_config.ini file from $ORACLE_HOME/integration/esb/config/esb_config.ini

  a) Change the value of xa_timeout parameter to 900 (Seconds).

5. Restart the server to make effect of all the changes.

Monday, March 26, 2012

Oracle BRM JCA Adapter logging on Oracle Application Server

The JCA Resource Adapter supports Java Unified Logging (JUL), which allows the adapter to use the Oracle Application Server logging library.


Follow below instruction to enable BRM JCA Adapter logging:

1. Create directory: $Oracle_home/j2ee/Instance/application-deployments/default/BRMAdapter/logs.

2. Edit $Oracle_home/j2ee/Instance/config/j2ee-logging.xml file in an XML editor.

3. Add following lines under the <log_handlers> element:

  <log_handlers>
  <log_handler name="brm-handler" class="oracle.core.ojdl.logging.ODLHandlerFactory">
  <property name="path" value="Oracle_home/j2ee/oc4j_soa/application-deployments/default/BRMAdapter/logs/BRMAdapterLog.log"/>
  <property name="maxFileSize" value="10485760"/>
  <property name="maxLogSize" value="104857600"/>
  <property name="encoding" value="UTF-8"/>
  <property name="format" value="ODL-TEXT"/>
  </log_handler>
  </log_handlers>

  where,
  o Path specifies the directory in which the adapter creates the log file.
  o maxFileSize specifies the maximum size, in bytes, of the log file. When a log file reaches this limit, a new log  file is generated.
  o maxLogSize specifies the maximum size, in bytes, of the logging directory.
  o encoding must be set to UTF-8.
  o format must be set to ODL-TEXT. This enables you to view the log files directly in the Oracle Application Server control console.

4. Add the following lines under the <loggers> element:

  <loggers>
  <logger name="oracle.tip.adapter.brm" level="LogLevel" useParentHandlers="false">
  <handler name="oc4j-handler"/>
  <handler name="brm-handler"/>
  </logger>

  where LogLevel is set to one of the following:

  o SEVERE to log problems that require attention from the system administrator.
  o WARNING to log actions that should be reviewed and may require action before an error occurs.
  o INFO to log normal actions or events. This includes user operations, such as user log ins, and automatic operations, such as log file rotations.
  o CONFIG to log configuration-related messages.
  o FINE to log trace or debug messages for performance monitoring.
  o FINER to log highly detailed trace or debug message.
  o FINEST to log the most detailed trace or debug messages.

5. Save and close the file.

6. Restart the application server or the J2EE instance.

Thursday, March 22, 2012

Oracle BPEL configuration settings to handle large payload/document

Processing of big payload in BPEL process may result in following problem.


1) OutOfMemoryError - Increase the java heap size

Refer my previous posts on how to increase the heap.

2) Process hangs with out result - This occurs due to huge number of activities generated during bpel instance processing.

Process hangs due to maximum number of in-memory activities. You may get "Instance not found in datasource" or "Maximum request depth exceeded" errors. Process will also throw 'TimeOut' error for synchronous processes after reaching the tansaction-timeout duration.

To solve this problem, we need to add 'dspMaxRequestDepth' property in $ORACLE_HOME/bpel/domains/default/config/domain.xml file.

This property sets the maximum number of in-memory activities to process within the same request. After processing an activity request, Oracle BPEL Process Manager attempts to process as many subsequent activities as possible without jeopardizing the transactionality of the request. Once the activity processing chain has reached this depth, the instance is dehydrated and the next activity is performed in a separate transaction. The default value is 600 activities.

Please add below set of property elements in domain.xml and restart the server to take effect of the changes. Here in below property, I have set the maximum in-memory activities as 4000.

<property id="dspMaxRequestDepth">
<name>Maximum number of in memory activities</name>
<value>4000</value>
<comment><![CDATA[
This property sets the maximum number of in-memory activities to process within the same request. After processing an activity request, Oracle BPEL Process Manager attempts to process as many subsequent activities as possible without jeopardizing the transactionality of the request. Once the activity processing chain has reached this depth, the instance is dehydrated and the next activity is performed in a separate transaction.
<p/>
If the request depth is too large, the total request time can exceed the application server transaction timeout limit.
<p/>
The default value is 600 activities.
]]></comment>
</property>

3) Time out error - Increase the timeout setting

How to configure timeout setting will come in my next posting.

Wednesday, March 7, 2012

Export Cross Reference Table

Set below environment variables.


export OC4J_USERNAME=oc4jadmin
export OC4J_PASSWORD=oc4jadmin
export DB_URL=jdbc:oracle:thin:@HOST_NAME:1521:SERVICE_ID
export DB_USER=aia
export DB_PASSWORD=aia

Execute below commands to export ITEM_ITEMID table to Item_Xref.xml file.

$ cd $ORACLE_HOME/integration/esb/bin

$ ./xrefexport.sh -file ./Item_Xref.xml -table ITEM_ITEMID

NOTE: If you encounter any error as below then set the environment variable 'export oc4j_username=oc4jadmin' and 'export oc4j_password=welcome1' instead of upper_case variable name

$ ./xrefexport.sh -file ./Item_Xref.xml -table ITEM_ITEMID

./xrefexport.sh[49]: test: Specify a parameter with this command.
invoke:Connection Details =sun.net.www.protocol.http.HttpURLConnection:http://HostName:7777/esb/j_security_check
postAndReceive:Connection response code = 302
getCookie:Final cookie value = JSESSIONID=39256409e4e9d3aa94731f05baa844eb8e9e35bf6cde13a5b37bd08c486c6aa8.e3mMc3qLbN8Le34RbN4Rch8Na3j0; path=/esb
invoke:Connection Details =sun.net.www.protocol.http.HttpURLConnection:http://HostName:7777/esb/login_error.jsp
postAndReceive:Connection response code = 200
getCookie:Final cookie value = JSESSIONID=39256409e4e9d3aa94731f05baa844eb8e9e35bf6cde13a5b37bd08c486c6aa8.e3mMc3qLbN8Le34RbN4Rch8Na3j0; path=/esb
Export Failed .. reason : "Authendication Failed"


Above error occurs due to a bug in xrefexport.sh which reads the environment variable oc4j username and password with lower case oc4j_username/oc4j_password. This error occurs only in some versions of SOA Suite alone.

Wednesday, February 8, 2012

Purge/Delete AQ Messages

Manual deletion of AQ message leads to various problem error such as " A resource exception occurred while waiting for inbound messages", it's always advisable to use scripts to delete the AQ messages.


Below script deletes the messages from Queue table.

DECLARE
po dbms_aqadm.aq$_purge_options_t;
BEGIN
po.block := FALSE;
DBMS_AQADM.PURGE_QUEUE_TABLE(
queue_table => 'AIA_SALESORDERJMSQTAB',
purge_condition => NULL,
purge_options => po);
END;

Tuesday, February 7, 2012

How to increase heap size in 64 bit machine OC4J Container?

In 64 bit machine you can increase the heap size to about 2^64. To increase the heap size in 64 bit JVM, the processor and operating system should also have 64 bit type to support almost unlimited heap size.

Note: The heap size should be kept at optimum size, even though it supports huge allocation. Performance will be degraded if you allocate more heap. Its better to use half the size of RAM as your heap size.

How to determine the maximum heap that can be allocated for your JVM?

Use the command "java -d64 -mx10g -version", if your JVM supports 64 bit you will get the jdk version otherwise you will get "Unrecognized option: -d64" message.

$ java -d64 -mx15g -version
java version "1.5.0.16"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0.16-_09_mar_2009_04_02)
Java HotSpot(TM) 64-Bit Server VM (build 1.5.0.16 jinteg:03.09.09-12:27 IA64W, mixed mode)

$ java -d64 -mx1024g -version
java version "1.5.0.16"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0.16-_09_mar_2009_04_02)
Java HotSpot(TM) 64-Bit Server VM (build 1.5.0.16 jinteg:03.09.09-12:27 IA64W, mixed mode)

How to change the heap size in OC4J container?

Take a backup of opmn.xml and edit the opmn.xml at location $ORACLE_HOME/opmn/conf.

Edit the startParameters of your container and add "-d64 -ms10g -mx10g" in value of 'java-options' to increase the heap size to 10GB

<category id="start-parameters">
<data id="java-options" value="-server -d64 -ms10g -mx10g -XX:MaxPermSize=512M -XX:AppendRatio=3 -Djava.security.policy=$ORACLE_HOME/j2ee/oc4j_soa/config/java2.policy -Djava.awt.headless=true -Dhttp.webdir.enable=false -Doraesb.home=$ORACLE_HOME/integration/esb -Dhttp.proxySet=false -Doc4j.userThreads=true -Doracle.mdb.fastUndeploy=60 -Doc4j.formauth.redirect=true -Djava.net.preferIPv4Stack=true -Dorabpel.home=$ORACLE_HOME/bpel -Xbootclasspath^/p:$ORACLE_HOME/bpel/lib/orabpel-boot.jar -Dhttp.proxySet=false -XX:MaxNewSize=614m -XX:NewSize=614m -XX:SurvivorRatio=6 -Daia.home=$AIA_HOME/AIA -Dbpel.delivery.operationNameCheck=true -Dbpel.dms=false" />
</category>

How to increase heap size in 32 bit machine OC4J Container?

java.lang.OutOfMemoryError occurs after complete utilization of heap memory.

In 32bit machine you can increase the heap approximately to 2GB. This also varies depending on various parameters like the size of RAM, Operating System etc.,

Generally in Windows machine half the RAM capacity will be used by the System and remaining by the applications. Configuration can be changed to reduce the system memory usage in Windows machine.

How to determine the maximum heap that can be allocated for your JVM?

Use the command "java -mx2048m -version", if your JVM supports given memory size you will get the JDK version message otherwise you will receive Invalid maximum heap size message.

$ java -mx3072m -version
java version "1.6.0.06"
Java(TM) SE Runtime Environment (build 1.6.0.06-jinteg_20_jan_2010_05_50-b00)
Java HotSpot(TM) Server VM (build 14.3-b01-jre1.6.0.06-rc1, mixed mode)


$ java -mx4096m -version
Invalid maximum heap size: -Xmx4096m
The specified size exceeds the maximum representable size.
Could not create the Java virtual machine.


How to change the heap size in OC4J container?

Take a backup of opmn.xml and edit the opmn.xml at location $ORACLE_HOME/opmn/conf.

Edit the startParameters of your container and add "-ms3072M -mx3072M" in value of 'java-options' to increase the heap size to 3GB

<category id="start-parameters">
<data id="java-options" value="-server -ms3072M -mx3072M -XX:MaxPermSize=512M -XX:AppendRatio=3 -Djava.security.policy=$ORACLE_HOME/j2ee/oc4j_soa/config/java2.policy -Djava.awt.headless=true -Dhttp.webdir.enable=false -Doraesb.home=$ORACLE_HOME/integration/esb -Dhttp.proxySet=false -Doc4j.userThreads=true -Doracle.mdb.fastUndeploy=60 -Doc4j.formauth.redirect=t
rue -Djava.net.preferIPv4Stack=true -Dorabpel.home=$ORACLE_HOME/bpel -Xbootclasspath^/p:$ORACLE_HOME/bpel/lib/orabpel-boot.jar -Dhttp.proxySet=false -XX:MaxNewSize=614m -XX:NewSize=614m -XX:SurvivorRatio=6 -Daia.home=$AIA_HOME/AIA -Dbpel.delivery.operationNameCheck=true -Dbpel.dms=false" />
</category>

Monday, February 6, 2012

OC4J Container log file rotation

default_group~<CONTAINER_NAME>_soa~default_group~1.log is created by JVM to print the output to console. This log file cannot be enabled for log file rotation using em console or configuration file.

Please follow below instruction to enable log file rotation.

1) Shutdown the server

2) Take back up of $ORACLE_HOME/opmn/conf/opmn.xml

3) Add "-Dstdstream.filesize=10" parameter to java-options of your container "start-parameters". 10 denotes the log file rotation size, after log file reaches 10MB new log file will be created.

4) Add "oc4j-options" data element, "<data id="oc4j-options" value="-out $ORACLE_HOME/opmn/logs/oc4j_soa.out -err $ORACLE_HOME/opmn/logs/oc4j_soa.err"/>"

5) Start the server

<data id="java-options" value="-server -mx1024M -ms1024M -XX:MaxPermSize=512M -XX:AppendRatio=3 -Djava.security.policy=$ORACLE_HOME/j2ee/oc4j_soa/config/java2.policy -Djava.awt.headless=true -Dhttp.webdir.enable=false -Doraesb.home=$ORACLE_HOME/integration/esb -Dhttp.proxySet=false -Doc4j.userThreads=true -Doracle.mdb.fastUndeploy=60 -Doc4j.formauth.redirect=true -Djava.net.preferIPv4Stack=true -Dorabpel.home=$ORACLE_HOME/bpel -Xbootclasspath^/p:$ORACLE_HOME/bpel/lib/orabpel-boot.jar -Dhttp.proxySet=false -XX:MaxNewSize=614m -XX:NewSize=614m -XX:SurvivorRatio=6 -Daia.home=$AIA_HOME/AIA -Dbpel.delivery.operationNameCheck=true -Dbpel.dms=false -Dstdstream.filesize=10"/>

<data id="oc4j-options" value="-out $ORACLE_HOME/opmn/logs/oc4j_soa.out -err $ORACLE_HOME/opmn/logs/oc4j_soa.err"/>


Note: After changes log file will be created in the below location.
$ORACLE_HOME/opmn/logs/oc4j_soa_default_group_1/oc4j_soa_2012_02_06_18_41_30.out
$ORACLE_HOME/opmn/logs/oc4j_soa_default_group_1/oc4j_soa_2012_02_06_18_41_31.err

Tip: If you want to create only one log file then point the out and err stream to the same file as '<data id="oc4j-options" value="-out $ORACLE_HOME/opmn/logs/oc4j_soa.out -err $ORACLE_HOME/opmn/logs/oc4j_soa.out"/>'

Sunday, January 29, 2012

Issues and Solutions - Part V

Issue: javax.management.MalformedObjectNameException: Key properties cannot be empty


at javax.management.ObjectName.construct(ObjectName.java:393)

at javax.management.ObjectName.(ObjectName.java:1314)

at com.evermind.server.Application.registerApplicationMBeans(Application.java:3060)

at com.evermind.server.Application.addJ2EEApplicationMBean(Application.java:1742)

at com.evermind.server.ApplicationStateRunning.initializeApplication(ApplicationStateRunning.java:219)

at com.evermind.server.Application.setConfig(Application.java:460)

at com.evermind.server.Application.setConfig(Application.java:361)

at com.evermind.server.ApplicationServer.addApplication(ApplicationServer.java:1919)

at oracle.oc4j.admin.internal.ApplicationDeployer.addApplication(ApplicationDeployer.java:776)

at oracle.oc4j.admin.internal.ApplicationDeployer.doDeploy(ApplicationDeployer.java:273)

at oracle.oc4j.admin.internal.DeployerBase.execute(DeployerBase.java:100)

at oracle.oc4j.admin.jmx.server.mbeans.deploy.OC4JDeployerRunnable.doRun(OC4JDeployerRunnable.java:52)

at oracle.oc4j.admin.jmx.server.mbeans.deploy.DeployerRunnable.run(DeployerRunnable.java:81)

at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)

at java.lang.Thread.run(Thread.java:595)



Solution: Add ":type=Application,name=ManageUtilMBean" in objectname

<jmx-mbean objectname=":type=Application,name=ManageUtilMBean" class="com.oracle.huawei.mbean.ManageUtil">

<description>Manage Oracle AS and BPEL util

<attribute name="Property1">

<value>1

</attribute>

</jmx-mbean>
----------------------------------------------------------------------------------------------------------------

Issue:

Exception in thread "main" java.lang.NoClassDefFoundError: javax/transaction/SystemException

at com.oracle.bpel.client.delivery.DeliveryService.post(DeliveryService.java:228)

at com.oracle.bpel.client.delivery.DeliveryService.post(DeliveryService.java:169)

Solution:

Add jta.jar in your classpath

----------------------------------------------------------------------------------------------------------------



Issue: Unhandled java exception, blocks the process

java.lang.NoClassDefFoundError

at java.lang.Class.forName0(Native Method)

at java.lang.Class.forName(Class.java:246)

at com.evermind.io.ClassLoaderObjectInputStream.resolveClass(ClassLoaderObjectInputStream.java:58)

at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1544)



public void invokeBPEL(IBPELProcessHandle bpelProcessHandle,

String operationName, String payloadName,

String initiateInput) {

try {

IDeliveryService dService =

(IDeliveryService)locator.lookupService(com.oracle.bpel.client.dispatch.IDeliveryService.SERVICE_NAME);


String bpelProcessName =

bpelProcessHandle.getProcessId().getProcessId();

// Create normalized message with payload

NormalizedMessage nm = new NormalizedMessage();

nm.addPart(payloadName, initiateInput);

LOGGER.info("Operation Name: " + operationName);



// Operation Type 1 & 3 are synchronous, 0 and 2 are asynchronous

int operationType =

bpelProcessHandle.getOperationType(operationName);

LOGGER.info("OperationType :" + operationType);

if (operationType == 1

operationType == 3) {

//NormalizedMessage responseNM =

LOGGER.info("Before Sync Invoke");

dService.request(bpelProcessName, operationName, nm);

LOGGER.info("After Sync Invoke");

} else {

LOGGER.info("Before Async Invoke");

dService.post(bpelProcessName, operationName, nm);

LOGGER.info("After Async Invoke");

}

} catch (Exception e) {

LOGGER.info("Got Exception");

e.printStackTrace();

} finally {

LOGGER.info("Finally block: Posted message successfully");

return;

}

}



Solution:

If there is an error after post message bpel call, it throws exception as shown above and it will never catch in Exception block and exits the process without returning back to called method.

To return back to the called method add finally block with empty return for the void method.

Issues and Solutions - Part IV

Issue:


<ERROR><default.collaxa.cube.activation><JMSAdapter::Inbound> JmsConsumer_run: A resource exception occurred while waiting for inbound messages: Generic error.

oracle.jms.AQjmsException: JMS-120: Dequeue failed

at oracle.jms.AQjmsError.throwEx(AQjmsError.java:308)

at oracle.jms.AQjmsConsumer.dequeue(AQjmsConsumer.java:2094)

at oracle.jms.AQjmsConsumer.receiveFromAQ(AQjmsConsumer.java:922)

at oracle.jms.AQjmsConsumer.receiveFromAQ(AQjmsConsumer.java:835)

at oracle.jms.AQjmsConsumer.receive(AQjmsConsumer.java:776)

at oracle.tip.adapter.jms.JMS.JMSMessageConsumer.consumeBlockingWithTimeout(JMSMessageConsumer.java:405)

at oracle.tip.adapter.jms.inbound.JmsConsumer.run(JmsConsumer.java:330)

at oracle.tip.adapter.fw.jca.work.WorkerJob.go(WorkerJob.java:51)

at oracle.tip.adapter.fw.common.ThreadPool.run(ThreadPool.java:280)

at java.lang.Thread.run(Thread.java:595)
[Linked-exception]

java.sql.SQLException: ORA-00600: internal error code, arguments: [kwqidrdq: loop], [0], [0], [0], [0], [], [], []

ORA-06512: at "SYS.DBMS_AQIN", line 571

ORA-06512: at line 1
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:138)

at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:316)



Solution: This error occurs due to manual deletion of the AQ messages, due to this error DB Connection pool gets exhausted after certain time limit.

Delete and recreate the queues.

Note: Don't delete the messages from the queue manually from the database

----------------------------------------------------------------------------------------------------------------

Issue:

Unable to convert the XSD element P_CONTACT_IDS whose collection type is AIA.AIA_AGGREGATOR_LIST_OF_IDS_TBL. Cause: java.sql.SQLException: Fail to construct descriptor: Unable to resolve type: "AIA.AIA_AGGREGATOR_LIST_OF_IDS_TBL" [Caused by: Fail to construct descriptor: Unable to resolve type: "AIA.AIA_AGGREGATOR_LIST_OF_IDS_TBL"]


Solution:

Check all the packages are compiled. If not compile all the packages and procedures.



----------------------------------------------------------------------------------------------------------------

Issue:

Error on AIASessionPoolManager.bpel: Operation=Get

SessionPoolHost.getSession(SEBL_01,80002): SessionPoolHost.create() thread[RMICallHandler-55]: Failed to obtain a session after 2 attempts. The web server did not reponded with a session.Login credentials [endpoint: http://:80/eai_enu/start.swe?SWEExtSource=SecureWebService&SWEExtCmd=Execute&UserName=123&Password=1234 ]

java.lang.Throwable: Fault response (or timed out)


Solution:

Set proper AIAConfigurationProperties.xml data

<!-- === Specific values for SEBL_01 === -->

<Property name="SEBL_01.UserId">intuser</Property>

<Property name="SEBL_01.Password">intuser123</Property>

<Property name="SEBL_01.EndpointURI">http://10.18.19.210:80/eai_enu/start.swe?SWEExtSource=SecureWebService&SWEExtCmd=Execute&WSSOAP=1</Property>

Issues and Solutions - Part III

Issue: Error, ESB Could not load XSL transform into the cache for XSL/XSLT.

Solution: Error happens due XSL transformation failure. Check for any function call in the xsl file or check for namespace which is used in XSL and not declared.

----------------------------------------------------------------------------------------------------------------

Issue: [ons-connect] Local connection 5ae182c,127.0.0.1,6100 invalid form factor

Solution1:

i, Change the request port for the opmn.xml file to a value greater than the 6100.

Note: Only change the "Port Local" value, not the "Remote" and "Request" values

Example:

ii, Restart the application server

Solution2:

Stop all opmn and related process forcefully.

Rename persistence to persistence.old in ${ORACLE_HOME}/j2ee/${OC4J_Insatnce}

Note you will not be able to rename the folder if opmn or any related process is still running.

Issues and Solutions - Part II

Issue: Error during BPEL process deployment, BPEL Process is not deployed completely and the process shows in warning state. Unable to redeploy the process again.

Solution: Using below SQL script, remove the failed process entry from orabpel schema.

delete from process where process_id='CreateAccountBalanceAdjustmentBRMCommsProvABCSImpl';

delete from process_descriptor where process_id='CreateAccountBalanceAdjustmentBRMCommsProvABCSImpl';

delete from process_log where process_id='CreateAccountBalanceAdjustmentBRMCommsProvABCSImpl';

delete from process_default where process_id='CreateAccountBalanceAdjustmentBRMCommsProvABCSImpl';



----------------------------------------------------------------------------------------------------------------



Issue: Error while registering ESB, unable to register or says Integration server is down


Solution: Find the failed esb service in the server @ location $ORACLE_HOME/integration/esb/oraesb/artifacts/store and $ORACLE_HOME/integration/esb/oraesb/artifacts/store/metadata and remove it.

Also remove the esb service entry from 'ESB_Projects.def.xml' @ location $ORACLE_HOME/integration/esb/oraesb/artifacts/store/metadata/files and save it.

Issues and Solutions - Part I

Issue: javax.naming.NameNotFoundException: ejb_ob_engine_DeliveryBeanLocal not found

Solution: InvocationMode property should be removed from bpel.xml or composite.xml, otherwise InvocationMode property should be set in all bpel and esb processes involved in same transaction.

----------------------------------------------------------------------------------------------------------------

Issue: Oracle ESB crossreference, populateXRefRow is not populating the data in xref table


Solution: populateXRefRow doesn't populate the cross reference data if the process is failed, cross reference entry will be rolled back after the process failure. Ensure process gets completed successfully to view the cross reference data.