Using JCA Adapter with OSB

In OSB 10g to use the JCA adapters you were required to use JDeveloper to create the necessary WSDLs and XSDs etc using the associated adapter wizard. These files were imported into Oracle Workshop (Eclipse) and used to create the business service as you would any other web service. In 11g unfortunately JDeveloper is still required. The process has changed slightly as described below. As an example I have used the JCA DB adapter as an example.

  1. Start JDeveloper
  2. Create a new SOA Application
  3. Create a new SOA Project and call it DBAdapters.

  4. Choose the Empty Composite Template

  5. Drag a Database Adapter Component to the External References panel on the composite. Provide a service name.

  6. Create a new database connection, or use an existing one

  7. Take note of the JNDI Name, e.g.


    This will be used to configure the DB connection in the WebLogic Console.
  8. In my example I use a stored procedure, but you can use what ever operation you require. Please refer to the following link for other options: User's Guide for Technology Adapters

  9. Select a schema and stored procedure

  10. Once the procedure has been selected, accept the defaults and finish.
  11. Startup your OEPE version of Eclipse.
  12. Create a new Oracle Service Bus Configuration Project (you can use an existing project if you have one)
  13. Create a new Oracle Service Bus Project in the configuration project created above.
  14. Instead of importing the WSDL and XSD files you import the jca file created in JDeveloper. In Eclipse right click the Oracle Service Bus Project and select Import -> Import

  15. Choose File System

  16. Browse to the directory where JDeveloper stores its project

  17. Select the jca, wsdl, and xsd files based on the service you created in step 5. Also check the 'Create selected folders only' radio button.

  18. When you import you may have a little red x indicating the files are invalid. This is due to the location of the files. Open the invalid files and fix the path in relation to where you store your files in the OSB project.

  19. Once you have the files all valid, Right-Click the jca file and select Oracle Service Bus -> Generate Service. This will create a new Business Service.

  20. In the WebLogic Console configure the JNDI name defined in step 7.
  21. You can now deploy your project and test

This is a very good article.

Posted by guest on June 01, 2011 at 12:54 AM GMT-11:00 #

Hi, thanks for your post.
Iam trying to follow the steps. Iam using Eclipse (ver 3.5.2). When I'm generating the JCA business service, the IDE doesn't let me choose the JCA transport protocol. I tried to import the plugins that contain the JCA protocol, but with any sucessfull result.
Do you have any idea of the step Iam missing? thanks...

Posted by Martin on June 16, 2011 at 07:45 PM GMT-11:00 #

I have just posted a new post to the Blog explaining how to get the the OSB plugin. Not sure what version of OSB you are using but if you are using 11g I would recommend using 3.6.

The JCA support for OSB only arrived in In 10.3.x it was supported but you had to used JDev 10.1.3.x and you would select webservice and use the WSDLs generated from JDeveloper.

Edwin Biemond has provided the steps here:


Posted by guest on June 19, 2011 at 11:01 AM GMT-11:00 #

Hello, James.
Great article!

I just have a question. What do you mean when you say "configure the JNDI" in step 20?

I have followed all the tutorial, except for this step, and it is giving the following error:

<Sep 26, 2011 9:26:36 PM BRT> <Error> <JCATransport> <BEA-381987> <An error occured while validating JCA transport endpoint. JNDI lookup with URL: jca://eis/DB/TransportDatabaseConnection failed. Missing JNDI configuration such as undeployed or misconfigured JCA Adapter RAR or connection factory.>

Do you have any idea of how to fix it?
Thanks in advance!

Posted by Thiagus on September 26, 2011 at 08:43 AM GMT-11:00 #

Yes you need to configure the JNDI name. Have a look at an earlier post Its for MSSQL but the configuration in WLS console is the same but obviously you need to change for Oracle DB.

Posted by James Taylor on September 26, 2011 at 08:51 AM GMT-11:00 #

Hello Hello, James.
Great article!
I have a question, if the Oracle BPEL Process Manager and JDeveloper, allow me to do the same that in Oracle Service Bus (OSB), related to orchestration, transformation, service calls, etc., then what would be the real difference OSB, ie that I would have an ESB if the BPEL Process Manager and JDeveloper would perform the same.
Thanks in advance, awaiting your response Dalila.

Posted by Dalila on October 31, 2011 at 10:10 PM GMT-11:00 #

Hello, James.
I have a problem when i finish all the steps.
it can read the data from one table,but it can't be read into another table,i do not why?can you help me?

Posted by guest on March 22, 2012 at 08:35 PM GMT-11:00 #

It sounds like you have the adapter working, the issue looks more to do with your OSB code and translations, etc. You would need to provide more information for me to give more detail on what you are experiencing.


Posted by James Taylor on March 23, 2012 at 07:55 AM GMT-11:00 #


Can you please tell me what exactly do you mean by, "Open the invalid files and fix the path in relation to where you store your files in the OSB project" in step 18.


Posted by yogesh on August 27, 2012 at 09:57 PM GMT-11:00 #

You need to go into each file that has an X. At the top there are namespaces and imports for dependencies etc. Make sure that the path of these dependencies is correct in relation to where the files reside in your project.


Posted by James Taylor on August 27, 2012 at 10:06 PM GMT-11:00 #

hi its urgent,can u tell me .. with out using jdeveloper can i make osb service communicate with database in oepe.. is there any possibilities..
now i am using oepe 11g..

Posted by guest on September 17, 2012 at 06:50 AM GMT-11:00 #

The common way people did DB integration before the Oracle acquisition was via EJBs. There are many sites that show how to create a DB EJB.

Another option is in query there is a DB call out, this is basically used for some complex mappings and enrichment. I'm not sure this is what you are after.

Another option I used before OSB supported the JCA adapter was to create a PL/SQL web service. The easiest way I did that was using JDev as there is an option for a Web service wizard.


Posted by James Taylor on September 17, 2012 at 10:11 AM GMT-11:00 #

I am a bit stuck on step 18 could you elaborate, or show a screenshot of what you put in the source that got rid of the errors.

Posted by guest on October 15, 2012 at 09:58 AM GMT-11:00 #

I think I have made mention of it in comment above.

When you import sometimes the references are incorrect for your project. At the top of your wsdl / jca files have a look at the path and correct for your project.


Posted by James Taylor on October 15, 2012 at 10:22 AM GMT-11:00 #


Can you please let me know is same approach is applicable to OracleAPPSadapter . If it is applicable i want to use as a inbound operation.


Posted by sri on April 15, 2013 at 01:12 PM GMT-11:00 #

Yes it is.


Posted by guest on April 15, 2013 at 01:13 PM GMT-11:00 #

Good day, I'm stuck at step 19, the Oracle Workshop doesn't seem to recognize the jca file =/ so, the option "Oracle Service Bus" does not appear.

Posted by guest on June 28, 2013 at 04:58 AM GMT-11:00 #

Have you installed the OSB plugin for Eclipse. If not have a look at this post.


Posted by guest on June 29, 2013 at 10:31 PM GMT-11:00 #

Ur gr8
tried accessing the page but all the images are not to be seen
can you send me your email
i'm new in sos and trying to use a stored procedure to insert and select data through soa (eclipse and service bus)
can you help

Posted by guest on August 29, 2013 at 09:45 AM GMT-11:00 #

If you use IE the images will apear.

Something happend to all the images when the blog site was upgraded.


Posted by guest on August 29, 2013 at 10:55 AM GMT-11:00 #

I am following the steps as given here but connecting to a SQL Server 2008 database. I created the JDev project, imported the relevant files into eclipse. When I right click on jca file, Oracle Service Bus, the Generate Service is disabled. I am using JDev11.1.1.7 with OEPE which is the correct supported version. Has anyone got this to work with SQL Server DB connection?

Posted by guest on October 29, 2013 at 09:53 AM GMT-11:00 #

Anyone know, how to can i call BRM service using JCA adapter!!


Posted by guest on November 07, 2013 at 05:03 AM GMT-11:00 #

Sorry I don't know BRM, I always thought that BRM exposes APIs via a web service. Is this not the case?


Posted by James Taylor on November 07, 2013 at 01:00 PM GMT-11:00 #

Sorry for the late reply.

If you are using Eclipse you need to make sure that the OSB plugin has been applied. If the Generate Service is disabled this means that your JCA file is invalid. Step 18 I mention this?

Hope this helps

Posted by James on November 07, 2013 at 01:06 PM GMT-11:00 #

Thnak James.

I have a JCA BRM Adapter expose in weblogic server.

BRM is to AIA application and exposes an interface as JCA

I have not JCA,WSDL,XSD files similar to those generated by a dbAdpter for example.

The only way to connect by JCA is taking the 3 files (JCA WSDL, XSd files)?


Posted by guest on November 08, 2013 at 02:12 AM GMT-11:00 #

Sorry I don't believe the BRM JCA adapter is supported in OSB.


Posted by James Taylor on November 10, 2013 at 10:54 PM GMT-11:00 #

I was able to create the JCA adapter for the DB2 database successfully, however when I try to promote the OSB project from DEV to TEST I'm not able to change the DB2 library name using the Customization File.

Please let me know the steps for changing the SQL for promotion.


Posted by Abdul on November 22, 2013 at 10:39 AM GMT-11:00 #

When migrating between environments it is the JNDI name that is used. Best practice on this is to have a naming convention for your JNDI names, ie, for the HR DB you would call it, eis/DB/HR.

What your system administrator would do is create an entry in all environments for eis/DB/HR, but they are pointing to different database. That way you don't need to chnage any configuration at all.

I'm unsure how you have configured the DB2 connection but all you need to do is put the drivers in the classpath of the Weblogic startup scripts and configure the datasource. It should have nothing to do with the OSB deployment.


Posted by James on November 24, 2013 at 01:33 PM GMT-11:00 #

Evil brittle horrible crap. For the new OSB folks out there don’t ever implement this pattern. Ever. Wrap the database calls with a separate layer — even ADF BC models are better than the above and that’s not saying much. James did an amazing job of creating excellent documentation of a process that will be difficult to troubleshoot and incredibly hard to maintain by anyone other than a complete OSB ninja. Just don’t do this.

This takes what should be the lightweight power of a great piece of software (ALSB) and shackles it to a JDBC; plus it creates a stuck thread and throws the WLS into warning. Sure, you can learn how to hack around _that_ next.

And from an architecture standpoint you — the middleware person — have just once again stuck your head into the RDBMS world. Start pushing back on that to make these headless, naked, no services, non-GUI-using databases back to the DML-writing people who created them in the first place.

Posted by Steve Taylor on June 02, 2014 at 07:36 AM GMT-11:00 #

I'm not sure I understand your issue. This is the recommend oracle best practice. Agreed in a 11g world the developer experience was not great but in 12C it is all integrated in JDeveloper.


Posted by guest on November 11, 2014 at 03:33 PM GMT-11:00 #

Post a Comment:
  • HTML Syntax: NOT allowed

Discussions and Examples using Oracle Platform As a Service (PaaS) and Oracle Fusion Middleware. Some image links are broken when using Firefox, Safari, and Chrome. If you want to see the full image please use IE.


tumblr hit counter vistors, thanks for your support


« July 2016