1 Reply Latest reply on Feb 11, 2013 2:28 AM by Maciej Swiderski

    BRMS Could not connect task client

    Jose Miguel Loor Apprentice

      Hi

       

      I have a running BRMS standalone 5.3 server, and i am working on a client to remotely interact with a BPMN2 process

       

      I can succesfully connect to the guvnor repository, and create a persistent StatefulKnowledgeSession.

       

      I my BRMS server, in the jbpm-human-task.war folder, i have these parameters in the web.xml:

       

      <!-- active configuration on of hornetq|mina|jms (defauls to hornetq) -->

            <init-param>

              <param-name>active.config</param-name>

              <param-value></param-value>

            </init-param>

       

      <!-- Apache Mina configuration parameters -->

            <init-param>

              <param-name>mina.host</param-name>

              <param-value>192.168.0.95</param-value>

            </init-param>

            <init-param>

              <param-name>mina.port</param-name>

              <param-value>9123</param-value>

            </init-param>

       

       

            <!-- HornetQ configuration parameters -->

            <init-param>

              <param-name>hornetq.port</param-name>

              <param-value></param-value>

            </init-param>

       

      In my application, i am trying to register a WorkItemHandler with this code:

       

      WSHumanTaskHandler wsHandler = new  WSHumanTaskHandler(ksession);

      wsHandler.setConnection("192.168.0.95", 9123);

      wsHandler.connect();

       

      ksession.getWorkItemManager().registerWorkItemHandler("Human Task", wsHandler);

       

      But that code is giving me this exception:

       

      java.lang.IllegalArgumentException: Could not connect task client

                at org.jbpm.process.workitem.wsht.WSHumanTaskHandler.connect(WSHumanTaskHandler.java:118)

                at com.ndeveloper.rules.client.BRMSKnowledgeProcessRulesHandler.registerWorkItemHandlers(BRMSKnowledgeProcessRulesHandler.java:187)

                at com.ndeveloper.rules.client.BRMSKnowledgeProcessRulesHandler.getKSession(BRMSKnowledgeProcessRulesHandler.java:117)

                at com.ndeveloper.rules.client.BRMSKnowledgeProcessRulesHandler.startProcess(BRMSKnowledgeProcessRulesHandler.java:62)

                at com.ndeveloper.rules.client.ProcessTest.startProcess(ProcessTest.java:32)

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

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

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

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

                at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45)

                at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)

                at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42)

                at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)

                at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)

                at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:30)

                at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263)

                at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68)

                at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47)

                at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)

                at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)

                at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)

                at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)

                at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)

                at org.junit.runners.ParentRunner.run(ParentRunner.java:300)

                at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)

                at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)

                at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)

                at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)

                at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)

                at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)

       

      What is the problem ??