Monday, January 19, 2009

How to use Logical path with File Adapter in BPEL

I used file adapter in one of my projects and i thought will share some useful information that you can use.

Logical Path : BPEL supports the Logical and Physical path. Physical path is nothing but complete path. Logical path will be a relative path.

For defining the logical path you can start with . which denotes the current folder. By default current folder is /somefolder/app/oracle/product/soa/j2ee in oc4j container.

We need to mention this configuration in the bpel.xml file. like below.

{property name="oc4j_soa" type="LogicalDirectory"} ./../../arrowlogs/soa {property}
replace { with < and } with >

Thursday, January 08, 2009

javax.naming.NamingException: Lookup error: javax.naming.AuthenticationException: Not authorized;

Issue:
======
I have kept my AQ Connection in ESB, so the esb will read the queue and a BPEL will do all the orchestration and another ESB, which will have all the
DB Connections for the insert statements.

Once the AQ adapter is created in ESB, we are able to read the message from the queue and we need to pass to the bpel process. we have made the
input variable as the incoming message type. We deployed the esb and bpel processes. when we try to run, we faced with a challenge.

The esb is not able to pass the xml from esb to bpel even though we have the same message type.

Exception:
=========
Authentication failure:javax.naming.NamingException: Lookup error: javax.naming.AuthenticationException: Not authorized;
nested exception is: javax.naming.AuthenticationException: Not authorized


Resolution:
===========
When you install the oracle soa, we need to provide the user credentials. There is a file inside the soa which stores this information.
${soa_home}/bpel/utilities/ant-orabpel.properties. If you have any custom password then we need to replace the password with your custom.
By default the password will be "welcome1". You need to replace the password with your own password, then only you can communicate between the ESB and the BPEL
Projects.

If a bpel fails to create any instance you can take a look at the "View Process Log", its a worth try.

Click on this link "View Process Log" to get the failed bpel information.

In one of my project i was working with AQ, when we try to move the code from DEV to TEST, we were hit with this issue.
We have every thing in place, we have created AQ and we have created the required DataSource and when we push message to the AQ.
The BPEL is not picking up the AQ Message, we checked each and every thing that we could.

We looked at all the logs from the server and we couldnt identify the issue. Then i clicked on the view process log. We got the below exception.

"ORA-06550: line 1, column 7: PLS-00201: identifier 'DBMS_AQIN' must be declared ORA-06550: line 1, column 7: PL/SQL: Statement ignored"

Basically we dont have the permission to dequeue, because of the above permission is not there for that user. Once we granted for this user. we were able to
goahead with our testing.

How to append content to a file while using file adapter in bpel

Modify the fileadapter wsdl with append="true" in the jca tag.
This will append the messages comes into the file.

jca:operation
LogicalDirectory="oc4j_soa"
InteractionSpec="oracle.tip.adapter.file.outbound.FileInteractionSpec"
FileNamingConvention="arrow_SW_IN_ORDER_CONTROLLER_OC4J_soa.log"
OpaqueSchema="false"
Append="true"