Friday, May 9, 2008

How to Make Libraries Available to BPEL Process

I have seen many integration developers struggling with the classpath settings in Oracle SOA Suite. If you don't know the right place to store libraries or the configuration files where you can add required libraries, you can easily waste hours or even days to make libraries available to your BPEL process.

While developing Oracle BPEL Process you need to add the required libraries in Jdeveloper. To add a library in Jdeveloper right click on the BPEL Process project and select “Project Properties” from the context menu. Click on Libraries in the Project Properties tree. From Libraries page you can add a predefined library or you can add jars or folders in the classpath.

If you want to use standalone ant scripts to compile and build your BPEL process flow you need to set classpath in ant build scripts. You need to add libraries in the bpelc task. Add your libraries as given below, add a pathelement for each library:

<pathelement location="Library you want to add into classpath"/>

If you want to use common jars in multiple projects, add the files into classpath of obsetenv.bat or based on the platform you are using to run ant build scripts. Edit the obsetenv file and add the libraries in the MY_CLASSPATH variable. e.g.

set MY_CLASSPATH=%Existing Libraries%;<new libraries>

If you are using Java embedding activity in your BPEL process and this activity is referring classes and jars those are not part of the BPEL suite case , you need to add those libraries in the classpath of BPEL Process compiler. BPEL Process Manager generates Java files and compile them at the deployment time so it is required to set all the referenced libraries in BPEL compilers classpath.

You can add the referenced libraries in BPEL Process compiler's classpath by modifying the domain.xml or from the BPEL Process Manager's Console. I am mentioning both procedures, you can use any of them.

  • Edit Domain Configuration file-
    • Edit <Oracle SOA Home>/bpel/domains/<Domain Name>/config/domain.xml

    • Add referenced libraries the file as given below:
      <property id="bpelcClasspath">
      <name>BPEL process compiler classpath</name>
      <value>list of jars separated by ; or : based on the platform you are using</value>

    • Restart Oracle BPEL Server.

  • Use BPEL Process Manager Console

    • Open BPEL Process Manager Console and click on “Manage BPEL Domain”. Go to Configuration tab.

    • Enter all the referenced libraries(including path of the libraries); in the value field of bpelcClasspath property..

    • Click on Apply button.

    • Restart Oracle BPEL Process Manager..

    After deployment you will definitely want to test the BPEL process. You need to add the required libraries into Oracle Application Server's classpath, so the referenced libraries would be available for your BPEL process at runtime. Follow the steps given below to add libraries into Oracle Application Server's classpath:

  • Open <Oracle Home>/j2ee/home/config/application.xml and find a shared library named oracle.bpel.common.

  • Add <code-source path="Your library path"/> for each required jar file. You can create a separate library and import it inside the oracle.bpel.common shared library.


Tom said...

This article was extremely helpfull for me !!!!! Thanks !!!!


Mohan said...

Thanks for posting such a nice article. It is extremely helpful, keep up the good work

Satappa said...
This comment has been removed by the author.
Satappa said...

I have a question in 11G , I have created a Ejb project which depends on joda-time.jar . Am calling ejb service from my BPEL . AM able to deply the composite but getting Classnotfound exception for the external jar classes when i run the composite.

SOA Technology for beginners and learners said...

its really a good post....

i am need to of deploying more than one bpel process which is dependent i need to deploy in differents servers

Rijesh Valiya Parambath said...

Hi Can you tell me how the same can be done in 11g

Naviya Nair said...

I have read your blog its very attractive and impressive. I like it your blog.

Java Online Training Java EE Online Training Java EE Online Training Java 8 online training Core Java 8 online training

Java Online Training from India Java Online Training from India Core Java Training Online Core Java Training Online Java Training InstitutesJava Training Institutes

john jersy said...

I wanted to thank you for this great read!! I definitely enjoying every little bit of it I have you bookmarked to check out new stuff you article.
python Training institute in Pune
python Training institute in Chennai
python Training institute in Bangalore

sheela said...

Thanks for splitting your comprehension with us. It’s really useful to me & I hope it helps the people who in need of this vital information. 
Best Devops training in sholinganallur
Devops training in velachery
Devops training in annanagar
Devops training in tambaram