Thursday, April 30, 2009

Error: XPATH returns zero node

Problem:
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.
Possible reasons behind this problems are: some xml elements/attributes are optional or the xml data is invalid according to XML Schema.
To verify whether XML data received by a process is valid, user can turn on validateXML switch at the domain
administration page.

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) Goto the transfomation 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.

Wednesday, April 29, 2009

Error in getting File from FTP

Problem:
Sometimes when you try to GET(Read) a pdf file from the FTP folder(using FTP adapter) in the bpel process, you get following error:

FTP Command: RETR, reply:
550 RETR Error: IFS-32615: "/TestFolder/Read/demo.pdf": Path is invalid.
Unable to get Binary file '/TestFolder/Read/demo.pdf' ; FTP command RETR returned unexpected reply code : 550

Solution:
1) Goto the following SOA Server location:
<SOA_HOME>\j2ee\oc4j_soa\application-deployments\default\FtpAdapter
2) Open oc4j-ra.xml file in Notepad.
3) Navigate to
4) Change value="" to value="UTF-8"
5) Save the file
6) Bounce the SOA Server.

Pure SQL Exception

Problem:
Pure SQL Exception encountered.

Reason:
This problem is related to the database connections used in the BPEL/ESB projects. Usually sometimes we encounter this problem when the database on which we are doing some operations or the database(dehydration store) on which BPEL and ESB schemas are created is refreshed/restarted, and SOA Server doesn't come to know about the refresh/restart.

** This problem is seen when we use direct database connection instead of JNDI. It is always recommended to use JNDI instead of direct database connections.

Solution:
Bounce the SOA server so that the SOA Server updates itself.

Creating Database JNDI w/o EM

Problem:
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. This try was made just to make sure that JNDIs can be created without the help of Enterprise manager.
So here you go,

1) First you need to modify the data-sources.xml file located at <SOA_Home>\j2ee\<Active container name>\config. Open the file in notepad. Add your new pool information as:

<connection-pool name="TestPOOL">
<connection-factory factory-class="oracle.jdbc.pool.OracleDataSource" user="database username" password="database password" url="jdbc:oracle:thin:@//host name:port/service name" commit-record-table-name=""/>
</connection-pool>

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\<Active container name>\application-deployments\default\DbAdapter. Open the file in notepad. Add your new JNDI information as:

<connector-factory location="eis/DB/Test" connector-name="Test DB Adapter JNDI">
<config-property name="xADataSourceName" value="jdbc/Test"/>
<config-property name="dataSourceName" value=""/>
<config-property name="platformClassName" value="oracle.toplink.platform.database.Oracle9Platform"/>
<config-property name="usesNativeSequencing" value="true"/>
<config-property name="sequencePreallocationSize" value="50"/>
<config-property name="defaultNChar" value="false"/>
<config-property name="usesBatchWriting" value="true"/>
<connection-pooling use="none">
</connection-pooling>
<security-config use="none">
</security-config>
</connector-factory>

Provide the JNDI location and also the datasource name. Save the changes.

After the changes bounce the SOA Server. Now your database JNDI is ready to use.

BPEL: Default Input to initiate

Problem:
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 <partnerLinkBindings> tag in bpel.xml file:

<configurations>
<property name="defaultInput">Hi to SOA World</property>
</configurations>

Oracle Aquired Sun

Oracle announced the acquisition of Sun a week back. I think this is the hottest news in the tech-market now. This aquisition came after IBM cancelled the acquisition talks with Sun just 3 weeks back.

On the acquisition, just a small thought:

1) MySQL becomes the latest addition to Oracle's database family, MySQL was acquired by Sun last year.
2) With the aquisition it looks like Oracle wants to broaden its services into hardware as well.

Thursday, April 16, 2009

Application Server HTTP 404 problem

Hi SOA lovers

Writing blog after a long gap, this time with new flavors.

INTRODUCTION:
Sometimes when you navigate to the Enterprise Manager’s Application Server Control you will hit a 404 "Page not found exception".

REASON:
The most probable reason is that Application Server Control has no routing relationship defined with the Oracle HTTP Server by default.

SOLUTION:
To establish this relationship you have to set the ohs-routing attribute to true (default value in the file will be false) in the default-web-site.xml file at SOA server location: <SOA home>/j2ee/home/config. Make sure to make the changes always in the home container.

Make the changes as follws in the file:
<web-app application="ascontrol" name="ascontrol" load-on-startup="true" root="/em" ohs-routing="true" />

Now restart the SOA Server and try it. It should work.

If this solution doesn't work, follow my latest finding, posted on 22nd December 2009.