3 Replies Latest reply on Sep 1, 2014 6:01 PM by Prabakar Singaram

    issues about the bpmn2user JBPM5 Web Example

    Feki Ahmed Newbie

      Hi,

      i tryed to make the bpmn2user JBPM5 Web Example running in eclipse and tomcat 6.0.35 (before deploying its war directly in the tomcat webapp directory)

      i thought that i just had to execute it on maven (mvn eclipse) and then import(**) and  run it after setting the bitronix configuration(***) to the server as written in the web page example but i actually have had alot problems :

       

      1)- a classloading problem as servlet .java files were under the src/main/java, i fixed this by changing servlet's packages location to the WebContent/WEB-INF.(i wish to know if i can keep the example builld path show in the example webpage without having that problem but i dont know how..now i still not sure about the right project layout), here is my current layout :

      myprojectlayout.png

       

      2)- alot of missing jars which i had to add to the tomcat/lib directory (i think it s weird that i had to add these same jars whose maven's dependancies were all(or most of them ) written in the pom project file.. tomcat cannot directly use the maven local repository ?!! why tomcat doesn t refer to the pom of the webapp?) here is my current tomcat lib directory (but i still have a NoClassDefFoundError: org/slf4j/LoggerFactory to solve and i may change it again):

      tomcatlib.png

      3) i also have a "cvc-complex-type.2.4.d: Invalid content was found starting with element 'param-name'. No child element is

      expected at this point" on the web.xml which i failed to solve (maybe it doesn t really matter to keep it and run the application )

       

       

      please, , i would like to know more details on these required jars on the tomcat/lib . i wish to find a video tutorial about this interesting example !!

      Thanks.

       

      _______________________

      (**) i set the dynamic web module 2.5 and java 1.6 as project facets in this step.

      (***):the bitronix configuration needs the native library and the APR which was too hard to build with visual studio c++ as it need knowledges on it, the easy solution was to install tomcat from the binary installer.

       

       

      prob.png

        • 1. Re: issues about the bpmn2user JBPM5 Web Example
          Feki Ahmed Newbie

          i ve fixed the project folders layout like this and now i ve the index.jsp displayed :

           

          myprojectlayout.png

           

          i also have resolved slf4j problems  (refering to http://www.slf4j.org/manual.html) and my current tomcat/lib look like this :

           

          tomcatlib.png

           

          finally i ve these problems :

           

           

          SEVERE: StandardWrapper.Throwable

          java.lang.RuntimeException: can't start Mina server

              at com.sample.taskserver.HumanTaskStartupServlet.init(HumanTaskStartupServlet.java:87)

              at javax.servlet.GenericServlet.init(GenericServlet.java:212)

          ...

           

          Caused by: javax.persistence.PersistenceException: [PersistenceUnit: org.jbpm.task] class or package not found

              at org.hibernate.ejb.Ejb3Configuration.addNamedAnnotatedClasses(Ejb3Configuration.java:1093)

              at org.hibernate.ejb.Ejb3Configuration.addClassesToSessionFactory(Ejb3Configuration.java:871)

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

           

           

          Caused by: java.lang.ClassNotFoundException: org.jbpm.task.Attachment

              at java.net.URLClassLoader$1.run(URLClassLoader.java:200)

              at java.security.AccessController.doPrivileged(Native Method)

              at java.net.URLClassLoader.findClass(URLClassLoader.java:188)

              at java.lang.ClassLoader.loadClass(ClassLoader.java:306)

              at java.lang.ClassLoader.loadClass(ClassLoader.java:251)

          ...

          ..

          SEVERE: Servlet /jbpmWebExpl2 threw load() exception

          java.lang.ClassNotFoundException: org.jbpm.task.Attachment

              at java.net.URLClassLoader$1.run(URLClassLoader.java:200)

              at java.security.AccessController.doPrivileged(Native Method)

              at java.net.URLClassLoader.findClass(URLClassLoader.java:188)

              at java.lang.ClassLoader.loadClass(ClassLoader.java:306)

           

          and finally this :

          java.lang.NoClassDefFoundError: org/drools/event/KnowledgeRuntimeEventManager

              at java.lang.Class.getDeclaredConstructors0(Native Method)

              at java.lang.Class.privateGetDeclaredConstructors(Class.java:2389)

              at java.lang.Class.getConstructor0(Class.java:2699)

              at java.lang.Class.newInstance0(Class.java:326)

           

           

          here is my complete console log :

           

          Jun 8, 2012 12:33:39 PM org.apache.catalina.core.AprLifecycleListener init

          INFO: Loaded APR based Apache Tomcat Native library 1.1.22.

          Jun 8, 2012 12:33:39 PM org.apache.catalina.core.AprLifecycleListener init

          INFO: APR capabilities: IPv6 [false], sendfile [true], accept filters [false], random [true].

          Jun 8, 2012 12:33:39 PM org.apache.tomcat.util.digester.SetPropertiesRule begin

          WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:jbpmWebExpl2' did not find a matching property.

          Jun 8, 2012 12:33:40 PM org.apache.coyote.http11.Http11AprProtocol init

          INFO: Initializing Coyote HTTP/1.1 on http-9292

          Jun 8, 2012 12:33:40 PM org.apache.coyote.ajp.AjpAprProtocol init

          INFO: Initializing Coyote AJP/1.3 on ajp-9209

          Jun 8, 2012 12:33:40 PM org.apache.catalina.startup.Catalina load

          INFO: Initialization processed in 1298 ms

          Jun 8, 2012 12:33:40 PM bitronix.tm.integration.tomcat55.BTMLifecycleListener lifecycleEvent

          INFO: Starting Bitronix Transaction Manager

          9 [main] INFO bitronix.tm.BitronixTransactionManager - Bitronix Transaction Manager version 1.3.1

          13 [main] WARN bitronix.tm.Configuration - cannot get this JVM unique ID. Make sure it is configured and you only use ASCII characters. Will use IP address instead (unsafe for production usage!).

          23 [main] INFO bitronix.tm.Configuration - JVM unique ID: <192.168.200.1>

          127 [main] INFO bitronix.tm.recovery.Recoverer - recovery committed 0 dangling transaction(s) and rolled back 0 aborted transaction(s) on 0 resource(s) []

          Jun 8, 2012 12:33:40 PM org.apache.catalina.core.StandardService start

          INFO: Starting service Catalina

          Jun 8, 2012 12:33:40 PM org.apache.catalina.core.StandardEngine start

          INFO: Starting Servlet Engine: Apache Tomcat/6.0.35

          943 [main] INFO org.hibernate.cfg.annotations.Version - Hibernate Annotations 3.4.0.GA

          959 [main] INFO org.hibernate.cfg.Environment - Hibernate 3.3.2.GA

          961 [main] INFO org.hibernate.cfg.Environment - hibernate.properties not found

          964 [main] INFO org.hibernate.cfg.Environment - Bytecode provider name : javassist

          969 [main] INFO org.hibernate.cfg.Environment - using JDK 1.4 java.sql.Timestamp handling

          1071 [main] INFO org.hibernate.annotations.common.Version - Hibernate Commons Annotations 3.1.0.GA

          1075 [main] INFO org.hibernate.ejb.Version - Hibernate EntityManager 3.4.0.GA

          2012-06-08 12:33:41,422 (HumanTaskStartupServlet.java:86) ERROR com.sample.taskserver.HumanTaskStartupServlet - [PersistenceUnit: org.jbpm.task] class or package not found

          java.lang.ClassNotFoundException: org.jbpm.task.Attachment

              at java.net.URLClassLoader$1.run(URLClassLoader.java:200)

              at java.security.AccessController.doPrivileged(Native Method)

              at java.net.URLClassLoader.findClass(URLClassLoader.java:188)

              at java.lang.ClassLoader.loadClass(ClassLoader.java:306)

              at java.lang.ClassLoader.loadClass(ClassLoader.java:251)

              at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)

              at java.lang.Class.forName0(Native Method)

              at java.lang.Class.forName(Class.java:247)

              at org.hibernate.util.ReflectHelper.classForName(ReflectHelper.java:170)

              at org.hibernate.ejb.Ejb3Configuration.classForName(Ejb3Configuration.java:1009)

              at org.hibernate.ejb.Ejb3Configuration.addNamedAnnotatedClasses(Ejb3Configuration.java:1081)

              at org.hibernate.ejb.Ejb3Configuration.addClassesToSessionFactory(Ejb3Configuration.java:871)

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

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

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

              at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:125)

              at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:52)

              at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:34)

              at com.sample.taskserver.HumanTaskStartupServlet.init(HumanTaskStartupServlet.java:64)

              at javax.servlet.GenericServlet.init(GenericServlet.java:212)

              at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1206)

              at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1026)

              at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4421)

              at org.apache.catalina.core.StandardContext.start(StandardContext.java:4734)

              at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)

              at org.apache.catalina.core.StandardHost.start(StandardHost.java:840)

              at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)

              at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)

              at org.apache.catalina.core.StandardService.start(StandardService.java:525)

              at org.apache.catalina.core.StandardServer.start(StandardServer.java:754)

              at org.apache.catalina.startup.Catalina.start(Catalina.java:595)

              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

              at java.lang.reflect.Method.invoke(Method.java:597)

              at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)

              at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)

          Jun 8, 2012 12:33:41 PM org.apache.catalina.core.ApplicationContext log

          SEVERE: StandardWrapper.Throwable

          java.lang.RuntimeException: can't start Mina server

              at com.sample.taskserver.HumanTaskStartupServlet.init(HumanTaskStartupServlet.java:87)

              at javax.servlet.GenericServlet.init(GenericServlet.java:212)

              at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1206)

              at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1026)

              at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4421)

              at org.apache.catalina.core.StandardContext.start(StandardContext.java:4734)

              at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)

              at org.apache.catalina.core.StandardHost.start(StandardHost.java:840)

              at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)

              at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)

              at org.apache.catalina.core.StandardService.start(StandardService.java:525)

              at org.apache.catalina.core.StandardServer.start(StandardServer.java:754)

              at org.apache.catalina.startup.Catalina.start(Catalina.java:595)

              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

              at java.lang.reflect.Method.invoke(Method.java:597)

              at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)

              at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)

          Caused by: javax.persistence.PersistenceException: [PersistenceUnit: org.jbpm.task] class or package not found

              at org.hibernate.ejb.Ejb3Configuration.addNamedAnnotatedClasses(Ejb3Configuration.java:1093)

              at org.hibernate.ejb.Ejb3Configuration.addClassesToSessionFactory(Ejb3Configuration.java:871)

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

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

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

              at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:125)

              at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:52)

              at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:34)

              at com.sample.taskserver.HumanTaskStartupServlet.init(HumanTaskStartupServlet.java:64)

              ... 18 more

          Caused by: java.lang.ClassNotFoundException: org.jbpm.task.Attachment

              at java.net.URLClassLoader$1.run(URLClassLoader.java:200)

              at java.security.AccessController.doPrivileged(Native Method)

              at java.net.URLClassLoader.findClass(URLClassLoader.java:188)

              at java.lang.ClassLoader.loadClass(ClassLoader.java:306)

              at java.lang.ClassLoader.loadClass(ClassLoader.java:251)

              at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)

              at java.lang.Class.forName0(Native Method)

              at java.lang.Class.forName(Class.java:247)

              at org.hibernate.util.ReflectHelper.classForName(ReflectHelper.java:170)

              at org.hibernate.ejb.Ejb3Configuration.classForName(Ejb3Configuration.java:1009)

              at org.hibernate.ejb.Ejb3Configuration.addNamedAnnotatedClasses(Ejb3Configuration.java:1081)

              ... 26 more

          Jun 8, 2012 12:33:41 PM org.apache.catalina.core.StandardContext loadOnStartup

          SEVERE: Servlet /jbpmWebExpl2 threw load() exception

          java.lang.ClassNotFoundException: org.jbpm.task.Attachment

              at java.net.URLClassLoader$1.run(URLClassLoader.java:200)

              at java.security.AccessController.doPrivileged(Native Method)

              at java.net.URLClassLoader.findClass(URLClassLoader.java:188)

              at java.lang.ClassLoader.loadClass(ClassLoader.java:306)

              at java.lang.ClassLoader.loadClass(ClassLoader.java:251)

              at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)

              at java.lang.Class.forName0(Native Method)

              at java.lang.Class.forName(Class.java:247)

              at org.hibernate.util.ReflectHelper.classForName(ReflectHelper.java:170)

              at org.hibernate.ejb.Ejb3Configuration.classForName(Ejb3Configuration.java:1009)

              at org.hibernate.ejb.Ejb3Configuration.addNamedAnnotatedClasses(Ejb3Configuration.java:1081)

              at org.hibernate.ejb.Ejb3Configuration.addClassesToSessionFactory(Ejb3Configuration.java:871)

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

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

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

              at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:125)

              at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:52)

              at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:34)

              at com.sample.taskserver.HumanTaskStartupServlet.init(HumanTaskStartupServlet.java:64)

              at javax.servlet.GenericServlet.init(GenericServlet.java:212)

              at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1206)

              at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1026)

              at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4421)

              at org.apache.catalina.core.StandardContext.start(StandardContext.java:4734)

              at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)

              at org.apache.catalina.core.StandardHost.start(StandardHost.java:840)

              at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)

              at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)

              at org.apache.catalina.core.StandardService.start(StandardService.java:525)

              at org.apache.catalina.core.StandardServer.start(StandardServer.java:754)

              at org.apache.catalina.startup.Catalina.start(Catalina.java:595)

              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

              at java.lang.reflect.Method.invoke(Method.java:597)

              at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)

              at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)

          Jun 8, 2012 12:33:41 PM org.apache.catalina.core.ApplicationContext log

          INFO: Marking servlet TaskProcessServlet as unavailable

          Jun 8, 2012 12:33:41 PM org.apache.catalina.core.StandardContext loadOnStartup

          SEVERE: Servlet /jbpmWebExpl2 threw load() exception

          java.lang.NoClassDefFoundError: org/drools/event/KnowledgeRuntimeEventManager

              at java.lang.Class.getDeclaredConstructors0(Native Method)

              at java.lang.Class.privateGetDeclaredConstructors(Class.java:2389)

              at java.lang.Class.getConstructor0(Class.java:2699)

              at java.lang.Class.newInstance0(Class.java:326)

              at java.lang.Class.newInstance(Class.java:308)

              at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1149)

              at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1026)

              at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4421)

              at org.apache.catalina.core.StandardContext.start(StandardContext.java:4734)

              at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)

              at org.apache.catalina.core.StandardHost.start(StandardHost.java:840)

              at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)

              at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)

              at org.apache.catalina.core.StandardService.start(StandardService.java:525)

              at org.apache.catalina.core.StandardServer.start(StandardServer.java:754)

              at org.apache.catalina.startup.Catalina.start(Catalina.java:595)

              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

              at java.lang.reflect.Method.invoke(Method.java:597)

              at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)

              at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)

          Jun 8, 2012 12:33:41 PM org.apache.coyote.http11.Http11AprProtocol start

          INFO: Starting Coyote HTTP/1.1 on http-9292

          Jun 8, 2012 12:33:41 PM org.apache.coyote.ajp.AjpAprProtocol start

          INFO: Starting Coyote AJP/1.3 on ajp-9209

          Jun 8, 2012 12:33:41 PM org.apache.catalina.startup.Catalina start

          INFO: Server startup in 1349 ms

          • 2. Re: issues about the bpmn2user JBPM5 Web Example
            Feki Ahmed Newbie

            The solution was to add all jars declared on the project pom to the tomcat/lib...i really wonder why they have been declared in the pom if not to be used by the server!!!