2 Replies Latest reply on Dec 10, 2014 4:33 PM by Carl Miller

    ClassNotFoundException org.kie.api.runtime.manager.RuntimeManager

    Carl Miller Newbie

      This is all based on jBPM 6.1.0 Final.

       

      I created a maven-based Java application using Netbeans 8.0.1 and used what is documented in http://docs.jboss.org/jbpm/v6.1/userguide/jBPMIntegration.html for my dependencies in the pom.xml file. Things worked fine, classes were resolved, etc.

       

      The code simply consists of this (I'm testing class resolving here, not real functionality):

       

              RuntimeEnvironment environment = RuntimeEnvironmentBuilder.Factory.get()

                                          .newDefaultInMemoryBuilder()

                                          .addAsset(ResourceFactory.newClassPathResource("BPMN2-ScriptTask.bpmn2"), ResourceType.BPMN2)

                                          .get();

              // next create RuntimeManager - in this case singleton strategy is chosen

              RuntimeManager manager = RuntimeManagerFactory.Factory.get().newSingletonRuntimeManager(environment);

       

      Next test was to create a maven-based EJB module, all using the same information as above. No matter how much I've tried, I cannot seem to get past this ClassNotFoundException for the KIE classes.

       

      Here's the error from Wildfly log whenever I deploy the message driven bean that is the EJB module:

       

      2014-12-09 16:36:40,425 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-8) MSC000001: Failed to start service jboss.deployment.unit."SixWkieDemo-1.0-SNAPSHOT.jar".POST_MODULE: org.jboss.msc.service.StartException in service jboss.deployment.unit."SixWkieDemo-1.0-SNAPSHOT.jar".POST_MODULE: JBAS018733: Failed to process phase POST_MODULE of deployment "SixWkieDemo-1.0-SNAPSHOT.jar"

        at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:166) [wildfly-server-8.1.0.Final.jar:8.1.0.Final]

        at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948) [jboss-msc-1.2.2.Final.jar:1.2.2.Final]

        at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881) [jboss-msc-1.2.2.Final.jar:1.2.2.Final]

        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_71]

        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_71]

        at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_71]

      Caused by: java.lang.RuntimeException: JBAS018757: Error getting reflective information for class com.sample.SixWMessageDrivenBean with ClassLoader ModuleClassLoader for Module "deployment.SixWkieDemo-1.0-SNAPSHOT.jar:main" from Service Module Loader

        at org.jboss.as.server.deployment.reflect.DeploymentReflectionIndex.getClassIndex(DeploymentReflectionIndex.java:72) [wildfly-server-8.1.0.Final.jar:8.1.0.Final]

        at org.jboss.as.ee.metadata.MethodAnnotationAggregator.runtimeAnnotationInformation(MethodAnnotationAggregator.java:58)

        at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.handleAnnotations(InterceptorAnnotationProcessor.java:107)

        at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.processComponentConfig(InterceptorAnnotationProcessor.java:92)

        at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.deploy(InterceptorAnnotationProcessor.java:77)

        at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:159) [wildfly-server-8.1.0.Final.jar:8.1.0.Final]

        ... 5 more

      Caused by: java.lang.NoClassDefFoundError: org/kie/api/runtime/manager/RuntimeManager

        at java.lang.Class.getDeclaredMethods0(Native Method) [rt.jar:1.7.0_71]

        at java.lang.Class.privateGetDeclaredMethods(Class.java:2615) [rt.jar:1.7.0_71]

        at java.lang.Class.getDeclaredMethods(Class.java:1860) [rt.jar:1.7.0_71]

        at org.jboss.as.server.deployment.reflect.ClassReflectionIndex.<init>(ClassReflectionIndex.java:65) [wildfly-server-8.1.0.Final.jar:8.1.0.Final]

        at org.jboss.as.server.deployment.reflect.DeploymentReflectionIndex.getClassIndex(DeploymentReflectionIndex.java:68) [wildfly-server-8.1.0.Final.jar:8.1.0.Final]

        ... 10 more

      Caused by: java.lang.ClassNotFoundException: org.kie.api.runtime.manager.RuntimeManager from [Module "deployment.SixWkieDemo-1.0-SNAPSHOT.jar:main" from Service Module Loader]

        at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:213) [jboss-modules.jar:1.3.3.Final]

        at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:459) [jboss-modules.jar:1.3.3.Final]

        at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:408) [jboss-modules.jar:1.3.3.Final]

        at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:389) [jboss-modules.jar:1.3.3.Final]

        at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:134) [jboss-modules.jar:1.3.3.Final]

        ... 15 more

       

      2014-12-09 16:36:40,496 ERROR [org.jboss.as.controller.management-operation] (DeploymentScanner-threads - 1) JBAS014613: Operation ("full-replace-deployment") failed - address: ([]) - failure description: {"JBAS014671: Failed services" => {"jboss.deployment.unit.\"SixWkieDemo-1.0-SNAPSHOT.jar\".POST_MODULE" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"SixWkieDemo-1.0-SNAPSHOT.jar\".POST_MODULE: JBAS018733: Failed to process phase POST_MODULE of deployment \"SixWkieDemo-1.0-SNAPSHOT.jar\"

          Caused by: java.lang.RuntimeException: JBAS018757: Error getting reflective information for class com.sample.SixWMessageDrivenBean with ClassLoader ModuleClassLoader for Module \"deployment.SixWkieDemo-1.0-SNAPSHOT.jar:main\" from Service Module Loader

          Caused by: java.lang.NoClassDefFoundError: org/kie/api/runtime/manager/RuntimeManager

          Caused by: java.lang.ClassNotFoundException: org.kie.api.runtime.manager.RuntimeManager from [Module \"deployment.SixWkieDemo-1.0-SNAPSHOT.jar:main\" from Service Module Loader]"}}

       

      ---------------------------------------------------------------------------------------------------------------------------------

      I've attached my pom.xml file:

      ---------------------------------------------------------------------------------------------------------------------------------

      Could use some hints as 1) I'm a maven noob and 2) I'm a KIE noob, thanks in advance.