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.