NoClassDefFoundError of dependent jar class during process execution in BPMS

Solution Unverified - Updated -

Issue

  • There is a kjar which depends on a jar. And the jar has dependency on Spring. It is expected that the transitive dependencies will be resolved by maven. But when the process is executed, the Script Task fails with NoClassDefFoundError as shown below.
    How to fix this issue?
java.lang.NoClassDefFoundError: org/springframework/context/ApplicationContext
    at org.jbpm.Process_org$u46$jbpm$u46$sample909675094.action0(Process_org$u46$jbpm$u46$sample909675094.java:18)
    at org.jbpm.Process_org$u46$jbpm$u46$sample909675094Action0Invoker.execute(Process_org$u46$jbpm$u46$sample909675094Action0Invoker.java:14)
    at org.jbpm.workflow.instance.impl.NodeInstanceImpl.executeAction(NodeInstanceImpl.java:182)
    at 
...
Caused by: java.lang.ClassNotFoundException: org.springframework.context.ApplicationContext
    at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
    ... 54 more

Environment

  • Red Hat JBoss BPM Suite (BPMS)
    • 6.0.1

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In