Some 'more, in-depth' information on Oracle BPEL PM, ESB and other SOA, day2day things

Monday, April 24, 2006

BPEL: Invoking a process from java results in ClassNotFoundException

What classes (and libraries) are needed to invoke a BPEL process through the JAVA api?

Usually the problem is not about the orabpel ones - as they are hard referenced - in your class, but about the dynamic imported ones for JNDI-RMI.

Ok, let's look into the code..
What's happening at runtime of your class?
Based on the properties you have put into the context, the underlying JNDI context layer will try to invoke the defined RMIContext. (bold - shown below)

Hashtable props = new Hashtable();
props.put(Context.PROVIDER_URL, "rmi://localhost/orabpel");
props.put(Context.INITIAL_CONTEXT_FACTORY, "com.evermind.server.rmi.RMIInitialContextFactory");
props.put(Context.SECURITY_PRINCIPAL, "admin");
props.put(Context.SECURITY_CREDENTIALS, "welcome");
props.put("dedicated.connection","true");

Therefor the compiler will not complain at designtime, but at runtime the classloader must have access to these classes.

Which ones do you need?
from an OC4J distribution (if you connect against an Application Server instance add ojdl.jar & optic.jar)

  • activation.jar - j2ee activation

  • mail.jar - j2ee mail

  • oc4j.jar - oc4j core

  • ejb.jar - ejb core

  • jcert.jar - j2ee security

  • jnet.jar - j2ee network impl

  • jsse.jar - j2ee security extension

  • jndi.jar - oc4j jndi impl

  • jta.jar - transactions



From your BPEL distribution

  • orabpel.jar

  • orabpel-common.jar



Note: For the next release we plan to split the orabpell libraries into a client and a server, to bring down the footprint.

Having questions? send your feedback on class com.evermind.server.rmi.RMIInitialContextFactory not found here

0 Comments:

Post a Comment

<< Home