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:

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

If you want to use common jars in multiple projects, add the files into classpath of obsetenv.bat or obsetenv.sh 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>
      </property>

    • 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.


13 comments:

Unknown said...

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

Tom.

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 and OIC 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

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

riya said...

Excellant post!!!. The strategy you have posted on this technology helped me to get into the next level and had lot of information in it.
Data Science training in rajaji nagar
Data Science with Python training in chennai
Data Science training in electronic city
Data Science training in USA
Data science training in bangalore

Amelia said...

Thanks a lot for sharing a great blog with a lot of information bout ORACLE keep going on it helped me a lot I have gained a lot of knowledge by reading your blog.

https://smconsultant.com/training/oracle-fusion-middleware/oracle-soa-training/

Amelia said...

Thanks a lot for sharing a great blog with a lot of information about ORACLE keep going on it helped me a lot I have gained a lot of knowledge by reading your blog.
Oracle SOA Training
Oracle SOA 12c Training
Oracle soa online training
Oracle soa course
oracle soa suite training

Yogesh said...

Thanks a lot for sharing a valuable blog on Oracle SOA Training. I was browsing through the internet looking for Oracle SOA Training and came across your blog. I am impressed by the information that you have on this blog. It shows how well you understand this subject, you can find more information about Oracle SOA by attending Oracle SOA Training. You can learn about interview questions by visiting fusion Interview Questions

Michael said...
This comment has been removed by the author.
lakshmibhucynix said...

Im thankful for the article post.Thanks Again. Fantastic.
full stack java developer course
core java online course