7 Replies Latest reply on Feb 2, 2012 7:47 AM by Junaid Mohammed

    Using jbpm-human-task-war.war instead of DemoTaskService.class

    Junaid Mohammed Newbie

      Hi,

       

      The JBPM Human Task Service WAR is not actually bundled with the 5.2 full installer.

       

      Nonetheless, I managed to somehow find and grab it from http://repo1.maven.org/maven2/org/jbpm/jbpm-human-task-war/5.2.0.Final/jbpm-human-task-war-5.2.0.Final.war.

       

      It seems to deploy effortlessly on the JBoss AS7 that comes bundled with the 5.2 full installer.

       

      However, switching from running DemoTaskService.class outside of any container, to running the jbpm-human-task-war.war is not so straight-forward as I hoped.

       

      From closer inspection - of the jbpm-human-task-war.war source, it seems that the main class, HumanTaskServiceServlet.java, has identical logic to the DemoTaskService.java.

       

      Therefore, I assumed that the Mina Task Server that is created would still be visible on 127.0.0.1:9123. But this doesn't seem to be the case.

       

      Unfortunately, with no other changes, this still causes a problem for the GWT BPM Console, which reports and error: "Could not connect task client".

       

      Please could you advise what further configuration would be required to be able to use the jbpm-human-task-war.war with the demo setup?

       

      Many thanks.

        • 1. Re: Using jbpm-human-task-war.war instead of DemoTaskService.class
          jemmerling Newbie

          Although I haven't tried it, I think the simple answer is that you would kill the Demo Task Server. This is the reason:

           

          Looking at the code for the WAR, I can see that it launches an instance of MinaTaskServer. If you look at the code for MinaTaskServer, I believe you will see that it is hard-coded to listen at port 9123. To put this in perspective, I believe this can be considered an example of "by convention" behavior as I believe this port number can be overridden however it doesn't require you to specify it, it will just listen at port 9123 "by convention".

           

          So this seems to all be good, however, I don't think the WAR is a good deployment solution because it creates its own thread which is not managed by the Servlet Container - this could make life unpleasant when wanting to stop and start if using the Admin Console, etc.

           

          Hope this helps!

           

          --JE

          • 2. Re: Using jbpm-human-task-war.war instead of DemoTaskService.class
            Chris Melas Apprentice

            Hello,

            Indeed starting a thread within an application server is not a very good idea in general, however it will not necessarily hurt  i.e. in cases that you don't care if the thread are managed by the app server, or you don't want to use resources from the app server context etc.

            At first glance i feel the same with human task war, the thread that starts when the server starts will exist as long as the server runs, even if you could try to start another thread while running, you wouldn't be able because the human task port would be occupied. Of course one could always elaborate a bit on the code and make it managed possibly by using servletcontextlistener, ejb, quartz, spring etc

             

            Regarding the jbpm-human-task-war you may need to add a little code regarding the task callback functionality, to see how just check the code of DemoTaskService and put it in HumanTaskServiceServlet you'll also need the jbpm.usergroup.callback.properties.

             

            I managed to make it  run , since i was getting some  javax.naming.NameNotFoundException: TransactionManager -- service etc in relation to the "Could not connect to task client", by changing the following line within persistence.xml

            from

            <property name="hibernate.transaction.manager_lookup_class" value="org.hibernate.transaction.JBossTransactionManagerLookup" />

            to

            <property name="hibernate.transaction.manager_lookup_class" value="org.jbpm.integration.console.JBPMTransactionManager" />

            you will also need to put in WEB-INF/lib the jbpm-tm.jar found in the folder of your jbpm5.2 jbpm-installer.

            • 3. Re: Using jbpm-human-task-war.war instead of DemoTaskService.class
              Junaid Mohammed Newbie

              JE,

               

              Thanks for your reply.

               

              Yeah I didn't even start the DemoTaskService, which normally happens with ant start.demo.

              Instead I only did ant start.h2 and then ant start.jboss.

              I had already deployed the WAR into the deployments folder of the JBoss AS7 instance.

               

              Unfortunately, didn't work.

              As soon as I turn on the DeomTaskService, with ant start.human.task, everything works fine with no errors.

               

              So something more needs to be done beyond turning off the DemoTaskService.

              • 4. Re: Using jbpm-human-task-war.war instead of DemoTaskService.class
                Junaid Mohammed Newbie

                Chris Melas,

                 

                Thanks for your reply.

                 

                I went away and implemented everything you advised:

                1. Copy callback logic from DemoTaskService.java to HumanTaskServiceServlet.java (making appropriate changes to avoid bugs)

                2. Include the jbpm.usergroup.callback.properties

                3. Alter persistence.xml with the advised changes

                4. Include jbpm-tm.jar in WEB-INF/lib

                 

                I then redeployed the WAR file, but unfortunately, the same exception occured: "Could not connect task client".

                Leaving things as is and starting the DemoTaskService, makes everything work again.

                 

                So I don't know if I have misinterpreted your instructions or perhaps there are further configuration changes that need to be done.

                 

                • 5. Re: Using jbpm-human-task-war.war instead of DemoTaskService.class
                  Chris Melas Apprentice

                  Can you please post what you get on the log of jboss so that we look at the exact exceptions ?

                  Thanks

                  • 6. Re: Using jbpm-human-task-war.war instead of DemoTaskService.class
                    Junaid Mohammed Newbie

                    Here is the error message and app server log output when initially accessing the /jbpm-console context:

                     

                    ERROR_1.PNG

                    14:10:26,530 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/gwt-console-server].[Resteasy]] (http-localhost-127.0.0.1-8080-3) Servlet.service() for servlet Resteasy threw exception: org.jboss.resteasy.spi.UnhandledException: java.lang.IllegalArgumentException: Could not connect task client
                    at org.jboss.resteasy.core.SynchronousDispatcher.unwrapException(SynchronousDispatcher.java:345) [resteasy-jaxrs-2.2.1.GA.jar:]
                    at org.jboss.resteasy.core.SynchronousDispatcher.handleApplicationException(SynchronousDispatcher.java:321) [resteasy-jaxrs-2.2.1.GA.jar:]
                    at org.jboss.resteasy.core.SynchronousDispatcher.handleException(SynchronousDispatcher.java:214) [resteasy-jaxrs-2.2.1.GA.jar:]
                    at org.jboss.resteasy.core.SynchronousDispatcher.handleInvokerException(SynchronousDispatcher.java:190) [resteasy-jaxrs-2.2.1.GA.jar:]
                    at org.jboss.resteasy.core.SynchronousDispatcher.getResponse(SynchronousDispatcher.java:534) [resteasy-jaxrs-2.2.1.GA.jar:]
                    at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:496) [resteasy-jaxrs-2.2.1.GA.jar:]
                    at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:119) [resteasy-jaxrs-2.2.1.GA.jar:]
                    at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:208) [resteasy-jaxrs-2.2.1.GA.jar:]
                    at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:55) [resteasy-jaxrs-2.2.1.GA.jar:]
                    at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:50) [resteasy-jaxrs-2.2.1.GA.jar:]
                    at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [jboss-servlet-api_3.0_spec-1.0.0.Final.jar:1.0.0.Final]
                    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
                    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
                    at org.jboss.bpm.console.server.util.GWTJsonFilter.doFilter(GWTJsonFilter.java:59) [classes:]
                    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
                    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
                    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
                    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
                    at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:139) [jboss-as-web-7.0.2.Final.jar:7.0.2.Final]
                    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:480) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
                    at org.jboss.as.web.NamingValve.invoke(NamingValve.java:57) [jboss-as-web-7.0.2.Final.jar:7.0.2.Final]
                    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:154) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
                    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
                    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
                    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:362) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
                    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
                    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:667) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
                    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:952) [jbossweb-7.0.1.Final.jar:7.0.2.Final]

                     

                    at java.lang.Thread.run(Thread.java:662) [:1.6.0_27]
                    Caused by: java.lang.IllegalArgumentException: Could not connect task client
                    at org.jbpm.integration.console.TaskManagement.connect(TaskManagement.java:71) [jbpm-gwt-core-5.2.0.Final.jar:]
                    at org.jbpm.integration.console.TaskManagement.getAssignedTasks(TaskManagement.java:220) [jbpm-gwt-core-5.2.0.Final.jar:]
                    at org.jboss.bpm.console.server.TaskListFacade.getTasksForIdRef(TaskListFacade.java:101) [classes:]
                    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.6.0_27]
                    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [:1.6.0_27]
                    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_27]

                     

                    at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_27]
                    at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:140) [resteasy-jaxrs-2.2.1.GA.jar:]

                    at org.jboss.resteasy.core.ResourceMethod.invokeOnTarget(ResourceMethod.java:255) [resteasy-jaxrs-2.2.1.GA.jar:]

                    at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:220) [resteasy-jaxrs-2.2.1.GA.jar:]

                    at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:209) [resteasy-jaxrs-2.2.1.GA.jar:]

                    at org.jboss.resteasy.core.SynchronousDispatcher.getResponse(SynchronousDispatcher.java:519) [resteasy-jaxrs-2.2.1.GA.jar:]

                    ... 24 more

                     

                     

                    And then after closing that exception, the following exception is when trying to retrieve the list of processes:

                     

                    ERROR_2.PNG

                    14:34:14,692 INFO  [stdout] (http-localhost-127.0.0.1-8080-6) ERROR 01-02 14:34:14,691 (RepositoryServlet.java:doAuthorizedAction:77)  

                    14:34:14,692 INFO  [stdout] (http-localhost-127.0.0.1-8080-6) java.lang.NullPointerException

                    14:34:14,692 INFO  [stdout] (http-localhost-127.0.0.1-8080-6)  at java.io.OutputStream.write(OutputStream.java:58)

                    14:34:14,692 INFO  [stdout] (http-localhost-127.0.0.1-8080-6)  at org.drools.guvnor.server.files.FileManagerUtils.loadBinaryPackage(FileManagerUtils.java:189)

                    14:34:14,692 INFO  [stdout] (http-localhost-127.0.0.1-8080-6)  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

                    14:34:14,693 INFO  [stdout] (http-localhost-127.0.0.1-8080-6)  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

                    14:34:14,693 INFO  [stdout] (http-localhost-127.0.0.1-8080-6)  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

                    14:34:14,693 INFO  [stdout] (http-localhost-127.0.0.1-8080-6)  at java.lang.reflect.Method.invoke(Method.java:597)

                    14:34:14,693 INFO  [stdout] (http-localhost-127.0.0.1-8080-6)  at org.jboss.seam.util.Reflections.invoke(Reflections.java:22)

                    14:34:14,693 INFO  [stdout] (http-localhost-127.0.0.1-8080-6)  at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:32)

                    14:34:14,693 INFO  [stdout] (http-localhost-127.0.0.1-8080-6)  at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:56)

                    14:34:14,693 INFO  [stdout] (http-localhost-127.0.0.1-8080-6)  at org.jboss.seam.transaction.RollbackInterceptor.aroundInvoke(RollbackInterceptor.java:28)

                    14:34:14,694 INFO  [stdout] (http-localhost-127.0.0.1-8080-6)  at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)

                    14:34:14,694 INFO  [stdout] (http-localhost-127.0.0.1-8080-6)  at org.jboss.seam.core.BijectionInterceptor.aroundInvoke(BijectionInterceptor.java:77)

                    14:34:14,694 INFO  [stdout] (http-localhost-127.0.0.1-8080-6)  at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)

                    14:34:14,694 INFO  [stdout] (http-localhost-127.0.0.1-8080-6)  at org.jboss.seam.core.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:44)

                    14:34:14,694 INFO  [stdout] (http-localhost-127.0.0.1-8080-6)  at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)

                    14:34:14,694 INFO  [stdout] (http-localhost-127.0.0.1-8080-6)  at org.jboss.seam.security.SecurityInterceptor.aroundInvoke(SecurityInterceptor.java:163)

                    14:34:14,695 INFO  [stdout] (http-localhost-127.0.0.1-8080-6)  at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)

                    14:34:14,695 INFO  [stdout] (http-localhost-127.0.0.1-8080-6)  at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:107)

                    14:34:14,695 INFO  [stdout] (http-localhost-127.0.0.1-8080-6)  at org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:185)

                    14:34:14,695 INFO  [stdout] (http-localhost-127.0.0.1-8080-6)  at org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.java:103)

                    14:34:14,695 INFO  [stdout] (http-localhost-127.0.0.1-8080-6)  at org.drools.guvnor.server.files.FileManagerUtils_$$_javassist_seam_10.loadBinaryPackage(FileManagerUtils_$$_javassist_seam_10.java)

                    14:34:14,695 INFO  [stdout] (http-localhost-127.0.0.1-8080-6)  at org.drools.guvnor.server.files.PackageDeploymentServlet$1.execute(PackageDeploymentServlet.java:252)

                    14:34:14,696 INFO  [stdout] (http-localhost-127.0.0.1-8080-6)  at org.drools.guvnor.server.files.RepositoryServlet.doAuthorizedAction(RepositoryServlet.java:75)

                    14:34:14,696 INFO  [stdout] (http-localhost-127.0.0.1-8080-6)  at org.drools.guvnor.server.files.PackageDeploymentServlet.doGet(PackageDeploymentServlet.java:130)

                    14:34:14,696 INFO  [stdout] (http-localhost-127.0.0.1-8080-6)  at javax.servlet.http.HttpServlet.service(HttpServlet.java:742)

                    14:34:14,696 INFO  [stdout] (http-localhost-127.0.0.1-8080-6)  at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)

                    14:34:14,696 INFO  [stdout] (http-localhost-127.0.0.1-8080-6)  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329)

                    14:34:14,696 INFO  [stdout] (http-localhost-127.0.0.1-8080-6)  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)

                    14:34:14,696 INFO  [stdout] (http-localhost-127.0.0.1-8080-6)  at org.jboss.seam.web.ContextFilter$1.process(ContextFilter.java:42)

                    14:34:14,697 INFO  [stdout] (http-localhost-127.0.0.1-8080-6)  at org.jboss.seam.servlet.ContextualHttpServletRequest.run(ContextualHttpServletRequest.java:65)

                    14:34:14,697 INFO  [stdout] (http-localhost-127.0.0.1-8080-6)  at org.jboss.seam.web.ContextFilter.doFilter(ContextFilter.java:37)

                    14:34:14,697 INFO  [stdout] (http-localhost-127.0.0.1-8080-6)  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280)

                    14:34:14,697 INFO  [stdout] (http-localhost-127.0.0.1-8080-6)  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)

                    14:34:14,697 INFO  [stdout] (http-localhost-127.0.0.1-8080-6)  at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275)

                    14:34:14,697 INFO  [stdout] (http-localhost-127.0.0.1-8080-6)  at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161)

                    14:34:14,698 INFO  [stdout] (http-localhost-127.0.0.1-8080-6)  at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:139)

                    14:34:14,698 INFO  [stdout] (http-localhost-127.0.0.1-8080-6)  at org.jboss.as.web.NamingValve.invoke(NamingValve.java:57)

                    14:34:14,698 INFO  [stdout] (http-localhost-127.0.0.1-8080-6)  at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:154)

                    14:34:14,698 INFO  [stdout] (http-localhost-127.0.0.1-8080-6)  at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)

                    14:34:14,699 INFO  [stdout] (http-localhost-127.0.0.1-8080-6)  at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)

                    14:34:14,699 INFO  [stdout] (http-localhost-127.0.0.1-8080-6)  at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:362)

                    14:34:14,699 INFO  [stdout] (http-localhost-127.0.0.1-8080-6)  at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877)

                    14:34:14,699 INFO  [stdout] (http-localhost-127.0.0.1-8080-6)  at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:667)

                    14:34:14,699 INFO  [stdout] (http-localhost-127.0.0.1-8080-6)  at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:952)

                    14:34:14,699 INFO  [stdout] (http-localhost-127.0.0.1-8080-6)  at java.lang.Thread.run(Thread.java:662)

                     

                    14:34:14,701 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/drools-guvnor].[PackageDeploymentServlet]] (http-localhost-127.0.0.1-8080-6) Servlet.service() for servlet PackageDeploymentServlet threw exception: java.lang.NullPointerException

                     

                    at java.io.OutputStream.write(OutputStream.java:58) [:1.6.0_27]

                     

                    at org.drools.guvnor.server.files.FileManagerUtils.loadBinaryPackage(FileManagerUtils.java:189) [classes:]
                    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.6.0_27]
                    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [:1.6.0_27]
                    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_27]
                    at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_27]
                    at org.jboss.seam.util.Reflections.invoke(Reflections.java:22) [jboss-seam-2.2.2.Final.jar:]
                    at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:32) [jboss-seam-2.2.2.Final.jar:]
                    at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:56) [jboss-seam-2.2.2.Final.jar:]
                    at org.jboss.seam.transaction.RollbackInterceptor.aroundInvoke(RollbackInterceptor.java:28) [jboss-seam-2.2.2.Final.jar:]
                    at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68) [jboss-seam-2.2.2.Final.jar:]
                    at org.jboss.seam.core.BijectionInterceptor.aroundInvoke(BijectionInterceptor.java:77) [jboss-seam-2.2.2.Final.jar:]
                    at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68) [jboss-seam-2.2.2.Final.jar:]
                    at org.jboss.seam.core.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:44) [jboss-seam-2.2.2.Final.jar:]
                    at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68) [jboss-seam-2.2.2.Final.jar:]
                    at org.jboss.seam.security.SecurityInterceptor.aroundInvoke(SecurityInterceptor.java:163) [jboss-seam-2.2.2.Final.jar:]
                    at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68) [jboss-seam-2.2.2.Final.jar:]
                    at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:107) [jboss-seam-2.2.2.Final.jar:]
                    at org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:185) [jboss-seam-2.2.2.Final.jar:]
                    at org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.java:103) [jboss-seam-2.2.2.Final.jar:]
                    at org.drools.guvnor.server.files.FileManagerUtils_$$_javassist_seam_10.loadBinaryPackage(FileManagerUtils_$$_javassist_seam_10.java) [classes:]
                    at org.drools.guvnor.server.files.PackageDeploymentServlet$1.execute(PackageDeploymentServlet.java:252) [classes:]
                    at org.drools.guvnor.server.files.RepositoryServlet.doAuthorizedAction(RepositoryServlet.java:75) [classes:]
                    at org.drools.guvnor.server.files.PackageDeploymentServlet.doGet(PackageDeploymentServlet.java:130) [classes:]
                    at javax.servlet.http.HttpServlet.service(HttpServlet.java:742) [jboss-servlet-api_3.0_spec-1.0.0.Final.jar:1.0.0.Final]
                    at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [jboss-servlet-api_3.0_spec-1.0.0.Final.jar:1.0.0.Final]
                    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
                    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
                    at org.jboss.seam.web.ContextFilter$1.process(ContextFilter.java:42) [jboss-seam-2.2.2.Final.jar:]
                    at org.jboss.seam.servlet.ContextualHttpServletRequest.run(ContextualHttpServletRequest.java:65) [jboss-seam-2.2.2.Final.jar:]
                    at org.jboss.seam.web.ContextFilter.doFilter(ContextFilter.java:37) [jboss-seam-2.2.2.Final.jar:]
                    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
                    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
                    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
                    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
                    at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:139) [jboss-as-web-7.0.2.Final.jar:7.0.2.Final]
                    at org.jboss.as.web.NamingValve.invoke(NamingValve.java:57) [jboss-as-web-7.0.2.Final.jar:7.0.2.Final]
                    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:154) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
                    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
                    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
                    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:362) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
                    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
                    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:667) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
                    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:952) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
                    at java.lang.Thread.run(Thread.java:662) [:1.6.0_27]

                    14:34:15,942 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/gwt-console-server].[Resteasy]] (http-localhost-127.0.0.1-8080-1) Servlet.service() for servlet Resteasy threw exception: org.jboss.resteasy.spi.UnhandledException: java.lang.RuntimeException: Could not initialize stateful knowledge session: Could not connect task client

                     

                    at org.jboss.resteasy.core.SynchronousDispatcher.unwrapException(SynchronousDispatcher.java:345) [resteasy-jaxrs-2.2.1.GA.jar:]
                    at org.jboss.resteasy.core.SynchronousDispatcher.handleApplicationException(SynchronousDispatcher.java:321) [resteasy-jaxrs-2.2.1.GA.jar:]
                    at org.jboss.resteasy.core.SynchronousDispatcher.handleException(SynchronousDispatcher.java:214) [resteasy-jaxrs-2.2.1.GA.jar:]
                    at org.jboss.resteasy.core.SynchronousDispatcher.handleInvokerException(SynchronousDispatcher.java:190) [resteasy-jaxrs-2.2.1.GA.jar:]
                    at org.jboss.resteasy.core.SynchronousDispatcher.getResponse(SynchronousDispatcher.java:534) [resteasy-jaxrs-2.2.1.GA.jar:]
                    at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:496) [resteasy-jaxrs-2.2.1.GA.jar:]
                    at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:119) [resteasy-jaxrs-2.2.1.GA.jar:]
                    at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:208) [resteasy-jaxrs-2.2.1.GA.jar:]
                    at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:55) [resteasy-jaxrs-2.2.1.GA.jar:]
                    at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:50) [resteasy-jaxrs-2.2.1.GA.jar:]
                    at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [jboss-servlet-api_3.0_spec-1.0.0.Final.jar:1.0.0.Final]
                    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
                    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
                    at org.jboss.bpm.console.server.util.GWTJsonFilter.doFilter(GWTJsonFilter.java:59) [classes:]
                    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
                    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
                    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
                    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
                    at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:139) [jboss-as-web-7.0.2.Final.jar:7.0.2.Final]
                    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:480) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
                    at org.jboss.as.web.NamingValve.invoke(NamingValve.java:57) [jboss-as-web-7.0.2.Final.jar:7.0.2.Final]
                    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:154) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
                    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
                    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
                    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:362) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
                    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
                    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:667) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
                    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:952) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
                    at java.lang.Thread.run(Thread.java:662) [:1.6.0_27]
                    Caused by: java.lang.RuntimeException: Could not initialize stateful knowledge session: Could not connect task client
                    at org.jbpm.integration.console.CommandDelegate.newStatefulKnowledgeSession(CommandDelegate.java:244) [jbpm-gwt-core-5.2.0.Final.jar:]
                    at org.jbpm.integration.console.CommandDelegate.getSession(CommandDelegate.java:252) [jbpm-gwt-core-5.2.0.Final.jar:]
                    at org.jbpm.integration.console.CommandDelegate.<init>(CommandDelegate.java:92) [jbpm-gwt-core-5.2.0.Final.jar:]
                    at org.jbpm.integration.console.ProcessManagement.<init>(ProcessManagement.java:35) [jbpm-gwt-core-5.2.0.Final.jar:]
                    at org.jbpm.integration.console.ManagementFactory.createProcessManagement(ManagementFactory.java:22) [jbpm-gwt-core-5.2.0.Final.jar:]
                    at org.jbpm.integration.console.ManagementFactory.createProcessManagement(ManagementFactory.java:19) [jbpm-gwt-core-5.2.0.Final.jar:]
                    at org.jboss.bpm.console.server.ProcessMgmtFacade.getProcessManagement(ProcessMgmtFacade.java:86) [classes:]
                    at org.jboss.bpm.console.server.ProcessMgmtFacade.getDefinitionsJSON(ProcessMgmtFacade.java:122) [classes:]
                    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.6.0_27]
                    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [:1.6.0_27]
                    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_27]
                    at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_27]
                    at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:140) [resteasy-jaxrs-2.2.1.GA.jar:]
                    at org.jboss.resteasy.core.ResourceMethod.invokeOnTarget(ResourceMethod.java:255) [resteasy-jaxrs-2.2.1.GA.jar:]
                    at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:220) [resteasy-jaxrs-2.2.1.GA.jar:]
                    at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:209) [resteasy-jaxrs-2.2.1.GA.jar:]
                    at org.jboss.resteasy.core.SynchronousDispatcher.getResponse(SynchronousDispatcher.java:519) [resteasy-jaxrs-2.2.1.GA.jar:]

                     

                    ... 24 more

                    Caused by: java.lang.IllegalArgumentException: Could not connect task client
                    at org.jbpm.process.workitem.wsht.CommandBasedWSHumanTaskHandler.connect(CommandBasedWSHumanTaskHandler.java:84) [jbpm-human-task-5.2.0.Final.jar:]
                    at org.jbpm.integration.console.CommandDelegate.newStatefulKnowledgeSession(CommandDelegate.java:199) [jbpm-gwt-core-5.2.0.Final.jar:]

                     

                    ... 40 more

                    • 7. Re: Using jbpm-human-task-war.war instead of DemoTaskService.class
                      Junaid Mohammed Newbie

                      My apologies, I think the WAR file was not structured properly - I added a top-level folder by mistake:

                       

                      • jbpm-human-task-war.war
                        • jbpm-human-task-war
                          • META-INF
                          • WEB-INF

                       

                       

                      So I removed the top-level folder but, unfortunately, the WAR no longer deploys.

                      Here is the new folder structure:

                       

                      • jbpm-human-task-war.war
                        • META-INF
                          • MANIFEST.MF
                        • WEB-INF
                          • web.xml
                          • classes
                            • META-INF
                              • persistence.xml
                                • <property name="hibernate.transaction.manager_lookup_class" value="org.hibernate.transaction.JBossTransactionManagerLookup" />

                                • <property name="hibernate.transaction.manager_lookup_class" value="org.jbpm.integration.console.JBPMTransactionManager" />

                            • org

                              • jbpm

                                • task

                                  • servlet

                                    • HumanTaskServiceServlet.class

                                    • LoadGroups.mvel

                                    • LoadUsers.mvel

                                    • jbpm.usergroup.callback.properties (EMPTY)

                          • lib

                            • activation-1.1.jar

                            • antlr-2.7.7.jar

                            • commons-collections-3.1.jar

                            • commons-compress-1.0.jar

                            • commons-exec-1.0.1.jar

                            • commons-io-1.4.jar

                            • commons-net-2.0.jar

                            • dom4j-1.6.1.jar

                            • drools-core-5.3.1.Final.jar

                            • ejb3-persistence-1.0.2.GA.jar

                            • el-api-1.2.jar

                            • hibernate-annotations-3.4.0.GA.jar

                            • hibernate-commons-annotations-3.1.0.GA.jar

                            • hibernate-core-3.3.2.GA.jar

                            • hibernate-entitymanager-3.4.0.GA.jar

                            • hornetq-core-2.0.0.GA.jar

                            • javassist-3.14.0-GA.jar

                            • javassist-3.4.GA.jar

                            • jboss-el-1.0_02.CR5.jar

                            • jboss-seam-2.2.2.Final.jar

                            • jbpm-flow-5.2.0.Final.jar

                            • jbpm-human-task-5.2.0.Final.jar

                            • jbpm-tm.jar

                            • jbpm-workitems-5.2.0.Final.jar

                            • jdom-1.0.jar

                            • jta-1.1.jar

                            • knowledge-api-5.3.1.Final.jar

                            • log4j-1.2.14.jar

                            • mail-1.4.jar

                            • mina-core-2.0.1.jar

                            • mvel2-2.1.0.drools4.jar

                            • persistence-api-1.0.jar

                            • rome-0.9.jar

                            • slf4j-api-1.6.0.jar

                            • slf4j-log4j12-1.6.0.jar

                            • smack-3.0.4.jar

                            • xml-apis-1.3.04.jar

                            • xmlpull-1.1.3.1.jar

                            • xpp3_min-1.1.3.4.O.jar

                            • xstream-1.4.1.jar

                      When trying to deploy through the JBoss Administrator, the following error is presented:

                       

                      Unknown error

                       

                      Unexpected HTTP response: 500
                      
                      Request
                      {
                          "address" => [("deployment" => "jbpm-human-task-war.war")],
                          "operation" => "deploy"
                      }
                      
                      Response
                      
                      Internal Server Error
                      {
                          "outcome" => "failed",
                          "failure-description" => {
                              "Failed services" => {"jboss.deployment.unit.\"jbpm-human-task-war.war\".INSTALL" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"jbpm-human-task-war.war\".INSTALL: Failed to process phase INSTALL of deployment \"jbpm-human-task-war.war\""},
                              "Services with missing/unavailable dependencies" => [
                                  "jboss.naming.context.java.module.jbpm-human-task-war.jbpm-human-task-war.ValidatorFactory missing [ jboss.naming.context.java.module.jbpm-human-task-war.jbpm-human-task-war ]",
                                  "jboss.naming.context.java.module.jbpm-human-task-war.jbpm-human-task-war.Validator missing [ jboss.naming.context.java.module.jbpm-human-task-war.jbpm-human-task-war ]"
                              ]
                          },
                          "rolled-back" => true
                      }

                       

                      Is there a missing JAR library which usually contains jboss.naming.context.java.module.jbpm-human-task-war.jbpm-human-task-war.ValidatorFactory and jboss.naming.context.java.module.jbpm-human-task-war.jbpm-human-task-war.Validator?

                      Or is it that the namespaces are not correct?