1 Reply Latest reply on Apr 14, 2017 7:28 AM by dmarrazzo

    Problem deploying a WAR in Wildfly  - Failed to define class org.jbpm.executor.ejb.impl.ExecutorServiceEJBImpl in Module :

    amalyc

      I am new to JBPM (used in about 10 years ago) and am trying to understand where I am going wrong here

       

      I downloaded the jbpm-6.5.0.Final-installer-full and after considerable effort, adding some system properties to my standalone-full.xml

      I got the jbpm console up and running in the provided separate wildfly installation , pointed at my postgres database

       

      now I have a separate wildfly installation where I had deployed a web app that contains JAX-RS services, that call

      EJB session beans to access my postgres database. These are in two distinct eclipse projects one for the services that references the one

      with the EJBs and the hibernate JPA persistence.xml and the logic to work with the DB.

       

      So I now want to just prove that I can access the "lightweight" JBPM API from the persistence project EJB's  by executing this code snippet in one of the methods invoked by a service

       

       

       

       

       

       

           RuntimeEnvironment environment = RuntimeEnvironmentBuilder.Factory.get().newDefaultInMemoryBuilder().persistence(false).get();

       

      I changed the configuration of that project to be a JBPM project, so the JBPM libraries are added to my build path

      and I added them to the deployment assembly so they will get packaged and be available at runtime (as they do not exist in the modules on the server)

      and I deploy the services project to wildfly, and I see all the relevant JBPM and KIE jars in the directories in the deployments directory of the server

      but no matter what I get this exception on the deployment and it fails

       

      2017-04-13 09:46:45,216 WARN  [org.jboss.modules] (MSC service thread 1-1) Failed to define class org.jbpm.executor.ejb.impl.ExecutorServiceEJBImpl in Module "deployment.OnlineBookingServices.war:main" from Service Module Loader: java.lang.NoClassDefFoundError: Failed to link org/jbpm/executor/ejb/impl/ExecutorServiceEJBImpl (Module "deployment.OnlineBookingServices.war:main" from Service Module Loader): org/jbpm/services/ejb/api/ExecutorServiceEJB
      at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
      at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
      at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
      at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:446)
      at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:274)
      at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:78)
      at org.jboss.modules.Module.loadModuleClass(Module.java:606)
      at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190)
      at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:363)
      at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:351)
      at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:93)
      at java.lang.Class.forName0(Native Method)
      at java.lang.Class.forName(Class.java:348)
      at org.jboss.as.ee.utils.ClassLoadingUtils.loadClass(ClassLoadingUtils.java:21)
      at org.jboss.as.ee.utils.ClassLoadingUtils.loadClass(ClassLoadingUtils.java:14)
      at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.processComponentConfig(InterceptorAnnotationProcessor.java:84)
      at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.deploy(InterceptorAnnotationProcessor.java:76)
      at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:147)
      at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948)
      at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      at java.lang.Thread.run(Thread.java:745)

      2017-04-13 09:46:45,224 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-1) MSC000001: Failed to start service jboss.deployment.unit."OnlineBookingServices.war".POST_MODULE: org.jboss.msc.service.StartException in service jboss.deployment.unit."OnlineBookingServices.war".POST_MODULE: WFLYSRV0153: Failed to process phase POST_MODULE of deployment "OnlineBookingServices.war"
      at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:154)
      at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948)
      at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      at java.lang.Thread.run(Thread.java:745)
      Caused by: java.lang.NoClassDefFoundError: Failed to link org/jbpm/executor/ejb/impl/ExecutorServiceEJBImpl (Module "deployment.OnlineBookingServices.war:main" from Service Module Loader): org/jbpm/services/ejb/api/ExecutorServiceEJB
      at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
      at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
      at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
      at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:446)
      at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:274)
      at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:78)
      at org.jboss.modules.Module.loadModuleClass(Module.java:606)
      at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190)
      at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:363)
      at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:351)
      at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:93)
      at java.lang.Class.forName0(Native Method)
      at java.lang.Class.forName(Class.java:348)
      at org.jboss.as.ee.utils.ClassLoadingUtils.loadClass(ClassLoadingUtils.java:21)
      at org.jboss.as.ee.utils.ClassLoadingUtils.loadClass(ClassLoadingUtils.java:14)
      at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.processComponentConfig(InterceptorAnnotationProcessor.java:84)
      at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.deploy(InterceptorAnnotationProcessor.java:76)
      at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:147)
      ... 5 more

       

      I was missing my my  java:jboss/datasources/jbpmDS in standalone-full.xml but added it in, although I have no persistence.xml for the JBPM

      as I was trying to just verify I could access the API before figuring out ho to merge my domain persistence.xml with the JBPM one.

       

      I am not sure why this is so problematic but I have not been able to find a similar problem online that looks to be related to what I am seeing here.

      any hints would be appreciated, thanks