6 Replies Latest reply on Sep 18, 2013 1:20 PM by DeepakDabbiru

    BPEL Integration with AS400 (DB2)


      Is there any adapter that we can use to connect to a DB2 database from BPEL.

      Is this available in SOA 10g or is it only available in 11g?


      Any documentation or blog around these lines would be highly appreicated. I am trying to connect to AS400 DB2 database from BPEL.


      Thanks in advance.

        • 1. Re: BPEL Integration with AS400 (DB2)

          Database adapter can be used to connect to AS400 DB2; supported in SOA 10g as well as 11g. You can refer the following documentation links.

          (10g) Oracle Application Server Adapter for Databases

          (11g) Oracle JCA Adapter for Database

          1 person found this helpful
          • 2. Re: BPEL Integration with AS400 (DB2)

            Thanks Ananth for your response. I was able to make a successful connection from JDeveloper. However - I didn't get a clear idea on how to create a Connection Pool on the SOA Server (10g) for the DB2 connection.

            I have dropped the JDBC Driver Jar files in 'Oracle_Home/j2ee/OC4J_BPEL/applib' as per the step 4.6.7 on the 10g document. How do we create the Connection Pool and the Data Source on the server? Thanks in advance for your help.

            • 3. Re: BPEL Integration with AS400 (DB2)

              You can configure data source and connection pool via Oracle EM (10g) or manually editing the data-sources.xml to add the data source/connection pool and the DB adapter's oc4j-ra.xml to add the connection factory. Please refer these links for details - http://docs.oracle.com/cd/E11036_01/integrate.1013/b28994/adptr_db.htm#CHDHJAID, http://docs.oracle.com/cd/E11036_01/integrate.1013/b28994/adptr_db.htm#BDCFIEDJ.

              Ensure that the right PlatformClassName (here, for DB2 on AS400) is added in the oc4j-ra.xml file, as given in the above link. In EM, the link to create/edit data source and connection is- Home>Administration>Services>JDBC Resources>(click Task icon)> under Connection Pool>Create and under Data Sources>Create. Link to create connection factory for the DB adapter- OC4J Home>Applications>Default>Modules>Database Adapter>Connection Factories>Create.

              • 4. Re: BPEL Integration with AS400 (DB2)

                Thanks Ananth for the response.

                I successfully created the Connection Pool and Data Source to the DB2 database. I was able to test the connection as well. I have created a Connection Factory for the DB2 database.

                I used the same JNDI Location in my BPEL Process in the JDeveloper. But when I tried to deploy it to the server - I am getting the below error. Any thoughts what am I missing. I made sure that the variable 'eisDBLocation' exists in bpel.xml and the value matches the defined JNDI Location (Connection Factory).


                BUILD FAILED
                C:\Work_7\BPEL\OTM_ASCRUS_Integration\DB2OTM\build.xml:78: A problem occured while connecting to server "txri-bpeldev-1.tomkinsbp.com" using port "7777": bpel_DB2OTM_1.0.jar failed to deploy. Exception message is:  Could not initialize activation agent.
                An error occured while initializing an activation agent for process "DB2OTM", revision "1.0".
                Please ensure that the activation agents are configured correctly in the bpel deployment descriptor (bpel.xml).
                oracle.tip.adapter.fw.agent.jca.JCAActivationAgent: ORABPEL-12517
                AdapterFrameworkImpl::endpointActivation - Endpoint Activation Error.
                The Resource Adapter  was unable to activate the endpoint :{} due to the following reason: ORABPEL-12510
                Unable to locate the JCA Resource Adapter via WSDL port element jca:address.
                The Adapter Framework is unable to startup the Resource Adapter specified in the WSDL jca:address element:  {http://xmlns.oracle.com/pcbpel/wsdl/jca/}address: location='<property 'eisDBLocation' not defined in bpel.xml>'
                The reason for this is most likely that either
                1) the Resource Adapters RAR file has not been deployed successfully to the OC4J Application server or
                2) the 'location' attribute in $J2EE_HOME/application-deployments/default/deployed-adapter-name/oc4j-ra.xml has not been set to <property 'eisDBLocation' not defined in bpel.xml>. In the last case you might have to add a new 'connector-factory' entry (connection) to oc4j-ra.xml.
                Please correct this and then restart the BPEL/OC4J Application Server
                Please correct the reported issue and redeploy the BPEL process.

                • 5. Re: BPEL Integration with AS400 (DB2)

                  Actually now I am able to deploy the BPEL Process to the server.

                  But when I poll for records in a file on the DB2 database - its throwing an error "SQL7008". I am actually polling for records where the process flag is N and then setting that flag to Y. Do you think its related any locking issue on the database. I am checking with the DB2 resources about this issue. Thanks for your input.

                  • 6. Re: BPEL Integration with AS400 (DB2)



                    Whoever maintains the AS400 DB2, please ask them to Journal the table/schemas that you are trying to access / poll from.

                    We have faced a similar problem and we got the tables journaled by the DB2 team and everything works perfectly.