Thursday, April 7, 2011

Troubleshooting SOA 10g Issues

1. Setting Properties for BPEL Processes to Successfully Complete and Catch Exception Errors
 
The values to which you set the transaction-timeout and syncMaxWaitTime properties can impact whether a transaction scope successfully completes or times out and catches exception errors. For example, assume you have two processes:
  • TimeoutSubprocess (A synchronous detail process that includes a wait activity set to three minutes)
  • TimeoutMainProcess (An asynchronous main process that calls the TimeoutSubprocess)
If syncMaxWaitTime is set to 45 seconds (the default value) and transaction-timeout is set to 30 seconds, after 45 seconds the main process continues running and does not successfully complete and catch the following exception error as expected:
         com.oracle.bpel.client.delivery.ReceiveTimeOutException

In the domain.log file, the following exception error displays:
An exception occurred during transaction completion:; nested exception is:
javax.transaction.RollbackException: Timed out
javax.transaction.RollbackException: Timed out

Solution :
Perform the following procedures for the main process to successfully complete and catch the exception error.
1.      Set the transaction-timeout and syncMaxWaitTime properties as follows:

Property
File Location
This Value Must Be...
Example
transaction-timeout
SOA_Oracle_Home\j2ee\home\config\transaction-manager.xml
Larger than the transaction-timeout value in orion-ejb-jar.xml and
the syncMaxWaitTime value.
7200
transaction-timeout
SOA_Oracle_Home\j2ee\home\application-deployments\orabpel\ejb_ob_engine\orion-ejb-jar.xml
Less than the transaction-timeout value in transaction-manager.xml.
Note: You must set all transaction-timeout properties that display in this file.
3600
syncMaxWaitTime
SOA_Oracle_Home\bpel\domains\domain_name\config\domain.xml
where domain_name is the name of the domain to which you are deploying.
Less than the transaction-timeout value in orion-ejb-jar.xml.
240


This causes the main process to successfully complete and catch the exception error.

2. Table Not Found: SQL Exception
A BPEL process modeled against one database does not run against another database.
The most likely cause for this problem is that you are using a different schema in the second database. For example, if you run the wizard and import the table SCOTT.EMPLOYEE, then, in the toplink_mappings.xml file, you see SCOTT.EMPLOYEE. If you run the sample in the USER schema on another database, you get a "table not found" exception.

Solution
Until qualifying all table names with the schema name is made optional, manually edit toplink_mappings.xml and replace SCOTT. with nothing, as shown in the following example.
Change:
<project>
   <project-name>toplink_mappings</project-name>
   <descriptors>
      <descriptor>
         <java-class>BPELProcess1.A</java-class>
         <tables>
            <table>SCOTT.A</table>
         </tables>

To:
<project>
   <project-name>toplink_mappings</project-name>
   <descriptors>
      <descriptor>
         <java-class>BPELProcess1.A</java-class>
         <tables>
            <table>A</table>
         </tables>   

3. Handling Long-Running Processes

When a process has a long-standing activity and the server timeout value is set to less than the time that has elapsed since the previous dehydration point has been reached, you can see exception messages similar to the following in the Oracle BPEL Server window.
Message handle error. 
An exception occurred while attempting to process the message
"com.collaxa.cube.engine.dispatch.message.invoke.InvokeIns
tanceMessage"; the exception is: Transaction was rolled back: timed out;
nested exception is: java.rmi.RemoteException:
No Exception - originate from:java.lang.Exception: No Exception - originate
from:; nested exception is:   java.lang.Exception: No Exception - originate from:
Solution:
As a workaround, increase the transaction-config timeout value in the transaction-manager.xml file. For example:
                   <transaction-config timeout="30000"/>
The location of this file depends on the method by which you installed Oracle BPEL Process Manager:
·         For Oracle Application Server SOA Basic installations, the file is located in SOA_Oracle_Home\j2ee\home\config.
·         For Oracle BPEL Process Manager installations, the file is located in SOA_Oracle_Home\bpel\system\appserver\oc4j\j2ee\home\config.\

What is the Impact of the transaction=participate Property on BPEL Transactionality?
As a process property. This marks the local transaction for rollback. If this property
is not specified, the BPEL subprocess instance is closed, faulted, and the instance is
persisted and visible from Oracle BPEL Control. If this property is specified, the
BPEL subprocess instance is not persisted and is not visible from Oracle BPEL
Control.

<BPELSuitcase>
<BPELProcess id="BankTransferFlow" src="BankTransferFlow.bpel">
...
<configurations>
<property name="transaction">participate</property>
</configurations>
</BPELProcess>
</BPELSuitcase>

In 10.1.3.3.0, Oracle ESB no longer marks the JTA transaction for rollback if the transaction was initiated by Oracle BPEL Process Manager. Instead, Oracle ESB throws an exception back to Oracle BPEL Process Manager.
 

No comments:

Post a Comment