Friday, December 4, 2015

BPM: Error While Deploying Business Process with Timer Event

Applicable to FMW 11.1.1.7.0:

Recently I changed JVM to use JDK 1.7 instead of JRockit in one of SOA 11g domains and faced below class not found error when I tried to redeploy a BPM process having Timer event.

Error:
<Dec 1, 2015 2:40:31 AM CST> <Error> <oracle.soa.bpel.engine> <BEA-000000> <post deploy failed for component TestSchedulerProcess
javax.ejb.EJBException: EJB Exception: : java.lang.NoClassDefFoundError: oracle/bpm/runtime/quartz/trigger/TriggerWithReschedule
        at oracle.bpm.bpmn.engine.model.runtime.util.SchedulingHelper.schedule(SchedulingHelper.java:46)
        at oracle.bpm.bpmn.engine.model.TimerStartEventScheduler.schedule(TimerStartEventScheduler.java:172)
        at oracle.bpm.bpmn.engine.ejb.impl.BPMNServerManagerBean.scheduleStartTimerEvents(BPMNServerManagerBean.java:261)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
Caused by: java.lang.ClassNotFoundException: oracle.bpm.runtime.quartz.trigger.TriggerWithReschedule
        at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:297)
        at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:270)

Not sure why WLS failed to load BPM runtime classes. I was able to resolve this issue by adding BPM Runtime JAR's path to CLASSPATH in setDomainEnv.sh file as mentioned below.

Fix: setDomainEnv.sh
PRE_CLASSPATH="/<ORALCE_HOME>/soa_111/soa/modules/oracle.bpm.runtime.classloader-util.jar:${PRE_CLASSPATH}"
export PRE_CLASSPATH