3 Replies Latest reply on Jun 10, 2014 9:38 AM by Laura delli Paoli

    JBPM 6 : Exception on registerWorkItemHandler with RemoteRestRuntimeFactory.

    Ramabathiran Krishnan Newbie

      Hi All,

       

      I am getting exception(.registerWorkItemHandler() method not supported) when register work item handler with ksession created through RemoteRuntimeEngine again created through RemoteRestRuntimeFactory.

       

      Please help on this issue.

       

      Please let me know, is there a way to solve this issue or any other alternative way or workaround it would help me lot.

       

      Thanks,

      Ramabathiran K

        • 1. Re: JBPM 6 : Exception on registerWorkItemHandler with RemoteRestRuntimeFactory.
          Ramabathiran Krishnan Newbie


          Added Log:

          D:\Java\jdk1.6.0_35\bin\java -agentlib:jdwp=transport=dt_socket,address=127.0.0.1:61501,suspend=y,server=n -Dfile.encoding=UTF-8 -classpath "D:\Java\jdk1.6.0_35\jre\lib\charsets.jar;D:\Java\jdk1.6.0_35\jre\lib\deploy.jar;D:\Java\jdk1.6.0_35\jre\lib\javaws.jar;D:\Java\jdk1.6.0_35\jre\lib\jce.jar;D:\Java\jdk1.6.0_35\jre\lib\jsse.jar;D:\Java\jdk1.6.0_35\jre\lib\management-agent.jar;D:\Java\jdk1.6.0_35\jre\lib\plugin.jar;D:\Java\jdk1.6.0_35\jre\lib\resources.jar;D:\Java\jdk1.6.0_35\jre\lib\rt.jar;D:\Java\jdk1.6.0_35\jre\lib\ext\dnsns.jar;D:\Java\jdk1.6.0_35\jre\lib\ext\localedata.jar;D:\Java\jdk1.6.0_35\jre\lib\ext\sunjce_provider.jar;D:\JetBrains\IDEA_Workspace\jBPM\target\classes;C:\Users\krishnr3\.m2\repository\org\kie\remote\kie-services-client\6.0.1.Final\kie-services-client-6.0.1.Final.jar;C:\Users\krishnr3\.m2\repository\org\kie\kie-api\6.0.1.Final\kie-api-6.0.1.Final.jar;C:\Users\krishnr3\.m2\repository\org\slf4j\slf4j-api\1.7.2\slf4j-api-1.7.2.jar;C:\Users\krishnr3\.m2\repository\org\kie\kie-internal\6.0.1.Final\kie-internal-6.0.1.Final.jar;C:\Users\krishnr3\.m2\repository\org\drools\drools-core\6.0.1.Final\drools-core-6.0.1.Final.jar;C:\Users\krishnr3\.m2\repository\org\mvel\mvel2\2.1.8.Final\mvel2-2.1.8.Final.jar;C:\Users\krishnr3\.m2\repository\org\jbpm\jbpm-human-task-core\6.0.1.Final\jbpm-human-task-core-6.0.1.Final.jar;C:\Users\krishnr3\.m2\repository\org\jbpm\jbpm-flow\6.0.1.Final\jbpm-flow-6.0.1.Final.jar;C:\Users\krishnr3\.m2\repository\com\google\protobuf\protobuf-java\2.5.0\protobuf-java-2.5.0.jar;C:\Users\krishnr3\.m2\repository\joda-time\joda-time\1.6.2\joda-time-1.6.2.jar;C:\Users\krishnr3\.m2\repository\javax\activation\activation\1.1.1\activation-1.1.1.jar;C:\Users\krishnr3\.m2\repository\javax\annotation\jsr250-api\1.0\jsr250-api-1.0.jar;C:\Users\krishnr3\.m2\repository\org\drools\drools-persistence-jpa\6.0.1.Final\drools-persistence-jpa-6.0.1.Final.jar;C:\Users\krishnr3\.m2\repository\org\drools\drools-compiler\6.0.1.Final\drools-compiler-6.0.1.Final.jar;C:\Users\krishnr3\.m2\repository\org\antlr\antlr-runtime\3.5\antlr-runtime-3.5.jar;C:\Users\krishnr3\.m2\repository\org\eclipse\jdt\core\compiler\ecj\3.7.2\ecj-3.7.2.jar;C:\Users\krishnr3\.m2\repository\com\thoughtworks\xstream\xstream\1.4.3\xstream-1.4.3.jar;C:\Users\krishnr3\.m2\repository\xmlpull\xmlpull\1.1.3.1\xmlpull-1.1.3.1.jar;C:\Users\krishnr3\.m2\repository\xpp3\xpp3_min\1.1.4c\xpp3_min-1.1.4c.jar;C:\Users\krishnr3\.m2\repository\org\hibernate\javax\persistence\hibernate-jpa-2.0-api\1.0.1.Final\hibernate-jpa-2.0-api-1.0.1.Final.jar;C:\Users\krishnr3\.m2\repository\dom4j\dom4j\1.6.1\dom4j-1.6.1.jar;C:\Users\krishnr3\.m2\repository\xml-apis\xml-apis\1.0.b2\xml-apis-1.0.b2.jar;C:\Users\krishnr3\.m2\repository\org\javassist\javassist\3.15.0-GA\javassist-3.15.0-GA.jar;C:\Users\krishnr3\.m2\repository\javax\transaction\jta\1.1\jta-1.1.jar;C:\Users\krishnr3\.m2\repository\javax\mail\mail\1.4.5\mail-1.4.5.jar;C:\Users\krishnr3\.m2\repository\org\jbpm\jbpm-audit\6.0.1.Final\jbpm-audit-6.0.1.Final.jar;C:\Users\krishnr3\.m2\repository\javax\jms\jms\1.1\jms-1.1.jar;C:\Users\krishnr3\.m2\repository\org\jboss\spec\javax\servlet\jboss-servlet-api_3.0_spec\1.0.2.Final\jboss-servlet-api_3.0_spec-1.0.2.Final.jar;C:\Users\krishnr3\.m2\repository\org\jboss\resteasy\jaxrs-api\2.3.6.Final\jaxrs-api-2.3.6.Final.jar;C:\Users\krishnr3\.m2\repository\org\jboss\resteasy\resteasy-jaxrs\2.3.6.Final\resteasy-jaxrs-2.3.6.Final.jar;C:\Users\krishnr3\.m2\repository\org\scannotation\scannotation\1.0.3\scannotation-1.0.3.jar;C:\Users\krishnr3\.m2\repository\javassist\javassist\3.12.1.GA\javassist-3.12.1.GA.jar;C:\Users\krishnr3\.m2\repository\org\apache\httpcomponents\httpclient\4.1.2\httpclient-4.1.2.jar;C:\Users\krishnr3\.m2\repository\org\apache\httpcomponents\httpcore\4.1.2\httpcore-4.1.2.jar;C:\Users\krishnr3\.m2\repository\commons-codec\commons-codec\1.4\commons-codec-1.4.jar;C:\Users\krishnr3\.m2\repository\commons-io\commons-io\1.4\commons-io-1.4.jar;C:\Users\krishnr3\.m2\repository\net\jcip\jcip-annotations\1.0\jcip-annotations-1.0.jar;C:\Users\krishnr3\.m2\repository\commons-logging\commons-logging\1.1.1\commons-logging-1.1.1.jar;C:\Users\krishnr3\.m2\repository\org\jboss\resteasy\resteasy-jaxb-provider\2.3.6.Final\resteasy-jaxb-provider-2.3.6.Final.jar;C:\Users\krishnr3\.m2\repository\com\sun\xml\bind\jaxb-impl\2.2.5\jaxb-impl-2.2.5.jar;C:\Users\krishnr3\.m2\repository\org\jboss\resteasy\resteasy-jackson-provider\2.3.6.Final\resteasy-jackson-provider-2.3.6.Final.jar;C:\Users\krishnr3\.m2\repository\org\codehaus\jackson\jackson-core-asl\1.9.9\jackson-core-asl-1.9.9.jar;C:\Users\krishnr3\.m2\repository\org\codehaus\jackson\jackson-mapper-asl\1.9.9\jackson-mapper-asl-1.9.9.jar;C:\Users\krishnr3\.m2\repository\org\codehaus\jackson\jackson-jaxrs\1.9.9\jackson-jaxrs-1.9.9.jar;C:\Users\krishnr3\.m2\repository\org\codehaus\jackson\jackson-xc\1.9.9\jackson-xc-1.9.9.jar;C:\Users\krishnr3\.m2\repository\org\kie\kie-ci\6.0.1.Final\kie-ci-6.0.1.Final.jar;C:\Users\krishnr3\.m2\repository\org\apache\maven\maven-core\3.0.5\maven-core-3.0.5.jar;C:\Users\krishnr3\.m2\repository\org\apache\maven\maven-model\3.0.5\maven-model-3.0.5.jar;C:\Users\krishnr3\.m2\repository\org\codehaus\plexus\plexus-utils\2.0.6\plexus-utils-2.0.6.jar;C:\Users\krishnr3\.m2\repository\org\apache\maven\maven-settings\3.0.5\maven-settings-3.0.5.jar;C:\Users\krishnr3\.m2\repository\org\apache\maven\maven-settings-builder\3.0.5\maven-settings-builder-3.0.5.jar;C:\Users\krishnr3\.m2\repository\org\codehaus\plexus\plexus-interpolation\1.14\plexus-interpolation-1.14.jar;C:\Users\krishnr3\.m2\repository\org\codehaus\plexus\plexus-component-annotations\1.5.5\plexus-component-annotations-1.5.5.jar;C:\Users\krishnr3\.m2\repository\org\sonatype\plexus\plexus-sec-dispatcher\1.3\plexus-sec-dispatcher-1.3.jar;C:\Users\krishnr3\.m2\repository\org\sonatype\plexus\plexus-cipher\1.4\plexus-cipher-1.4.jar;C:\Users\krishnr3\.m2\repository\org\apache\maven\maven-repository-metadata\3.0.5\maven-repository-metadata-3.0.5.jar;C:\Users\krishnr3\.m2\repository\org\apache\maven\maven-artifact\3.0.5\maven-artifact-3.0.5.jar;C:\Users\krishnr3\.m2\repository\org\apache\maven\maven-plugin-api\3.0.5\maven-plugin-api-3.0.5.jar;C:\Users\krishnr3\.m2\repository\org\sonatype\sisu\sisu-inject-plexus\2.3.0\sisu-inject-plexus-2.3.0.jar;C:\Users\krishnr3\.m2\repository\org\codehaus\plexus\plexus-classworlds\2.4\plexus-classworlds-2.4.jar;C:\Users\krishnr3\.m2\repository\org\sonatype\sisu\sisu-inject-bean\2.3.0\sisu-inject-bean-2.3.0.jar;C:\Users\krishnr3\.m2\repository\org\sonatype\sisu\sisu-guice\3.1.0\sisu-guice-3.1.0-no_aop.jar;C:\Users\krishnr3\.m2\repository\org\sonatype\sisu\sisu-guava\0.9.9\sisu-guava-0.9.9.jar;C:\Users\krishnr3\.m2\repository\org\apache\maven\maven-model-builder\3.0.5\maven-model-builder-3.0.5.jar;C:\Users\krishnr3\.m2\repository\org\apache\maven\maven-aether-provider\3.0.5\maven-aether-provider-3.0.5.jar;C:\Users\krishnr3\.m2\repository\org\sonatype\aether\aether-api\1.13.1\aether-api-1.13.1.jar;C:\Users\krishnr3\.m2\repository\org\sonatype\aether\aether-spi\1.13.1\aether-spi-1.13.1.jar;C:\Users\krishnr3\.m2\repository\org\sonatype\aether\aether-util\1.13.1\aether-util-1.13.1.jar;C:\Users\krishnr3\.m2\repository\org\sonatype\aether\aether-impl\1.13.1\aether-impl-1.13.1.jar;C:\Users\krishnr3\.m2\repository\org\apache\maven\maven-compat\3.0.5\maven-compat-3.0.5.jar;C:\Users\krishnr3\.m2\repository\org\apache\maven\wagon\wagon-provider-api\2.4\wagon-provider-api-2.4.jar;C:\Users\krishnr3\.m2\repository\org\sonatype\aether\aether-connector-wagon\1.13.1\aether-connector-wagon-1.13.1.jar;C:\Users\krishnr3\.m2\repository\org\sonatype\aether\aether-connector-file\1.13.1\aether-connector-file-1.13.1.jar;C:\Users\krishnr3\.m2\repository\org\sonatype\maven\wagon-ahc\1.2.1\wagon-ahc-1.2.1.jar;C:\Users\krishnr3\.m2\repository\com\ning\async-http-client\1.6.5\async-http-client-1.6.5.jar;C:\Users\krishnr3\.m2\repository\org\jboss\netty\netty\3.2.5.Final\netty-3.2.5.Final.jar;C:\Users\krishnr3\.m2\repository\org\apache\ant\ant\1.8.2\ant-1.8.2.jar;C:\Users\krishnr3\.m2\repository\org\apache\ant\ant-launcher\1.8.2\ant-launcher-1.8.2.jar;D:\JetBrains\IntelliJ IDEA 13.0.2\lib\idea_rt.jar" com.sample.jbpm.JBPMServiceTaskClient Connected to the target VM, address: '127.0.0.1:61501', transport: 'socket' SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder". SLF4J: Defaulting to no-operation (NOP) logger implementation SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details. Disconnected from the target VM, address: '127.0.0.1:61501', transport: 'socket' Exception in thread "main" java.lang.UnsupportedOperationException: The .registerWorkItemHandler(..) method is not supported on the remote api. at org.kie.services.client.api.command.AbstractRemoteCommandObject.execute(AbstractRemoteCommandObject.java:89) at org.drools.core.command.impl.CommandBasedStatefulKnowledgeSession$1.registerWorkItemHandler(CommandBasedStatefulKnowledgeSession.java:161) at com.sample.jbpm.JBPMServiceTaskClient.main(JBPMServiceTaskClient.java:33) Process finished with exit code 1

          • 2. Re: JBPM 6 : Exception on registerWorkItemHandler with RemoteRestRuntimeFactory.
            Maciej Swiderski Master

            RemoteRuntimeEngine is actually a wrapper that is meant to simplify execution of the process remotely. Although it does implement main interfaces (KieSession, TaskService) it does not provide complete implementation for it as they are not matching the execution behavior. Please note that when you interact with engine remotely you interact with already configured engine, so handlers, listeners, etc should be registered on server side and not on client side as how would you like transfer that class instance that you create locally to the server??

             

            HTH

            • 3. Re: JBPM 6 : Exception on registerWorkItemHandler with RemoteRestRuntimeFactory.
              Laura delli Paoli Master

              Hi Maciej,

              I'm facing the same issue, how can I register handlers on server side?

               

              Laura