0 Replies Latest reply on Feb 9, 2016 11:26 PM by Forest Gafford

    Eclipse : Exception in thread "main" java.lang.NoClassDefFoundError: org/drools/process/instance/WorkItemHandler

    Forest Gafford Newbie

      Hi all,


      Looking for some help here.


      I am working on an application that will leverage JBPM through the RestAPI functionality. I am also looking to do some service tasks (like send emails) from with JBPM.

      I have gone ahead and imported the Email Service task from here:  Index of /jbpm/v6.0/repository

      Per the documentation found here: Chapter 21. Domain-specific Processes

      I had to add the workitem to the kmodule.xml (documentation did not explicitly mention this, or at least I missed it). 

      The process loads into the web-console but will not run when running test form within Eclipse (where I am developing). Here is the stack trace I am getting:

      Exception in thread "main" java.lang.NoClassDefFoundError: org/drools/process/instance/WorkItemHandler

        at java.lang.ClassLoader.defineClass1(Native Method)

        at java.lang.ClassLoader.defineClass(ClassLoader.java:760)

        at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)

        at java.net.URLClassLoader.defineClass(URLClassLoader.java:467)


        at org.jbpm.process.instance.ProcessRuntimeImpl.startProcess(ProcessRuntimeImpl.java:178)

        at org.drools.core.impl.StatefulKnowledgeSessionImpl.startProcess(StatefulKnowledgeSessionImpl.java:1782)

        at com.fgdc.FgdcProcessMain.startProcess(FgdcProcessMain.java:70)

        at com.fgdc.FgdcProcessMain.main(FgdcProcessMain.java:62)

      Caused by: java.lang.ClassNotFoundException: org.drools.process.instance.WorkItemHandler

        ... 53 more

      [[ full stack trace attached : stacktrace.txt ]]



      From looking at other my inclination is that there is a version issue somewhere. I have tried and tried but I have not been able to correct it. Here are other related info


      My setup:

      Eclipse : JBPM Maven Project

      JBPM Version : 6.3.0Final


           [[ see attached : pom.xml ]]


      Call I am testing from:

           [[ see attached : ProcessTest.java ]]



      <kmodule xmlns="http://jboss.org/kie/6.0.0/kmodule">
        <kbase name="KBase2" default="true" eventProcessingMode="cloud" equalsBehavior="equality" declarativeAgenda="enabled" packages="*">
        <ksession name="KSession2_1" type="stateful" default="true" clockType="realtime">
        <workItemHandler name="Email" type="org.jbpm.process.workitem.email.EmailWorkItemHandler"/>


      Any help is appreciated. I would like to be able to run test