Pages

Friday, 6 December 2013

Problems found in SOA 10G with Solutions – 1


In this Post you will see solutions for some of the problems faced in SOA 10 G. This is the first part of solutions and more will be published in my next posts...

Problem 1: ORABPEL-04077
Cannot fetch a datasource connection.
The process domain was unable to establish a connection with the datasource with the connection URL “jdbc/BPELServerDataSource”. The exception reported is: javax.resource.ResourceException: RollbackException: Transaction has been marked for rollback: Timed out


Solution:
Sometimes deploying a bpel project of bigger size using JDeveloper throws exception: javax.resource.ResourceException: RollbackException: Transaction has been marked for rollback: Timed out. This is due to the fact that JDeveloper takes too much time and fails to deploy the project.
To solve the issue we need to change values of some configuration files of SOA Server. Follow the below mentioned steps:
1) Stop the SOA Server
2) Open the transaction-manager.xml file present under location:-
<SOA_HOME>\j2ee\oc4j_soa\config\transaction-manager.xml
3) Change the transaction-timeout attribute value to some higher value, viz. Transaction-
timeout=”7200″
4) Now open the orion-ejb-jar.xml file present under location:-
<SOA_HOME>\j2ee\oc4j_soa\application-deployments\orabpel\ejb_ob_engine\orion-ejb-jar.xml
5) Change the transaction-timeout attribute to some higher value, viz. Transaction-timeout=”3600″
6) There will be 6 entries of transaction-timeout attributes in the file. You have to change all the 6
attributes.
7) Save the files.
8) Restart the SOA Server.


Problem 2:
nested exception is:
com.oracle.bpel.client.delivery.ReceiveTimeOutException: Waiting for response has timed out. The conversation id is bpel://localhost/default/ActivateComptelEBF~1.0. Please check the process instance for detail.

  Solution:
Above mentioned error come if the “syncMaxWaitTime” setting is set too low. So the processes which exceeds this limit get this error.
“syncMaxWaitTime” is the delivery result receiver maximum wait time. It is the maximum time the process result receiver will wait for a result before returning. The default is 45 seconds.
There are two ways of increasing this value.
a. Via BPEL Console :
1. Log on to the BPEL console.
2. Click on Manage BPEL Domain.
3. Click on Configuration.
4. Edit the syncMaxWaitTime setting. For long running processes, this can be increased to 1800.
b. SOA Server File :
1) Stop the server.
2) Navigate on SOA Server for this location: SOA_HOME>/bpel/domains/default/config/domain.xml
3) Edit the value of syncMaxWaitTime property to 1800.
4) Start the Server.

Problem 3: ORABPEL-10903
ORABPEL-10903: “failed to read wsdl” when deploying BPEL process

  Solution:
Check your schema file which you are using. There might be a possibility that the schema file name contains spaces. Rename the schema file(with no spaces).
Note that if you are importing that schema in your wsdl file then dont forget to change the name there too.
If the name is perfect, check whether the path you are using in the wsdl to refer the schema is perfect.

Problem 4:
To store large objects in database tables. If data is more than 32766 bytes, the DB Adapter doesnot insert the data. The Oracle BPEL PM throws following exception:

java.sql.SQLException: setString can only process strings of less than 32766 chararacters
Internal Exception: java.sql.SQLException: setString can only process strings of less than 32766 chararacters
Error Code: 17157 when trying to insert record in clob type of size more then 32766 characters

Note:- To store large data, the column in the oracle database should be of CLOB datatype which can store data.


Solution:
1) Goto location <SOA_Home>\j2ee\\connectors\DbAdapter\META-INF
2) Open file ra.xml fil
3) Copy and paste the below mentioned content:

usesStreamsForBinding
java.lang.Boolean
true


usesStringBinding
java.lang.Boolean
true

4) Now Goto <SOA_Home>\j2ee\\application-deployments\default\DbAdapter\oc4j-ra.xml
5) Open oc4j-ra.xml file
6) Copy and paste the above mentioned properties in the connector-factory of the DB Adapter.
7) Restart Oracle SOA Suite.

Problem 5:
Sometimes you get following runtime error message in your BPEL Console for the transform activity;

XPath query string returns zero node.
According to BPEL4WS spec 1.1 section 14.3, The assign activity part query should not return zero node.
Please check the BPEL source at line number “211″ and verify the part xpath query.


  Solution:The probable reason for getting this error is due to assigning value to an element using Assign activity just after the Transform activity, for which the same element is not mapped in transformation. Assign activity attempts to update an element not being transformed in Transform (the element without any value).
Following steps should be done to overcome this problem:
1) Go to the transformation mapper file
2) Right-click on the element that the Assign activity in going to use for assigning value in the next step
3) Select Set Text
4) Set any temporary value there. This will be overwritten by the Assign activity in the next step anyways.

Problem 6:
Create JNDI without using Oracle Application Enterprise Manager


Solution:
While you create Database JNDI using Oracle Application Enterprise Manager, it modifies two files in the SOA installed location.
1) data-sources.xml
2) oc4j-ra.xml
We can manually create JNDIs by adding contents to these files.
1) First you need to modify the data-sources.xml file located at <SOA_Home>\j2ee\\config. Open the file in notepad. Add your new pool information as:
Give a pool name. You need to provide the database connection details such as username, password, host name, port, service name. Save the changes.
2) As the second step, you need to modify the oc4j-ra.xml file located at <SOA_Home>\j2ee\\application-deployments\default\DbAdapter. Open the file in notepad. Add your new JNDI information as:
Provide the JNDI location and also the datasource name. Save the changes.
3) Restart the SOA Server.

Problem 7:
Need to pass same value everytime to initiate BPEL process(Synchronous or Asynchronous).


Solution:If you want to pass a default input in your BPEL process while initiating process then you need to modify/add some code in your projects bpel.xml file.
Add the following code after the tag in bpel.xml file:
Sample Input

Problem 8:
What, if you forgot the password for logging into BPEL, ESB or EM? Is there any way to reset it?


Solution:
Follow the below steps:
1) Look for the file system-jazn-data.xml under location:
SOA_HOME/j2ee/<home_container>/config
2) Open the file system-jazn-data.xml in your editor.
3) Edit credentials tag for the corresponding name tag as shown below:
oc4jadmin
.
.
!<your_new_password>
Note:Do remember to add ! sign before your password.
4) Restart the SOA Server.

Problem 9:
A “javax.transaction.RollbackException” is thrown when BPEL PM is under heavy load.

error:
Caused by: ORABPEL-11622
Could not create/access the TopLink Session.
This session is used to connect to the datastore. [Caused by: Transaction has been marked for rollback: Timed out]
See root exception for the specific exception. You may need to configure the connection settings in the deployment descriptor
(i.e. $J2EE_HOME/application-deployments/default/DbAdapter/oc4j-ra.xml) and restart the server. Caused by Exception [TOPLINK-23005]
(Oracle TopLink – 10g Release 3 (10.1.3.1.0) (Build 061004)):
oracle.toplink.exceptions.TransactionException
Exception Description: Error binding to externally managed transaction
Internal Exception: javax.transaction.RollbackException: Transaction has been marked for rollback


Solution:
Do the following steps to resolve this issue.
1) Goto SOA_HOME/bpel/domains//config
2) Open domain.xml and change syncMaxWaitTime to 1800. (If existing value is more than this, dont make any changes)
3) Goto SOA_HOME/j2ee/OC4J_SOA/application-deployments/orabpel/ejb_ob_engine
4) Open orion-ejb-jar.xml and change all the transaction-timeout values to 3600. (If the existing value is more than this don’t make any changes here).
5) Goto SOA_HOME/j2ee/OC4J_SOA/config
6) Open transaction-manager.xml and change transaction-timeout value to 7200. (This value you could use as high as 60000, if needed).


Problem 10: Stripping all ‘xmlns’ attributes from qualified XML document

Solution:
Here is an XSLT that you can use to strip all namespaces from XML document:

Problem 11:
Need to have all ESB Services and their respective parent System


Solution:
Go to esb schema in DB and then execute the following query to get the required information.
The ESB schema name to connect is ORAESB. You need to have the following information to connect to
this schema:
1) Password
2) Hostname
3) Port
Query:
SELECT systems.name SYSTEMNAME, event.name ESBSERVICENAME, event.guid GUID,
DECODE(event.type, ‘GROUP’, ‘Service’, ‘SERVICEGROUP’, ‘Service Group’) TYPE, event.status STATUS
FROM wf_events event, wf_systems systems
WHERE event.type != ‘EVENT’
AND event.system_guid = systems.guid
AND event.type IN (‘GROUP’)
AND systems.name != ‘BPELSystem’
ORDER BY systems.name
Description:
1) event.type != ‘EVENT’ :- Condition to exclude esb activities
2) systems.name != ‘BPELSystem’ :- Condition to exclude BPEL processes
3) ‘GROUP’ :- Here GROUP means ESB service
4) ‘SERVICEGROUP’ :- Here SERVICEGROUP is the actual Service Group

Problem 12:
Need to get the list of Systems and its respective GUID’s.

  Solution:Go to esb schema in DB and then execute the following query to get the required information.
The ESB schema name to connect is ORAESB. You need to have the following information to connect to
this schema:
1) Password
2) Hostname
3) Port
You can get the Hostname and Port details from the datasources.xml file.
Query:
SELECT name,guid,status FROM wf_systems WHERE name != ‘BPELSystem’

Problem 13:
Setting Log Level for BPEL


Solution:
1) Log in BPEL Console
2) Click on Manage BPEL Domain
3) Goto auditLevel and set the property to production, then click Apply.
4) Goto Logging, on the same page, and set all loggers to error and click on Apply.

Problem 14:
How to increase the performance of SOA Server.

  Solution:The
1) Goto the location SOA_HOME/j2ee/oc4j_soa/application-deployments/default/DbAdapter
2) Open the file oc4j-ra.xml
Default Value:
New Value:
3) Similarly open oc4j-ra.xml for Aqadapter (if Aqadapter is being used) which will present under location:
SOA_HOME/j2ee/oc4j_soa/application-deployments/default/AqAdapter
4) Bounce the server.

Problem 15:
Error shown below is reported sometimes when you deploy a BPEL project:
C:\jdevstudio10133\jdev\test\testApps\build.xml:79: A problem occured while connecting to server using port “7777″:
bpel_testApps_1.0.jar failed to deploy.
Exception message is: ORABPEL-09903
Could not initialize activation agent.


  Solution:This type of error happens when the JNDI entry is not proper or you have insufficient priviledges.
Check for the following things to get rid of this error:
1) Check the JNDI names, as they may be pointing to a different location. Test it.
2) Test that the user connecting to the queue has enough priviledges.

Problem 16 :
JBO-26030: Failed to lock the record, another user holds the lock.
oracle.jbo.AlreadyLockedException: JBO-26030: Failed to lock the record, another user holds the lock.


Solution:
Two ways to solve this.
1) Increase the transaction timeout in server.xml to a large number
2) Set connectionCachingEnabled property in /j2ee/OC4J_BPEL/config/data-source.xml to false


Problem 17 :
How to control the size of the BPEL domain.log file and log rotation:


Solution:
1. Logon to your server and navigate to directory BPEL_HOME/domains//config.
2. Make a backup copy of the log4j-config.xml file.
3. Open the log4j-config.xml file for edit.
4. Change the appender class from com.collaxa.cube.util.CXRollingFileAppender to
org.apache.log4j.RollingFileAppender.
5. Add the property MaxFileSize:
Here, a maximum file size of 10MB is specified, but you can make it whatever value suits your
environment. The top of the log4j-config.xml file now looks like:
6. Save the file, and restart the BPEL container.
When you work with tasks in the BPEL Console, this error may occur:
500 Internal Server Error
java.lang.OutOfMemoryError: PermGen space
To resolve the error, you increase the memory allocated to the PermGen space (used for loading static classes) with the MaxPermSize parameter. Follow these instructions to set the MaxPermSize parameter in the Oracle Application Server instances on APPHOST1 and APPHOST2:
1. Open the ORACLE_HOME/opmn/conf/opmn.xml file and locate the MaxPermSize parameter (shown in bold in Example 3-1.
Example 3-1 MaxPermSize Parameter


2. Increase the value, for example:
-XX:MaxPermSize=256M
3. Save and close the file, and restart the OPMN instance.

What is SOA ?

What is SOA ?


Before jumping in to learning SOA we will try to find what are the integrations before SOA and thus we will get chance to appreciate SOA more…  before SOA came in to existence, the integration pattern existed is Point-to-point and let us discuss more about this integration pattern now..
Point-to-Point Integration Pattern
  • Interface contains the logic for:
                  – Connectivity with Source
                  – Message transformation and
                  – Connectivity with target applications
  • Source and target applications are tightly coupled
  • No Scalability –Adding a new application will result in a new interface
  • Integrating these applications can be very difficult and time consuming
  • Upgrading any application will require code modification to the integrations
  • Limited reusability




Now we will see whats in SOA integration pattern:
  • Source interfaces are built independent of target Applications
  • Adopting a Common Data Model is one variant
  • Scalable to add new target interfaces.
  • A change to any one application has a minimal impact on the integrations

                            


Now we will learn more concepts of SOA:
SOA is an IT Strategy that organizes the discrete functions contained in enterprise applications into inter-operable standards based services that can be combined and reused quickly to meet business requirement. In simple words, we can say SOA is the integration of web services for implementing business logic.
Or more precisely, we can say “SOA is a strategy for developing and integrating systems through interoperable standards-based services.”
SOA helps today’s business innovate by ensuring that IT systems can adapt quickly, easily and economically to support rapidly changing business needs. SOA helps customers increase the flexibility of their business processes, strengthen their underlying IT infrastructure and reuse their existing IT investments by creating connections among disparate applications and information sources.
SOA is an architectural approach that gives the following benefits:






Now, Let us discuss about the major differences between the traditional architecture versus Service Oriented Architecture..






In this Post, we have seen how SOA came to existence and what are main benefits of implementing SOA to business….