0 Replies Latest reply on Apr 1, 2014 6:39 PM by Jan Stastny

    jBPM 5.4 deploy to JBOSS AS 7 fails with WorkItemHandler ClassNotFoundException

    Jan Stastny Newbie

      Hi,

      I have a project with rules and processes, each checked by a unit test. When running tests, everything works well, but when I try to deploy to JBOSS AS 7.1.1. an error occurs.

      I enclose a log of the whole deploy. The problem arises while linking UnitWorkItemHandler, which is my implementation of WorkItemHandler interface.

      The failure message points at persistence service problem. But I don't have any idea, where to look.

      Any help is appreciated.

       

      EDIT: Tried to remove the UnitWorkItemHandler and its references, but it seems like the error is still in there, only the "victim" of failure message changes. Now it is org.drools.persistence.info.SessionInfo. I won't enclose current stack trace, it is similar to the previous one. But I enclose definition of persistence.xml.

       

      Jan

       

       

       

      00:15:30,491 INFO  [org.jboss.as.repository] (management-handler-thread - 5) JBAS014900: Content added at location C:\jboss-as-7.1.1.Final\standalone\data\content\6f\8360bdf79241dc6b50b6fced1400d6b9e3b5a2\content

      00:15:30,497 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-8) JBAS015876: Starting deployment of "jbpm5_4-0.0.1-SNAPSHOT.jar"

      00:15:30,518 INFO  [org.jboss.as.jpa] (MSC service thread 1-4) JBAS011401: Read persistence.xml for org.jbpm.persistence.jpa

      00:15:30,520 INFO  [org.jboss.as.jpa] (MSC service thread 1-4) JBAS011401: Read persistence.xml for org.drools.persistence.jpa

      00:15:30,558 INFO  [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-8) JBAS010400: Bound data source [jboss/datasources/CivDS]

      00:15:30,559 INFO  [org.jboss.as.jpa] (MSC service thread 1-2) JBAS011402: Starting Persistence Unit Service 'jbpm5_4-0.0.1-SNAPSHOT.jar#org.jbpm.persistence.jpa'

      00:15:30,559 INFO  [org.jboss.as.jpa] (MSC service thread 1-3) JBAS011402: Starting Persistence Unit Service 'jbpm5_4-0.0.1-SNAPSHOT.jar#org.drools.persistence.jpa'

      00:15:30,677 INFO  [org.hibernate.annotations.common.Version] (MSC service thread 1-3) HCANN000001: Hibernate Commons Annotations {4.0.1.Final}

      00:15:30,682 INFO  [org.hibernate.Version] (MSC service thread 1-3) HHH000412: Hibernate Core {4.0.1.Final}

      00:15:30,684 INFO  [org.hibernate.cfg.Environment] (MSC service thread 1-3) HHH000206: hibernate.properties not found

      00:15:30,687 INFO  [org.hibernate.cfg.Environment] (MSC service thread 1-3) HHH000021: Bytecode provider name : javassist

      00:15:30,714 INFO  [org.hibernate.ejb.Ejb3Configuration] (MSC service thread 1-3) HHH000204: Processing PersistenceUnitInfo [

        name: org.drools.persistence.jpa

        ...]

      00:15:30,714 INFO  [org.hibernate.ejb.Ejb3Configuration] (MSC service thread 1-2) HHH000204: Processing PersistenceUnitInfo [

        name: org.jbpm.persistence.jpa

        ...]

      00:15:30,727 WARN  [org.jboss.modules] (MSC service thread 1-2) Failed to define class cz.muni.fi.civ.newohybat.jbpm.itemhandler.UnitWorkItemHandler in Module "deployment.jbpm5_4-0.0.1-SNAPSHOT.jar:main" from Service Module Loader: java.lang.LinkageError: Failed to link cz/muni/fi/civ/newohybat/jbpm/itemhandler/UnitWorkItemHandler (Module "deployment.jbpm5_4-0.0.1-SNAPSHOT.jar:main" from Service Module Loader)

        at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:396)

        at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:243)

        at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:73)

        at org.jboss.modules.Module.loadModuleClass(Module.java:517)

        at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:182)

        at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468)

        at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456)

        at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)

        at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120)

        at org.jboss.as.jpa.hibernate4.HibernateAnnotationScanner.getPackagesInJar(HibernateAnnotationScanner.java:171)

        at org.hibernate.ejb.Ejb3Configuration.addScannedEntries(Ejb3Configuration.java:489) [hibernate-entitymanager-4.0.1.Final.jar:4.0.1.Final]

        at org.hibernate.ejb.Ejb3Configuration.scanForClasses(Ejb3Configuration.java:851) [hibernate-entitymanager-4.0.1.Final.jar:4.0.1.Final]

        at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:596) [hibernate-entitymanager-4.0.1.Final.jar:4.0.1.Final]

        at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:72) [hibernate-entitymanager-4.0.1.Final.jar:4.0.1.Final]

        at org.jboss.as.jpa.service.PersistenceUnitServiceImpl.createContainerEntityManagerFactory(PersistenceUnitServiceImpl.java:162) [jboss-as-jpa-7.1.1.Final.jar:7.1.1.Final]

        at org.jboss.as.jpa.service.PersistenceUnitServiceImpl.start(PersistenceUnitServiceImpl.java:85) [jboss-as-jpa-7.1.1.Final.jar:7.1.1.Final]

        at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811)

        at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746)

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

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

        at java.lang.Thread.run(Thread.java:744) [rt.jar:1.7.0_45]

      Caused by: java.lang.NoClassDefFoundError: org/drools/runtime/process/WorkItemHandler

        at java.lang.ClassLoader.defineClass1(Native Method) [rt.jar:1.7.0_45]

        at java.lang.ClassLoader.defineClass(ClassLoader.java:800) [rt.jar:1.7.0_45]

        at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) [rt.jar:1.7.0_45]

        at org.jboss.modules.ModuleClassLoader.doDefineOrLoadClass(ModuleClassLoader.java:327)

        at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:391)

        ... 20 more

      Caused by: java.lang.ClassNotFoundException: org.drools.runtime.process.WorkItemHandler from [Module "deployment.jbpm5_4-0.0.1-SNAPSHOT.jar:main" from Service Module Loader]

        at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190)

        at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468)

        at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456)

        at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)

        at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120)

        ... 25 more

       

       

      00:15:30,727 WARN  [org.jboss.modules] (MSC service thread 1-3) Failed to define class cz.muni.fi.civ.newohybat.jbpm.itemhandler.UnitWorkItemHandler in Module "deployment.jbpm5_4-0.0.1-SNAPSHOT.jar:main" from Service Module Loader: java.lang.LinkageError: Failed to link cz/muni/fi/civ/newohybat/jbpm/itemhandler/UnitWorkItemHandler (Module "deployment.jbpm5_4-0.0.1-SNAPSHOT.jar:main" from Service Module Loader)

        at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:396)

        at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:243)

        at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:73)

        at org.jboss.modules.Module.loadModuleClass(Module.java:517)

        at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:182)

        at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468)

        at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456)

        at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)

        at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120)

        at org.jboss.as.jpa.hibernate4.HibernateAnnotationScanner.getPackagesInJar(HibernateAnnotationScanner.java:171)

        at org.hibernate.ejb.Ejb3Configuration.addScannedEntries(Ejb3Configuration.java:489) [hibernate-entitymanager-4.0.1.Final.jar:4.0.1.Final]

        at org.hibernate.ejb.Ejb3Configuration.scanForClasses(Ejb3Configuration.java:851) [hibernate-entitymanager-4.0.1.Final.jar:4.0.1.Final]

        at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:596) [hibernate-entitymanager-4.0.1.Final.jar:4.0.1.Final]

        at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:72) [hibernate-entitymanager-4.0.1.Final.jar:4.0.1.Final]

        at org.jboss.as.jpa.service.PersistenceUnitServiceImpl.createContainerEntityManagerFactory(PersistenceUnitServiceImpl.java:162) [jboss-as-jpa-7.1.1.Final.jar:7.1.1.Final]

        at org.jboss.as.jpa.service.PersistenceUnitServiceImpl.start(PersistenceUnitServiceImpl.java:85) [jboss-as-jpa-7.1.1.Final.jar:7.1.1.Final]

        at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811)

        at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746)

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

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

        at java.lang.Thread.run(Thread.java:744) [rt.jar:1.7.0_45]

      Caused by: java.lang.NoClassDefFoundError: org/drools/runtime/process/WorkItemHandler

        at java.lang.ClassLoader.defineClass1(Native Method) [rt.jar:1.7.0_45]

        at java.lang.ClassLoader.defineClass(ClassLoader.java:800) [rt.jar:1.7.0_45]

        at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) [rt.jar:1.7.0_45]

        at org.jboss.modules.ModuleClassLoader.doDefineOrLoadClass(ModuleClassLoader.java:327)

        at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:391)

        ... 20 more

      Caused by: java.lang.ClassNotFoundException: org.drools.runtime.process.WorkItemHandler from [Module "deployment.jbpm5_4-0.0.1-SNAPSHOT.jar:main" from Service Module Loader]

        at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190)

        at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468)

        at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456)

        at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)

        at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120)

        ... 25 more

       

       

      00:15:30,761 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-2) MSC00001: Failed to start service jboss.persistenceunit."jbpm5_4-0.0.1-SNAPSHOT.jar#org.jbpm.persistence.jpa": org.jboss.msc.service.StartException in service jboss.persistenceunit."jbpm5_4-0.0.1-SNAPSHOT.jar#org.jbpm.persistence.jpa": Failed to start service

        at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1767) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]

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

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

        at java.lang.Thread.run(Thread.java:744) [rt.jar:1.7.0_45]

      Caused by: java.lang.RuntimeException: error trying to scan <jar-file>: vfs:/C:/jboss-as-7.1.1.Final/bin/content/jbpm5_4-0.0.1-SNAPSHOT.jar/

        at org.hibernate.ejb.Ejb3Configuration.scanForClasses(Ejb3Configuration.java:854)

        at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:596)

        at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:72)

        at org.jboss.as.jpa.service.PersistenceUnitServiceImpl.createContainerEntityManagerFactory(PersistenceUnitServiceImpl.java:162)

        at org.jboss.as.jpa.service.PersistenceUnitServiceImpl.start(PersistenceUnitServiceImpl.java:85)

        at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]

        at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]

        ... 3 more

      Caused by: java.lang.RuntimeException: JBAS011431: Could not load entity class 'cz.muni.fi.civ.newohybat.jbpm.itemhandler.UnitWorkItemHandler' with PersistenceUnitInfo.getClassLoader()

        at org.jboss.as.jpa.hibernate4.HibernateAnnotationScanner.getPackagesInJar(HibernateAnnotationScanner.java:175)

        at org.hibernate.ejb.Ejb3Configuration.addScannedEntries(Ejb3Configuration.java:489)

        at org.hibernate.ejb.Ejb3Configuration.scanForClasses(Ejb3Configuration.java:851)

        ... 9 more

      Caused by: java.lang.ClassNotFoundException: cz.muni.fi.civ.newohybat.jbpm.itemhandler.UnitWorkItemHandler from [Module "deployment.jbpm5_4-0.0.1-SNAPSHOT.jar:main" from Service Module Loader]

        at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190)

        at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468)

        at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456)

        at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)

        at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120)

        at org.jboss.as.jpa.hibernate4.HibernateAnnotationScanner.getPackagesInJar(HibernateAnnotationScanner.java:171)

        ... 11 more

       

       

      00:15:30,772 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-3) MSC00001: Failed to start service jboss.persistenceunit."jbpm5_4-0.0.1-SNAPSHOT.jar#org.drools.persistence.jpa": org.jboss.msc.service.StartException in service jboss.persistenceunit."jbpm5_4-0.0.1-SNAPSHOT.jar#org.drools.persistence.jpa": Failed to start service

        at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1767) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]

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

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

        at java.lang.Thread.run(Thread.java:744) [rt.jar:1.7.0_45]

      Caused by: java.lang.RuntimeException: error trying to scan <jar-file>: vfs:/C:/jboss-as-7.1.1.Final/bin/content/jbpm5_4-0.0.1-SNAPSHOT.jar/

        at org.hibernate.ejb.Ejb3Configuration.scanForClasses(Ejb3Configuration.java:854)

        at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:596)

        at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:72)

        at org.jboss.as.jpa.service.PersistenceUnitServiceImpl.createContainerEntityManagerFactory(PersistenceUnitServiceImpl.java:162)

        at org.jboss.as.jpa.service.PersistenceUnitServiceImpl.start(PersistenceUnitServiceImpl.java:85)

        at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]

        at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]

        ... 3 more

      Caused by: java.lang.RuntimeException: JBAS011431: Could not load entity class 'cz.muni.fi.civ.newohybat.jbpm.itemhandler.UnitWorkItemHandler' with PersistenceUnitInfo.getClassLoader()

        at org.jboss.as.jpa.hibernate4.HibernateAnnotationScanner.getPackagesInJar(HibernateAnnotationScanner.java:175)

        at org.hibernate.ejb.Ejb3Configuration.addScannedEntries(Ejb3Configuration.java:489)

        at org.hibernate.ejb.Ejb3Configuration.scanForClasses(Ejb3Configuration.java:851)

        ... 9 more

      Caused by: java.lang.ClassNotFoundException: cz.muni.fi.civ.newohybat.jbpm.itemhandler.UnitWorkItemHandler from [Module "deployment.jbpm5_4-0.0.1-SNAPSHOT.jar:main" from Service Module Loader]

        at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190)

        at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468)

        at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456)

        at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)

        at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120)

        at org.jboss.as.jpa.hibernate4.HibernateAnnotationScanner.getPackagesInJar(HibernateAnnotationScanner.java:171)

        ... 11 more

       

       

      00:15:30,791 INFO  [org.jboss.as.server] (management-handler-thread - 5) JBAS015870: Deploy of deployment "jbpm5_4-0.0.1-SNAPSHOT.jar" was rolled back with failure message {"JBAS014671: Failed services" => {"jboss.persistenceunit.\"jbpm5_4-0.0.1-SNAPSHOT.jar#org.drools.persistence.jpa\"" => "org.jboss.msc.service.StartException in service jboss.persistenceunit.\"jbpm5_4-0.0.1-SNAPSHOT.jar#org.drools.persistence.jpa\": Failed to start service","jboss.persistenceunit.\"jbpm5_4-0.0.1-SNAPSHOT.jar#org.jbpm.persistence.jpa\"" => "org.jboss.msc.service.StartException in service jboss.persistenceunit.\"jbpm5_4-0.0.1-SNAPSHOT.jar#org.jbpm.persistence.jpa\": Failed to start service"}}

      00:15:30,798 INFO  [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-7) JBAS010409: Unbound data source [jboss/datasources/CivDS]

      00:15:30,809 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-8) JBAS015877: Stopped deployment jbpm5_4-0.0.1-SNAPSHOT.jar in 18ms

      00:15:30,811 INFO  [org.jboss.as.controller] (management-handler-thread - 5) JBAS014774: Service status report

       

      Zprávu upravil(a): Jan Stastny