12 Replies Latest reply on Feb 10, 2017 10:52 AM by Fernando Pena Cantu

    Creating a text message Service Task

    Fernando Pena Cantu Newbie

      Hello I am  using JBoss BPM Suit 6.4.GA, and I am trying to create a text message service task.

       

      So I created a Jar file called sms-sender-1.0.2. (The POM and code inside the Jar can be found at the end of the message.)

       

      I added this Jar to WEB-INF\lib inside business-central.war and kie-server.war.

       

      Then I modify the kie-wb-deployment-descriptor.xml file inside business-central.war\WEB-INF\classes\META-INF directory to have the new work item handler.

      It look like this:

      <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
      <deployment-descriptor xsi:schemaLocation="http://www.jboss.org/jbpm deployment-descriptor.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
        <persistence-unit>org.jbpm.domain</persistence-unit>
        <audit-persistence-unit>org.jbpm.domain</audit-persistence-unit>
        <audit-mode>JPA</audit-mode>
        <persistence-mode>JPA</persistence-mode>
        <runtime-strategy>SINGLETON</runtime-strategy>
        <marshalling-strategies/>
        <event-listeners/>
        <task-event-listeners/>
        <globals/>
        <work-item-handlers>
          <work-item-handler>
            <resolver>mvel</resolver>
            <identifier>new org.jbpm.process.workitem.bpmn2.ServiceTaskHandler(ksession, classLoader)</identifier>
            <parameters/>
            <name>Service Task</name>
          </work-item-handler>
          <work-item-handler>
            <resolver>mvel</resolver>
            <identifier>new org.jbpm.process.instance.impl.demo.SystemOutWorkItemHandler()</identifier>
            <parameters/>
            <name>Log</name>
          </work-item-handler>
          <work-item-handler>
            <resolver>mvel</resolver>
            <identifier>new org.jbpm.process.workitem.webservice.WebServiceWorkItemHandler(ksession, classLoader)</identifier>
            <parameters/>
            <name>WebService</name>
          </work-item-handler>
          <work-item-handler>
            <resolver>mvel</resolver>
            <identifier>new org.jbpm.process.workitem.rest.RESTWorkItemHandler(classLoader)</identifier>
            <parameters/>
            <name>Rest</name>
        </work-item-handler>
        <work-item-handler>
            <resolver>mvel</resolver>
            <identifier>new org.jugvale.jbpm.workitemhandler.SMSWorkItemHandler()</identifier>
            <parameters/>
            <name>SMS</name>
        </work-item-handler>
        </work-item-handlers>
        <environment-entries/>
        <configurations/>
        <required-roles/>
        <remoteable-classes/>
        <limit-serialization-classes>true</limit-serialization-classes>
      </deployment-descriptor>
      

       

      Then I created a project with business process, and I modify the Work Item Definitions to accommodate the SMS work item handler.

      It looks like this:

       

      import org.drools.core.process.core.datatype.impl.type.StringDataType;
      import org.drools.core.process.core.datatype.impl.type.ObjectDataType;
      
      
      [
        [
          "name" : "Email",
          "parameters" : [
            "From" : new StringDataType(),
            "To" : new StringDataType(),
            "Subject" : new StringDataType(),
            "Body" : new StringDataType()
          ],
          "displayName" : "Email",
          "icon" : "defaultemailicon.gif"
        ],
      
      
        [
          "name" : "Log",
          "parameters" : [
            "Message" : new StringDataType()
          ],
          "displayName" : "Log",
          "icon" : "defaultlogicon.gif"
        ],
        [
          "name" : "WebService",
          "parameters" : [
              "Url" : new StringDataType(),
               "Namespace" : new StringDataType(),
               "Interface" : new StringDataType(),
               "Operation" : new StringDataType(),
               "Parameter" : new StringDataType(),
               "Endpoint" : new StringDataType(),
               "Mode" : new StringDataType()
          ],
          "results" : [
              "Result" : new ObjectDataType(),
          ],
          "displayName" : "WS",
          "icon" : "defaultservicenodeicon.png"
        ],
      
      
        [
          "name" : "Rest",
          "parameters" : [
              "Url" : new StringDataType(),
              "Method" : new StringDataType(),
              "ConnectTimeout" : new StringDataType(),
              "ReadTimeout" : new StringDataType(),
              "Username" : new StringDataType(),
              "Password" : new StringDataType()
          ],
          "results" : [
              "Result" : new ObjectDataType(),
          ],
          "displayName" : "REST",
          "icon" : "defaultservicenodeicon.png"
        ], 
        [
         "name" : "SMS",
         "parameters":[
             "TO": new StringDataType(),
             "TEXT": new StringDataType()],
          "displayName" : "SendSMS!",
          "icon" : "defaultemailicon.gif"
        ] 
      ]
      

       

      So when I try to build the project I get an error saying:

      14:04:49,677 WARN  [org.jbpm.kie.services.impl.KModuleDeploymentService] (http-/127.0.0.1:8080-3) Unexpected error while deploying unit MyRespositor:SMS2:1.0: java.lang.RuntimeException: [Error: com/twilio/rest/api/v2010/account/Message]

      [Near : {... new org.jugvale.jbpm.workitemhandl ....}]

                       ^

      [Line: 1, Column: 5]

        at org.jbpm.kie.services.impl.AbstractDeploymentService.commonDeploy(AbstractDeploymentService.java:161) [jbpm-kie-services-6.5.0.Final-redhat-2.jar:6.5.0.Final-redhat-2]

        at org.jbpm.kie.services.impl.KModuleDeploymentService.deploy(KModuleDeploymentService.java:196) [jbpm-kie-services-6.5.0.Final-redhat-2.jar:6.5.0.Final-redhat-2]

        at org.jbpm.services.cdi.impl.DeploymentServiceCDIImpl$Proxy$_$$_WeldClientProxy.deploy(DeploymentServiceCDIImpl$Proxy$_$$_WeldClientProxy.java) [jbpm-services-cdi-6.5.0.Final-redhat-2.jar:6.5.0.Final-redhat-2]

        at org.jbpm.console.ng.bd.backend.server.DeploymentManagerEntryPointImpl.deploy(DeploymentManagerEntryPointImpl.java:194) [jbpm-console-ng-business-domain-backend-6.5.0.Final-redhat-2.jar:6.5.0.Final-redhat-2]

        at org.jbpm.console.ng.bd.backend.server.DeploymentManagerEntryPointImpl.deploy(DeploymentManagerEntryPointImpl.java:158) [jbpm-console-ng-business-domain-backend-6.5.0.Final-redhat-2.jar:6.5.0.Final-redhat-2]

        at org.jbpm.console.ng.bd.backend.server.DeploymentManagerEntryPointImpl.process(DeploymentManagerEntryPointImpl.java:517) [jbpm-console-ng-business-domain-backend-6.5.0.Final-redhat-2.jar:6.5.0.Final-redhat-2]

        at org.jbpm.console.ng.bd.backend.server.DeploymentManagerEntryPointImpl$Proxy$_$$_WeldClientProxy.process(DeploymentManagerEntryPointImpl$Proxy$_$$_WeldClientProxy.java) [jbpm-console-ng-business-domain-backend-6.5.0.Final-redhat-2.jar:6.5.0.Final-redhat-2]

        at org.kie.workbench.common.services.backend.builder.BuildServiceImpl.doBuildAndDeploy(BuildServiceImpl.java:164) [kie-wb-common-services-backend-6.5.0.Final-redhat-2.jar:6.5.0.Final-redhat-2]

        at org.kie.workbench.common.services.backend.builder.BuildServiceImpl.buildAndDeploy(BuildServiceImpl.java:120) [kie-wb-common-services-backend-6.5.0.Final-redhat-2.jar:6.5.0.Final-redhat-2]

        at org.kie.workbench.common.services.backend.builder.BuildServiceImpl$Proxy$_$$_WeldClientProxy.buildAndDeploy(BuildServiceImpl$Proxy$_$$_WeldClientProxy.java) [kie-wb-common-services-backend-6.5.0.Final-redhat-2.jar:6.5.0.Final-redhat-2]

        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.8.0_71]

        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [rt.jar:1.8.0_71]

        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.8.0_71]

        at java.lang.reflect.Method.invoke(Method.java:497) [rt.jar:1.8.0_71]

        at org.jboss.errai.bus.server.io.AbstractRPCMethodCallback.invokeMethodFromMessage(AbstractRPCMethodCallback.java:48) [errai-bus-3.2.4.Final-redhat-1.jar:3.2.4.Final-redhat-1]

        at org.jboss.errai.bus.server.io.ValueReplyRPCEndpointCallback.callback(ValueReplyRPCEndpointCallback.java:24) [errai-bus-3.2.4.Final-redhat-1.jar:3.2.4.Final-redhat-1]

        at org.jboss.errai.bus.server.io.RemoteServiceCallback.callback(RemoteServiceCallback.java:54) [errai-bus-3.2.4.Final-redhat-1.jar:3.2.4.Final-redhat-1]

        at org.jboss.errai.cdi.server.CDIExtensionPoints$2.callback(CDIExtensionPoints.java:396) [errai-weld-integration-3.0.6.Final-redhat-1.jar:3.0.6.Final-redhat-1]

        at org.jboss.errai.bus.server.DeliveryPlan.deliver(DeliveryPlan.java:47) [errai-bus-3.2.4.Final-redhat-1.jar:3.2.4.Final-redhat-1]

        at org.jboss.errai.bus.server.ServerMessageBusImpl.sendGlobal(ServerMessageBusImpl.java:296) [errai-bus-3.2.4.Final-redhat-1.jar:3.2.4.Final-redhat-1]

        at org.jboss.errai.bus.server.SimpleDispatcher.dispatchGlobal(SimpleDispatcher.java:46) [errai-bus-3.2.4.Final-redhat-1.jar:3.2.4.Final-redhat-1]

        at org.jboss.errai.bus.server.service.ErraiServiceImpl.store(ErraiServiceImpl.java:97) [errai-bus-3.2.4.Final-redhat-1.jar:3.2.4.Final-redhat-1]

        at org.jboss.errai.bus.server.service.ErraiServiceImpl.store(ErraiServiceImpl.java:114) [errai-bus-3.2.4.Final-redhat-1.jar:3.2.4.Final-redhat-1]

        at org.jboss.errai.bus.server.servlet.DefaultBlockingServlet.doPost(DefaultBlockingServlet.java:142) [errai-bus-3.2.4.Final-redhat-1.jar:3.2.4.Final-redhat-1]

        at javax.servlet.http.HttpServlet.service(HttpServlet.java:754) [jboss-servlet-api_3.0_spec-1.0.2.Final-redhat-2.jar:1.0.2.Final-redhat-2]

        at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [jboss-servlet-api_3.0_spec-1.0.2.Final-redhat-2.jar:1.0.2.Final-redhat-2]

        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:295) [jbossweb-7.5.7.Final-redhat-1.jar:7.5.7.Final-redhat-1]

        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) [jbossweb-7.5.7.Final-redhat-1.jar:7.5.7.Final-redhat-1]

        at org.uberfire.ext.security.server.SecureHeadersFilter.doFilter(SecureHeadersFilter.java:69) [uberfire-servlet-security-0.9.0.Final-redhat-3.jar:0.9.0.Final-redhat-3]

        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246) [jbossweb-7.5.7.Final-redhat-1.jar:7.5.7.Final-redhat-1]

        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) [jbossweb-7.5.7.Final-redhat-1.jar:7.5.7.Final-redhat-1]

        at org.uberfire.ext.security.server.SecurityIntegrationFilter.doFilter(SecurityIntegrationFilter.java:57) [uberfire-servlet-security-0.9.0.Final-redhat-3.jar:0.9.0.Final-redhat-3]

        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246) [jbossweb-7.5.7.Final-redhat-1.jar:7.5.7.Final-redhat-1]

        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) [jbossweb-7.5.7.Final-redhat-1.jar:7.5.7.Final-redhat-1]

        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:231) [jbossweb-7.5.7.Final-redhat-1.jar:7.5.7.Final-redhat-1]

        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:149) [jbossweb-7.5.7.Final-redhat-1.jar:7.5.7.Final-redhat-1]

        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:512) [jbossweb-7.5.7.Final-redhat-1.jar:7.5.7.Final-redhat-1]

        at org.jboss.as.jpa.interceptor.WebNonTxEmCloserValve.invoke(WebNonTxEmCloserValve.java:50) [jboss-as-jpa-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21]

        at org.jboss.as.jpa.interceptor.WebNonTxEmCloserValve.invoke(WebNonTxEmCloserValve.java:50) [jboss-as-jpa-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21]

        at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:169) [jboss-as-web-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21]

        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:150) [jbossweb-7.5.7.Final-redhat-1.jar:7.5.7.Final-redhat-1]

        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:97) [jbossweb-7.5.7.Final-redhat-1.jar:7.5.7.Final-redhat-1]

        at org.apache.catalina.authenticator.SingleSignOn.invoke(SingleSignOn.java:419) [jbossweb-7.5.7.Final-redhat-1.jar:7.5.7.Final-redhat-1]

        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:102) [jbossweb-7.5.7.Final-redhat-1.jar:7.5.7.Final-redhat-1]

        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:344) [jbossweb-7.5.7.Final-redhat-1.jar:7.5.7.Final-redhat-1]

        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:854) [jbossweb-7.5.7.Final-redhat-1.jar:7.5.7.Final-redhat-1]

        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:653) [jbossweb-7.5.7.Final-redhat-1.jar:7.5.7.Final-redhat-1]

        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:926) [jbossweb-7.5.7.Final-redhat-1.jar:7.5.7.Final-redhat-1]

        at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_71]

      Caused by: [Error: com/twilio/rest/api/v2010/account/Message]

      [Near : {... new org.jugvale.jbpm.workitemhandl ....}]

                       ^

      [Line: 1, Column: 5]

        at org.mvel2.compiler.ExpressionCompiler._compile(ExpressionCompiler.java:300) [mvel2-2.2.8.Final-redhat-1.jar:]

        at org.mvel2.compiler.ExpressionCompiler.compile(ExpressionCompiler.java:52) [mvel2-2.2.8.Final-redhat-1.jar:]

        at org.mvel2.MVEL.compileExpression(MVEL.java:810) [mvel2-2.2.8.Final-redhat-1.jar:]

        at org.jbpm.runtime.manager.impl.deploy.MVELObjectModelResolver.getInstance(MVELObjectModelResolver.java:58) [jbpm-runtime-manager-6.5.0.Final-redhat-2.jar:6.5.0.Final-redhat-2]

        at org.jbpm.runtime.manager.impl.DefaultRegisterableItemsFactory.getInstanceFromModel(DefaultRegisterableItemsFactory.java:211) [jbpm-runtime-manager-6.5.0.Final-redhat-2.jar:6.5.0.Final-redhat-2]

        at org.jbpm.runtime.manager.impl.DefaultRegisterableItemsFactory.getWorkItemHandlersFromDescriptor(DefaultRegisterableItemsFactory.java:258) [jbpm-runtime-manager-6.5.0.Final-redhat-2.jar:6.5.0.Final-redhat-2]

        at org.jbpm.services.cdi.impl.manager.InjectableRegisterableItemsFactory.getWorkItemHandlers(InjectableRegisterableItemsFactory.java:176) [jbpm-services-cdi-6.5.0.Final-redhat-2.jar:6.5.0.Final-redhat-2]

        at org.jbpm.runtime.manager.impl.AbstractRuntimeManager.registerItems(AbstractRuntimeManager.java:119) [jbpm-runtime-manager-6.5.0.Final-redhat-2.jar:6.5.0.Final-redhat-2]

        at org.jbpm.runtime.manager.impl.SingletonRuntimeManager.init(SingletonRuntimeManager.java:104) [jbpm-runtime-manager-6.5.0.Final-redhat-2.jar:6.5.0.Final-redhat-2]

        at org.jbpm.runtime.manager.impl.RuntimeManagerFactoryImpl.newSingletonRuntimeManager(RuntimeManagerFactoryImpl.java:64) [jbpm-runtime-manager-6.5.0.Final-redhat-2.jar:6.5.0.Final-redhat-2]

        at org.jbpm.services.cdi.impl.manager.RuntimeManagerFactoryCDIImpl$Proxy$_$$_WeldClientProxy.newSingletonRuntimeManager(RuntimeManagerFactoryCDIImpl$Proxy$_$$_WeldClientProxy.java) [jbpm-services-cdi-6.5.0.Final-redhat-2.jar:6.5.0.Final-redhat-2]

        at org.jbpm.kie.services.impl.AbstractDeploymentService.commonDeploy(AbstractDeploymentService.java:134) [jbpm-kie-services-6.5.0.Final-redhat-2.jar:6.5.0.Final-redhat-2]

        ... 48 more

      Caused by: java.lang.NoClassDefFoundError: com/twilio/rest/api/v2010/account/Message

        at java.lang.Class.forName0(Native Method) [rt.jar:1.8.0_71]

        at java.lang.Class.forName(Class.java:348) [rt.jar:1.8.0_71]

        at org.mvel2.ast.NewObjectNode.<init>(NewObjectNode.java:81) [mvel2-2.2.8.Final-redhat-1.jar:]

        at org.mvel2.compiler.AbstractParser.nextToken(AbstractParser.java:379) [mvel2-2.2.8.Final-redhat-1.jar:]

        at org.mvel2.compiler.ExpressionCompiler._compile(ExpressionCompiler.java:111) [mvel2-2.2.8.Final-redhat-1.jar:]

        ... 59 more

      Caused by: java.lang.ClassNotFoundException: com.twilio.rest.api.v2010.account.Message from [Module "deployment.business-central.war:main" from Service Module Loader]

        at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:213) [jboss-modules.jar:1.3.6.Final-redhat-1]

        at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:459) [jboss-modules.jar:1.3.6.Final-redhat-1]

        at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:408) [jboss-modules.jar:1.3.6.Final-redhat-1]

        at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:389) [jboss-modules.jar:1.3.6.Final-redhat-1]

        at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:134) [jboss-modules.jar:1.3.6.Final-redhat-1]

        ... 64 more

       

       

      14:04:49,683 WARN  [org.jbpm.console.ng.bd.backend.server.DeploymentManagerEntryPointImpl] (http-/127.0.0.1:8080-3) Deployment of unit MyRespositor:SMS2:1.0 failed: java.lang.RuntimeException: [Error: com/twilio/rest/api/v2010/account/Message]

      [Near : {... new org.jugvale.jbpm.workitemhandl ....}]

                       ^

      [Line: 1, Column: 5]: java.lang.RuntimeException: java.lang.RuntimeException: [Error: com/twilio/rest/api/v2010/account/Message]

      [Near : {... new org.jugvale.jbpm.workitemhandl ....}]

                       ^

      [Line: 1, Column: 5]

        at org.jbpm.kie.services.impl.KModuleDeploymentService.deploy(KModuleDeploymentService.java:201) [jbpm-kie-services-6.5.0.Final-redhat-2.jar:6.5.0.Final-redhat-2]

        at org.jbpm.services.cdi.impl.DeploymentServiceCDIImpl$Proxy$_$$_WeldClientProxy.deploy(DeploymentServiceCDIImpl$Proxy$_$$_WeldClientProxy.java) [jbpm-services-cdi-6.5.0.Final-redhat-2.jar:6.5.0.Final-redhat-2]

        at org.jbpm.console.ng.bd.backend.server.DeploymentManagerEntryPointImpl.deploy(DeploymentManagerEntryPointImpl.java:194) [jbpm-console-ng-business-domain-backend-6.5.0.Final-redhat-2.jar:6.5.0.Final-redhat-2]

        at org.jbpm.console.ng.bd.backend.server.DeploymentManagerEntryPointImpl.deploy(DeploymentManagerEntryPointImpl.java:158) [jbpm-console-ng-business-domain-backend-6.5.0.Final-redhat-2.jar:6.5.0.Final-redhat-2]

        at org.jbpm.console.ng.bd.backend.server.DeploymentManagerEntryPointImpl.process(DeploymentManagerEntryPointImpl.java:517) [jbpm-console-ng-business-domain-backend-6.5.0.Final-redhat-2.jar:6.5.0.Final-redhat-2]

        at org.jbpm.console.ng.bd.backend.server.DeploymentManagerEntryPointImpl$Proxy$_$$_WeldClientProxy.process(DeploymentManagerEntryPointImpl$Proxy$_$$_WeldClientProxy.java) [jbpm-console-ng-business-domain-backend-6.5.0.Final-redhat-2.jar:6.5.0.Final-redhat-2]

        at org.kie.workbench.common.services.backend.builder.BuildServiceImpl.doBuildAndDeploy(BuildServiceImpl.java:164) [kie-wb-common-services-backend-6.5.0.Final-redhat-2.jar:6.5.0.Final-redhat-2]

        at org.kie.workbench.common.services.backend.builder.BuildServiceImpl.buildAndDeploy(BuildServiceImpl.java:120) [kie-wb-common-services-backend-6.5.0.Final-redhat-2.jar:6.5.0.Final-redhat-2]

        at org.kie.workbench.common.services.backend.builder.BuildServiceImpl$Proxy$_$$_WeldClientProxy.buildAndDeploy(BuildServiceImpl$Proxy$_$$_WeldClientProxy.java) [kie-wb-common-services-backend-6.5.0.Final-redhat-2.jar:6.5.0.Final-redhat-2]

        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.8.0_71]

        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [rt.jar:1.8.0_71]

        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.8.0_71]

        at java.lang.reflect.Method.invoke(Method.java:497) [rt.jar:1.8.0_71]

        at org.jboss.errai.bus.server.io.AbstractRPCMethodCallback.invokeMethodFromMessage(AbstractRPCMethodCallback.java:48) [errai-bus-3.2.4.Final-redhat-1.jar:3.2.4.Final-redhat-1]

        at org.jboss.errai.bus.server.io.ValueReplyRPCEndpointCallback.callback(ValueReplyRPCEndpointCallback.java:24) [errai-bus-3.2.4.Final-redhat-1.jar:3.2.4.Final-redhat-1]

        at org.jboss.errai.bus.server.io.RemoteServiceCallback.callback(RemoteServiceCallback.java:54) [errai-bus-3.2.4.Final-redhat-1.jar:3.2.4.Final-redhat-1]

        at org.jboss.errai.cdi.server.CDIExtensionPoints$2.callback(CDIExtensionPoints.java:396) [errai-weld-integration-3.0.6.Final-redhat-1.jar:3.0.6.Final-redhat-1]

        at org.jboss.errai.bus.server.DeliveryPlan.deliver(DeliveryPlan.java:47) [errai-bus-3.2.4.Final-redhat-1.jar:3.2.4.Final-redhat-1]

        at org.jboss.errai.bus.server.ServerMessageBusImpl.sendGlobal(ServerMessageBusImpl.java:296) [errai-bus-3.2.4.Final-redhat-1.jar:3.2.4.Final-redhat-1]

        at org.jboss.errai.bus.server.SimpleDispatcher.dispatchGlobal(SimpleDispatcher.java:46) [errai-bus-3.2.4.Final-redhat-1.jar:3.2.4.Final-redhat-1]

        at org.jboss.errai.bus.server.service.ErraiServiceImpl.store(ErraiServiceImpl.java:97) [errai-bus-3.2.4.Final-redhat-1.jar:3.2.4.Final-redhat-1]

        at org.jboss.errai.bus.server.service.ErraiServiceImpl.store(ErraiServiceImpl.java:114) [errai-bus-3.2.4.Final-redhat-1.jar:3.2.4.Final-redhat-1]

        at org.jboss.errai.bus.server.servlet.DefaultBlockingServlet.doPost(DefaultBlockingServlet.java:142) [errai-bus-3.2.4.Final-redhat-1.jar:3.2.4.Final-redhat-1]

        at javax.servlet.http.HttpServlet.service(HttpServlet.java:754) [jboss-servlet-api_3.0_spec-1.0.2.Final-redhat-2.jar:1.0.2.Final-redhat-2]

        at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [jboss-servlet-api_3.0_spec-1.0.2.Final-redhat-2.jar:1.0.2.Final-redhat-2]

        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:295) [jbossweb-7.5.7.Final-redhat-1.jar:7.5.7.Final-redhat-1]

        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) [jbossweb-7.5.7.Final-redhat-1.jar:7.5.7.Final-redhat-1]

        at org.uberfire.ext.security.server.SecureHeadersFilter.doFilter(SecureHeadersFilter.java:69) [uberfire-servlet-security-0.9.0.Final-redhat-3.jar:0.9.0.Final-redhat-3]

        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246) [jbossweb-7.5.7.Final-redhat-1.jar:7.5.7.Final-redhat-1]

        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) [jbossweb-7.5.7.Final-redhat-1.jar:7.5.7.Final-redhat-1]

        at org.uberfire.ext.security.server.SecurityIntegrationFilter.doFilter(SecurityIntegrationFilter.java:57) [uberfire-servlet-security-0.9.0.Final-redhat-3.jar:0.9.0.Final-redhat-3]

        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246) [jbossweb-7.5.7.Final-redhat-1.jar:7.5.7.Final-redhat-1]

        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) [jbossweb-7.5.7.Final-redhat-1.jar:7.5.7.Final-redhat-1]

        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:231) [jbossweb-7.5.7.Final-redhat-1.jar:7.5.7.Final-redhat-1]

        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:149) [jbossweb-7.5.7.Final-redhat-1.jar:7.5.7.Final-redhat-1]

        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:512) [jbossweb-7.5.7.Final-redhat-1.jar:7.5.7.Final-redhat-1]

        at org.jboss.as.jpa.interceptor.WebNonTxEmCloserValve.invoke(WebNonTxEmCloserValve.java:50) [jboss-as-jpa-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21]

        at org.jboss.as.jpa.interceptor.WebNonTxEmCloserValve.invoke(WebNonTxEmCloserValve.java:50) [jboss-as-jpa-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21]

        at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:169) [jboss-as-web-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21]

        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:150) [jbossweb-7.5.7.Final-redhat-1.jar:7.5.7.Final-redhat-1]

        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:97) [jbossweb-7.5.7.Final-redhat-1.jar:7.5.7.Final-redhat-1]

        at org.apache.catalina.authenticator.SingleSignOn.invoke(SingleSignOn.java:419) [jbossweb-7.5.7.Final-redhat-1.jar:7.5.7.Final-redhat-1]

        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:102) [jbossweb-7.5.7.Final-redhat-1.jar:7.5.7.Final-redhat-1]

        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:344) [jbossweb-7.5.7.Final-redhat-1.jar:7.5.7.Final-redhat-1]

        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:854) [jbossweb-7.5.7.Final-redhat-1.jar:7.5.7.Final-redhat-1]

        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:653) [jbossweb-7.5.7.Final-redhat-1.jar:7.5.7.Final-redhat-1]

        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:926) [jbossweb-7.5.7.Final-redhat-1.jar:7.5.7.Final-redhat-1]

        at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_71]

      Caused by: java.lang.RuntimeException: [Error: com/twilio/rest/api/v2010/account/Message]

      [Near : {... new org.jugvale.jbpm.workitemhandl ....}]

                       ^

      [Line: 1, Column: 5]

        at org.jbpm.kie.services.impl.AbstractDeploymentService.commonDeploy(AbstractDeploymentService.java:161) [jbpm-kie-services-6.5.0.Final-redhat-2.jar:6.5.0.Final-redhat-2]

        at org.jbpm.kie.services.impl.KModuleDeploymentService.deploy(KModuleDeploymentService.java:196) [jbpm-kie-services-6.5.0.Final-redhat-2.jar:6.5.0.Final-redhat-2]

        ... 47 more

      Caused by: [Error: com/twilio/rest/api/v2010/account/Message]

      [Near : {... new org.jugvale.jbpm.workitemhandl ....}]

                       ^

      [Line: 1, Column: 5]

        at org.mvel2.compiler.ExpressionCompiler._compile(ExpressionCompiler.java:300) [mvel2-2.2.8.Final-redhat-1.jar:]

        at org.mvel2.compiler.ExpressionCompiler.compile(ExpressionCompiler.java:52) [mvel2-2.2.8.Final-redhat-1.jar:]

        at org.mvel2.MVEL.compileExpression(MVEL.java:810) [mvel2-2.2.8.Final-redhat-1.jar:]

        at org.jbpm.runtime.manager.impl.deploy.MVELObjectModelResolver.getInstance(MVELObjectModelResolver.java:58) [jbpm-runtime-manager-6.5.0.Final-redhat-2.jar:6.5.0.Final-redhat-2]

        at org.jbpm.runtime.manager.impl.DefaultRegisterableItemsFactory.getInstanceFromModel(DefaultRegisterableItemsFactory.java:211) [jbpm-runtime-manager-6.5.0.Final-redhat-2.jar:6.5.0.Final-redhat-2]

        at org.jbpm.runtime.manager.impl.DefaultRegisterableItemsFactory.getWorkItemHandlersFromDescriptor(DefaultRegisterableItemsFactory.java:258) [jbpm-runtime-manager-6.5.0.Final-redhat-2.jar:6.5.0.Final-redhat-2]

        at org.jbpm.services.cdi.impl.manager.InjectableRegisterableItemsFactory.getWorkItemHandlers(InjectableRegisterableItemsFactory.java:176) [jbpm-services-cdi-6.5.0.Final-redhat-2.jar:6.5.0.Final-redhat-2]

        at org.jbpm.runtime.manager.impl.AbstractRuntimeManager.registerItems(AbstractRuntimeManager.java:119) [jbpm-runtime-manager-6.5.0.Final-redhat-2.jar:6.5.0.Final-redhat-2]

        at org.jbpm.runtime.manager.impl.SingletonRuntimeManager.init(SingletonRuntimeManager.java:104) [jbpm-runtime-manager-6.5.0.Final-redhat-2.jar:6.5.0.Final-redhat-2]

        at org.jbpm.runtime.manager.impl.RuntimeManagerFactoryImpl.newSingletonRuntimeManager(RuntimeManagerFactoryImpl.java:64) [jbpm-runtime-manager-6.5.0.Final-redhat-2.jar:6.5.0.Final-redhat-2]

        at org.jbpm.services.cdi.impl.manager.RuntimeManagerFactoryCDIImpl$Proxy$_$$_WeldClientProxy.newSingletonRuntimeManager(RuntimeManagerFactoryCDIImpl$Proxy$_$$_WeldClientProxy.java) [jbpm-services-cdi-6.5.0.Final-redhat-2.jar:6.5.0.Final-redhat-2]

        at org.jbpm.kie.services.impl.AbstractDeploymentService.commonDeploy(AbstractDeploymentService.java:134) [jbpm-kie-services-6.5.0.Final-redhat-2.jar:6.5.0.Final-redhat-2]

        ... 48 more

      Caused by: java.lang.NoClassDefFoundError: com/twilio/rest/api/v2010/account/Message

        at java.lang.Class.forName0(Native Method) [rt.jar:1.8.0_71]

        at java.lang.Class.forName(Class.java:348) [rt.jar:1.8.0_71]

        at org.mvel2.ast.NewObjectNode.<init>(NewObjectNode.java:81) [mvel2-2.2.8.Final-redhat-1.jar:]

        at org.mvel2.compiler.AbstractParser.nextToken(AbstractParser.java:379) [mvel2-2.2.8.Final-redhat-1.jar:]

        at org.mvel2.compiler.ExpressionCompiler._compile(ExpressionCompiler.java:111) [mvel2-2.2.8.Final-redhat-1.jar:]

        ... 59 more

      Caused by: java.lang.ClassNotFoundException: com.twilio.rest.api.v2010.account.Message from [Module "deployment.business-central.war:main" from Service Module Loader]

        at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:213) [jboss-modules.jar:1.3.6.Final-redhat-1]

        at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:459) [jboss-modules.jar:1.3.6.Final-redhat-1]

        at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:408) [jboss-modules.jar:1.3.6.Final-redhat-1]

        at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:389) [jboss-modules.jar:1.3.6.Final-redhat-1]

        at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:134) [jboss-modules.jar:1.3.6.Final-redhat-1]

        ... 64 more

       

       

      14:04:49,691 ERROR [org.jbpm.console.ng.bd.backend.server.DeploymentManagerEntryPointImpl] (http-/127.0.0.1:8080-3) Deployment of unit MyRespositor:SMS2:1.0 failed: java.lang.RuntimeException: [Error: com/twilio/rest/api/v2010/account/Message]

      [Near : {... new org.jugvale.jbpm.workitemhandl ....}]

                       ^

      [Line: 1, Column: 5]: org.jbpm.console.ng.bd.exception.DeploymentException: java.lang.RuntimeException: [Error: com/twilio/rest/api/v2010/account/Message]

      [Near : {... new org.jugvale.jbpm.workitemhandl ....}]

                       ^

      [Line: 1, Column: 5]

        at org.jbpm.console.ng.bd.backend.server.DeploymentManagerEntryPointImpl.deploy(DeploymentManagerEntryPointImpl.java:203) [jbpm-console-ng-business-domain-backend-6.5.0.Final-redhat-2.jar:6.5.0.Final-redhat-2]

        at org.jbpm.console.ng.bd.backend.server.DeploymentManagerEntryPointImpl.deploy(DeploymentManagerEntryPointImpl.java:158) [jbpm-console-ng-business-domain-backend-6.5.0.Final-redhat-2.jar:6.5.0.Final-redhat-2]

        at org.jbpm.console.ng.bd.backend.server.DeploymentManagerEntryPointImpl.process(DeploymentManagerEntryPointImpl.java:517) [jbpm-console-ng-business-domain-backend-6.5.0.Final-redhat-2.jar:6.5.0.Final-redhat-2]

        at org.jbpm.console.ng.bd.backend.server.DeploymentManagerEntryPointImpl$Proxy$_$$_WeldClientProxy.process(DeploymentManagerEntryPointImpl$Proxy$_$$_WeldClientProxy.java) [jbpm-console-ng-business-domain-backend-6.5.0.Final-redhat-2.jar:6.5.0.Final-redhat-2]

        at org.kie.workbench.common.services.backend.builder.BuildServiceImpl.doBuildAndDeploy(BuildServiceImpl.java:164) [kie-wb-common-services-backend-6.5.0.Final-redhat-2.jar:6.5.0.Final-redhat-2]

        at org.kie.workbench.common.services.backend.builder.BuildServiceImpl.buildAndDeploy(BuildServiceImpl.java:120) [kie-wb-common-services-backend-6.5.0.Final-redhat-2.jar:6.5.0.Final-redhat-2]

        at org.kie.workbench.common.services.backend.builder.BuildServiceImpl$Proxy$_$$_WeldClientProxy.buildAndDeploy(BuildServiceImpl$Proxy$_$$_WeldClientProxy.java) [kie-wb-common-services-backend-6.5.0.Final-redhat-2.jar:6.5.0.Final-redhat-2]

        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.8.0_71]

        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [rt.jar:1.8.0_71]

        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.8.0_71]

        at java.lang.reflect.Method.invoke(Method.java:497) [rt.jar:1.8.0_71]

        at org.jboss.errai.bus.server.io.AbstractRPCMethodCallback.invokeMethodFromMessage(AbstractRPCMethodCallback.java:48) [errai-bus-3.2.4.Final-redhat-1.jar:3.2.4.Final-redhat-1]

        at org.jboss.errai.bus.server.io.ValueReplyRPCEndpointCallback.callback(ValueReplyRPCEndpointCallback.java:24) [errai-bus-3.2.4.Final-redhat-1.jar:3.2.4.Final-redhat-1]

        at org.jboss.errai.bus.server.io.RemoteServiceCallback.callback(RemoteServiceCallback.java:54) [errai-bus-3.2.4.Final-redhat-1.jar:3.2.4.Final-redhat-1]

        at org.jboss.errai.cdi.server.CDIExtensionPoints$2.callback(CDIExtensionPoints.java:396) [errai-weld-integration-3.0.6.Final-redhat-1.jar:3.0.6.Final-redhat-1]

        at org.jboss.errai.bus.server.DeliveryPlan.deliver(DeliveryPlan.java:47) [errai-bus-3.2.4.Final-redhat-1.jar:3.2.4.Final-redhat-1]

        at org.jboss.errai.bus.server.ServerMessageBusImpl.sendGlobal(ServerMessageBusImpl.java:296) [errai-bus-3.2.4.Final-redhat-1.jar:3.2.4.Final-redhat-1]

        at org.jboss.errai.bus.server.SimpleDispatcher.dispatchGlobal(SimpleDispatcher.java:46) [errai-bus-3.2.4.Final-redhat-1.jar:3.2.4.Final-redhat-1]

        at org.jboss.errai.bus.server.service.ErraiServiceImpl.store(ErraiServiceImpl.java:97) [errai-bus-3.2.4.Final-redhat-1.jar:3.2.4.Final-redhat-1]

        at org.jboss.errai.bus.server.service.ErraiServiceImpl.store(ErraiServiceImpl.java:114) [errai-bus-3.2.4.Final-redhat-1.jar:3.2.4.Final-redhat-1]

        at org.jboss.errai.bus.server.servlet.DefaultBlockingServlet.doPost(DefaultBlockingServlet.java:142) [errai-bus-3.2.4.Final-redhat-1.jar:3.2.4.Final-redhat-1]

        at javax.servlet.http.HttpServlet.service(HttpServlet.java:754) [jboss-servlet-api_3.0_spec-1.0.2.Final-redhat-2.jar:1.0.2.Final-redhat-2]

        at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [jboss-servlet-api_3.0_spec-1.0.2.Final-redhat-2.jar:1.0.2.Final-redhat-2]

        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:295) [jbossweb-7.5.7.Final-redhat-1.jar:7.5.7.Final-redhat-1]

        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) [jbossweb-7.5.7.Final-redhat-1.jar:7.5.7.Final-redhat-1]

        at org.uberfire.ext.security.server.SecureHeadersFilter.doFilter(SecureHeadersFilter.java:69) [uberfire-servlet-security-0.9.0.Final-redhat-3.jar:0.9.0.Final-redhat-3]

        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246) [jbossweb-7.5.7.Final-redhat-1.jar:7.5.7.Final-redhat-1]

        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) [jbossweb-7.5.7.Final-redhat-1.jar:7.5.7.Final-redhat-1]

        at org.uberfire.ext.security.server.SecurityIntegrationFilter.doFilter(SecurityIntegrationFilter.java:57) [uberfire-servlet-security-0.9.0.Final-redhat-3.jar:0.9.0.Final-redhat-3]

        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246) [jbossweb-7.5.7.Final-redhat-1.jar:7.5.7.Final-redhat-1]

        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) [jbossweb-7.5.7.Final-redhat-1.jar:7.5.7.Final-redhat-1]

        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:231) [jbossweb-7.5.7.Final-redhat-1.jar:7.5.7.Final-redhat-1]

        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:149) [jbossweb-7.5.7.Final-redhat-1.jar:7.5.7.Final-redhat-1]

        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:512) [jbossweb-7.5.7.Final-redhat-1.jar:7.5.7.Final-redhat-1]

        at org.jboss.as.jpa.interceptor.WebNonTxEmCloserValve.invoke(WebNonTxEmCloserValve.java:50) [jboss-as-jpa-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21]

        at org.jboss.as.jpa.interceptor.WebNonTxEmCloserValve.invoke(WebNonTxEmCloserValve.java:50) [jboss-as-jpa-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21]

        at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:169) [jboss-as-web-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21]

        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:150) [jbossweb-7.5.7.Final-redhat-1.jar:7.5.7.Final-redhat-1]

        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:97) [jbossweb-7.5.7.Final-redhat-1.jar:7.5.7.Final-redhat-1]

        at org.apache.catalina.authenticator.SingleSignOn.invoke(SingleSignOn.java:419) [jbossweb-7.5.7.Final-redhat-1.jar:7.5.7.Final-redhat-1]

        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:102) [jbossweb-7.5.7.Final-redhat-1.jar:7.5.7.Final-redhat-1]

        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:344) [jbossweb-7.5.7.Final-redhat-1.jar:7.5.7.Final-redhat-1]

        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:854) [jbossweb-7.5.7.Final-redhat-1.jar:7.5.7.Final-redhat-1]

        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:653) [jbossweb-7.5.7.Final-redhat-1.jar:7.5.7.Final-redhat-1]

        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:926) [jbossweb-7.5.7.Final-redhat-1.jar:7.5.7.Final-redhat-1]

        at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_71]

      Caused by: java.lang.RuntimeException: java.lang.RuntimeException: [Error: com/twilio/rest/api/v2010/account/Message]

      [Near : {... new org.jugvale.jbpm.workitemhandl ....}]

                       ^

      [Line: 1, Column: 5]

        at org.jbpm.kie.services.impl.KModuleDeploymentService.deploy(KModuleDeploymentService.java:201) [jbpm-kie-services-6.5.0.Final-redhat-2.jar:6.5.0.Final-redhat-2]

        at org.jbpm.services.cdi.impl.DeploymentServiceCDIImpl$Proxy$_$$_WeldClientProxy.deploy(DeploymentServiceCDIImpl$Proxy$_$$_WeldClientProxy.java) [jbpm-services-cdi-6.5.0.Final-redhat-2.jar:6.5.0.Final-redhat-2]

        at org.jbpm.console.ng.bd.backend.server.DeploymentManagerEntryPointImpl.deploy(DeploymentManagerEntryPointImpl.java:194) [jbpm-console-ng-business-domain-backend-6.5.0.Final-redhat-2.jar:6.5.0.Final-redhat-2]

        ... 45 more

      Caused by: java.lang.RuntimeException: [Error: com/twilio/rest/api/v2010/account/Message]

      [Near : {... new org.jugvale.jbpm.workitemhandl ....}]

                       ^

      [Line: 1, Column: 5]

        at org.jbpm.kie.services.impl.AbstractDeploymentService.commonDeploy(AbstractDeploymentService.java:161) [jbpm-kie-services-6.5.0.Final-redhat-2.jar:6.5.0.Final-redhat-2]

        at org.jbpm.kie.services.impl.KModuleDeploymentService.deploy(KModuleDeploymentService.java:196) [jbpm-kie-services-6.5.0.Final-redhat-2.jar:6.5.0.Final-redhat-2]

        ... 47 more

      Caused by: [Error: com/twilio/rest/api/v2010/account/Message]

      [Near : {... new org.jugvale.jbpm.workitemhandl ....}]

                       ^

      [Line: 1, Column: 5]

        at org.mvel2.compiler.ExpressionCompiler._compile(ExpressionCompiler.java:300) [mvel2-2.2.8.Final-redhat-1.jar:]

        at org.mvel2.compiler.ExpressionCompiler.compile(ExpressionCompiler.java:52) [mvel2-2.2.8.Final-redhat-1.jar:]

        at org.mvel2.MVEL.compileExpression(MVEL.java:810) [mvel2-2.2.8.Final-redhat-1.jar:]

        at org.jbpm.runtime.manager.impl.deploy.MVELObjectModelResolver.getInstance(MVELObjectModelResolver.java:58) [jbpm-runtime-manager-6.5.0.Final-redhat-2.jar:6.5.0.Final-redhat-2]

        at org.jbpm.runtime.manager.impl.DefaultRegisterableItemsFactory.getInstanceFromModel(DefaultRegisterableItemsFactory.java:211) [jbpm-runtime-manager-6.5.0.Final-redhat-2.jar:6.5.0.Final-redhat-2]

        at org.jbpm.runtime.manager.impl.DefaultRegisterableItemsFactory.getWorkItemHandlersFromDescriptor(DefaultRegisterableItemsFactory.java:258) [jbpm-runtime-manager-6.5.0.Final-redhat-2.jar:6.5.0.Final-redhat-2]

        at org.jbpm.services.cdi.impl.manager.InjectableRegisterableItemsFactory.getWorkItemHandlers(InjectableRegisterableItemsFactory.java:176) [jbpm-services-cdi-6.5.0.Final-redhat-2.jar:6.5.0.Final-redhat-2]

        at org.jbpm.runtime.manager.impl.AbstractRuntimeManager.registerItems(AbstractRuntimeManager.java:119) [jbpm-runtime-manager-6.5.0.Final-redhat-2.jar:6.5.0.Final-redhat-2]

        at org.jbpm.runtime.manager.impl.SingletonRuntimeManager.init(SingletonRuntimeManager.java:104) [jbpm-runtime-manager-6.5.0.Final-redhat-2.jar:6.5.0.Final-redhat-2]

        at org.jbpm.runtime.manager.impl.RuntimeManagerFactoryImpl.newSingletonRuntimeManager(RuntimeManagerFactoryImpl.java:64) [jbpm-runtime-manager-6.5.0.Final-redhat-2.jar:6.5.0.Final-redhat-2]

        at org.jbpm.services.cdi.impl.manager.RuntimeManagerFactoryCDIImpl$Proxy$_$$_WeldClientProxy.newSingletonRuntimeManager(RuntimeManagerFactoryCDIImpl$Proxy$_$$_WeldClientProxy.java) [jbpm-services-cdi-6.5.0.Final-redhat-2.jar:6.5.0.Final-redhat-2]

        at org.jbpm.kie.services.impl.AbstractDeploymentService.commonDeploy(AbstractDeploymentService.java:134) [jbpm-kie-services-6.5.0.Final-redhat-2.jar:6.5.0.Final-redhat-2]

        ... 48 more

      Caused by: java.lang.NoClassDefFoundError: com/twilio/rest/api/v2010/account/Message

        at java.lang.Class.forName0(Native Method) [rt.jar:1.8.0_71]

        at java.lang.Class.forName(Class.java:348) [rt.jar:1.8.0_71]

        at org.mvel2.ast.NewObjectNode.<init>(NewObjectNode.java:81) [mvel2-2.2.8.Final-redhat-1.jar:]

        at org.mvel2.compiler.AbstractParser.nextToken(AbstractParser.java:379) [mvel2-2.2.8.Final-redhat-1.jar:]

        at org.mvel2.compiler.ExpressionCompiler._compile(ExpressionCompiler.java:111) [mvel2-2.2.8.Final-redhat-1.jar:]

        ... 59 more

      Caused by: java.lang.ClassNotFoundException: com.twilio.rest.api.v2010.account.Message from [Module "deployment.business-central.war:main" from Service Module Loader]

        at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:213) [jboss-modules.jar:1.3.6.Final-redhat-1]

        at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:459) [jboss-modules.jar:1.3.6.Final-redhat-1]

        at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:408) [jboss-modules.jar:1.3.6.Final-redhat-1]

        at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:389) [jboss-modules.jar:1.3.6.Final-redhat-1]

        at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:134) [jboss-modules.jar:1.3.6.Final-redhat-1]

        ... 64 more

       

       

      So com/twilio/rest/api/v2010/account/Message is a class inside the twilio application which I am using to send the messages. The thing is I open that class and there is no line new org.jugvale.jbpm.workitemhandl.. on it.

      the line new org.jugvale.jbpm.workitemhandl.. is my package and it should not be there. I am unsure why a line like this gets created inside the com/twilio/rest/api/v2010/account/Message class. This does not happen when I run the jar on eclipse.

      The problem only occurs when I run it thought the Jboss BPM Suit.

       

      My Java class:

      package org.jugvale.jbpm.workitemhandler;
      import org.drools.core.process.instance.WorkItemHandler;
      import org.kie.api.runtime.process.WorkItem;
      import org.kie.api.runtime.process.WorkItemManager;
      import com.twilio.Twilio;
      import com.twilio.rest.api.v2010.account.Message;
      import com.twilio.type.PhoneNumber;
      import java.net.URI;
      import java.net.URISyntaxException;
      
      // the XXXXXX or #### is not how it is supposed to be.
      // I just added that because the account sid is private information.
      public class SMSWorkItemHandler implements WorkItemHandler {
        public static final String ACCOUNT_SID = "XXXXXXXXXXXXXXXXXXXXZZZZ";
        public static final String AUTH_TOKEN = "XXXXXXXXXXXXXXXXXXXXXXXXXX";
        public static final String FROM = "+##############";
      
        public void abortWorkItem(WorkItem wi, WorkItemManager wim) {
        System.out.println("Oh something went wrong");
      
        }
      
      
        public void executeWorkItem(WorkItem wi, WorkItemManager wim) {
      
        String to = (String)wi.getParameter("TO");
        String text = (String)wi.getParameter("TEXT");
      
      
        assert to != null: "to can't be null";
        assert text != null: "text cant be null";
      
      
        SendSMS(to,text);
      
      
        System.out.println("Message has been succesfully sent");
        System.out.println("To: "+to);
        System.out.println("From: "+FROM);
        System.out.println("Text: "+text);
      
        wim.completeWorkItem(wi.getId(), null);
        }
      
        public void SendSMS(String to, String text)
        {
        Twilio.init(ACCOUNT_SID, AUTH_TOKEN);
      
        Message message = Message
                   .creator(new PhoneNumber(to),  // to
                            new PhoneNumber(FROM),  // from
                            text)
                   .create();
        }
      
      
        public void SendSMS(String to, String text, String MediaURL)
        {
        Twilio.init(ACCOUNT_SID, AUTH_TOKEN);
        try {
        Message message = Message
                   .creator(new PhoneNumber("to"),  // to
                            new PhoneNumber(FROM),  // from
                            text)
                   .setMediaUrl(new URI(MediaURL))
                   .create();
        } catch (URISyntaxException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
        }
        }
      }
      

       

       

      My POM:

      <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
        <modelVersion>4.0.0</modelVersion>
      
      
        <groupId>org.jugvale.jbpm.workitemhandler</groupId>
        <artifactId>sms-sender</artifactId>
        <version>1.0.2</version>
        <packaging>jar</packaging>
      
      
        <name>sms-sender</name>
      
      
        <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        </properties>
      
      
        <dependencies>
        <dependency>
        <groupId>org.jbpm</groupId>
        <artifactId>jbpm-flow</artifactId>
        <version>6.0.1.Final</version>
        <scope>provided</scope>
        </dependency>
        <dependency>
        <groupId>com.twilio.sdk</groupId>
        <artifactId>twilio</artifactId>
        <version>(7.0,7.9)</version>
        </dependency>
        <dependency>
          <groupId>com.google.guava</groupId>
          <artifactId>guava</artifactId>
          <version>18.0</version>
        </dependency>
        <dependency>
        <groupId>joda-time</groupId>
        <artifactId>joda-time</artifactId>
        <version>2.5</version>
        </dependency>
        <dependency>
        <groupId>io.jsonwebtoken</groupId>
        <artifactId>jjwt</artifactId>
        <version>0.4</version>
        </dependency>
        <dependency>
        <groupId>org.apache.httpcomponents</groupId>
        <artifactId>httpclient</artifactId>
        <version>4.5.2</version>
        </dependency>
        <dependency>
        <groupId>org.apache.httpcomponents</groupId>
        <artifactId>httpcore</artifactId>
        <version>4.4.4</version>
        </dependency>
        <dependency>
        <groupId>com.fasterxml.jackson.core</groupId>
        <artifactId>jackson-core</artifactId>
        <version>2.4.3</version>
        </dependency>
        <dependency>
        <groupId>com.fasterxml.jackson.core</groupId>
        <artifactId>jackson-annotations</artifactId>
        <version>2.4.3</version>
        </dependency>
        <dependency>
        <groupId>com.fasterxml.jackson.core</groupId>
        <artifactId>jackson-databind</artifactId>
        <version>2.4.3</version>
        </dependency>
        <dependency>
        <groupId>javax.xml.bind</groupId>
        <artifactId>jaxb-api</artifactId>
        <version>2.2</version>
        </dependency>
        <dependency>
        <groupId>org.jmockit</groupId>
        <artifactId>jmockit</artifactId>
        <version>1.12</version>
        <scope>test</scope>
        </dependency>
        <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>4.11</version>
        <scope>test</scope>
        </dependency>
        <dependency>
        <groupId>commons-logging</groupId>
        <artifactId>commons-logging</artifactId>
        <version>1.2</version>
        </dependency>
        <dependency>
        <groupId>org.codehaus.jackson</groupId>
        <artifactId>jackson-core-asl</artifactId>
        <version>1.9.3</version>
        </dependency>
        <dependency>
        <groupId>org.kie</groupId>
        <artifactId>kie-internal</artifactId>
        <version>6.0.1.Final</version>
        </dependency>
        <dependency>
        <groupId>org.apache.commons</groupId>
        <artifactId>commons-lang3</artifactId>
        <version>3.3.2</version>
        </dependency>
        </dependencies>
      </project>
      

       

      Message was edited by: Fernando Pena Cantu I removed the static in the method public void SendSMS(String to, String text). The jar file in Jboss Bpm suit does not have the static. the only reason why it was there is because I was testing the class on eclipse and I forgot to removing when pasting the code into this discussion.

       

      Unfortunately I can't give you guys my jar file as it contains sensitive information. such as the ACCOUNT_SID, AUTH_TOKEN and any message you guys send will be directed to my phone number. So I think the best way for you guys to test my project is if I give you guys my maven project without my ACCOUNT_SID, AUTH_TOKEN  etc. and you guys fill them with your information. I have attached my maven project as a winzip file. You guys can extracted and import it into eclipse to make modification required. The only things you guys need to change is the ACCOUNT_SID, AUTH_TOKEN and From (this is the phone number were messages will be send from) inside the class SMSWorkItemHandler. Once you fill the information you can make this project into a jar file buy running it as a maven project with the goal package.

       

      To get a new ACCOUNT_SID, AUTH_TOKEN and From phone number you guy need to create an account on twilio, It take 5 minutes and I left details instruction on how to do it.

       

      Note: you can only send message to your own phone number which you used to register as this is a free trial account.

       

      First go to Communication APIs for SMS, Voice, Video and Authentication and click "Get a free API key".

      Get api key.PNG

      Then sign for free, and click get started

       

      Sing for free.PNG

       

      Enter you phone number and click versify by SMS and enter the verification code which you revised in a message.

      verify you are human.PNG

      Click "Get Started" and "Get you first Twilio number" to get your twilio number. (this is the number that you will use to send messages)

       

      Get you first twilio number.PNG

       

      And click show "API credentials" to get you ACCOUNT_SID, and  AUTH_TOKEN

       

       

      Thanks for the help guys!

       

      Message was edited by: Fernando Pena Cantu

       

      Message was edited by: Fernando Pena Cantu I also attached my JBoss BPM Project

        • 1. Re: Creating a text message Service Task
          Jozef Marko Newbie

          I am not expert for class loading issues, however I would try to change signature of this: public static void SendSMS(String to, String text) to this: public void SendSMS(String to, String text) 

          • 2. Re: Creating a text message Service Task
            Fernando Pena Cantu Newbie

            Ups yeah that should not be there. I removed it. The jar file in JBoss bpm suit does not have the static. The static was there because I tested the class on eclipse before making a post here. I just forgot to remove it when pasting the code here.

            • 3. Re: Creating a text message Service Task
              Jozef Marko Newbie

              If that's is the case, and your jar doesn't contain the static method, have you tried to upload the jar and change deployment descriptor using business central?

               

              • Upload the jar in: Authoring - Artifact Repository
              • Then open: Project Editor - Dependencies
                • Add dependency to uploaded jar
              • Then open: Project Editor - Deployment descriptor
                • Register given work item handler
              • 4. Re: Creating a text message Service Task
                Fernando Pena Cantu Newbie

                Thanks Jozef, I did not knew I could create a work item handler this way.

                Unfortunately I feel we are digging ourselves into a hole. I try what you said and I experience the same error which I posted above(... new org.jugvale.jbpm.workitemhandl ....), and another error for which I created a discussing about a week ago. WARN  XXX failed and will not be available for authoring.  I am unsure why this errors are happening so I am going to tell you exactly what I did. To see if you spot something.

                 

                Here is what I did:

                I uploaded the jar into the Artifact repository.

                Artifacts.PNG

                Went to Project Editor -Dependencies  and added dependence to uploaded jar.

                Dependecies.PNG

                 

                 

                Then open: Project Editor - Deployment description and register given work item handler.

                Deployment Descriptor.PNG

                 

                The went to Work Item definitions and added the work item handler.

                Work Item Definitons.PNG

                 

                 

                 

                Thanks, for the help.

                • 5. Re: Creating a text message Service Task
                  Jozef Marko Newbie

                  Steps seems to me correct. Restart of the application server doesn't help?

                  • 6. Re: Creating a text message Service Task
                    Fernando Pena Cantu Newbie

                    Hello, Jozef unfortunately restarting the server application did not do anything.

                    Would you mind if I ask you to try to replicate the error on your side?

                    • 7. Re: Creating a text message Service Task
                      Jozef Marko Newbie

                      Fernando, I can try to do it definitely. However I would need the project with your WorkItemHandler, or at least the jar.

                      • 8. Re: Creating a text message Service Task
                        Duncan Doyle Newbie

                        Have you added the Twilio JAR that contains the missing "com.twilio.rest.api.v2010.account.Message" class to the WEB-INF/lib of "business-central.war" and "kie-server.war"? You state that you've added your own WIH JAR, but not the Twilio one. Your WIH has a dependency on those classes (e.g. see the "import com.twilio.rest.api.v2010.account.Message; " on line 6 of your code for example).

                         

                        The exception indicates that your class just can't be loaded by the loader that loads "business-central.war":

                        Caused by: java.lang.ClassNotFoundException: com.twilio.rest.api.v2010.account.Message from [Module "deployment.business-central.war:main" from Service Module Loader]

                         

                        Which to me sounds that that JAR is not on the classpath of business-central and KIE-Server.

                         

                        Reproducer would indeed be helpful.

                         

                        Cheers,

                         

                        Duncan

                        • 9. Re: Creating a text message Service Task
                          Fernando Pena Cantu Newbie

                          Hello, Duncan

                          No, I have not imported Twilio jar file into JBoss BPM suit. I thought these ones would be automatically download into Jboss BPM suit it as they are declared as dependencies on the POM file. 

                          I assumed this as this is what eclipse does. (I am not very experienced with maven).

                           

                          Does that mean that I have to import all the Jar files which my project uses on eclipse such as Twilio and all the ones that Twilio uses such as guava, jackson, junit etc?

                          That seems to me like a lot of jar files that I need to add.

                           

                          I have also attacked my maven project to this discussion. Unfortunately, I can't attached my Jar file as it contains sensitive information. I so instead I gave you my maven project. You just need to replace your ACCOUNT_SID, AUTH_TOKEN and phone number with yours and then you can package it into a jar file. I left very detail instructions on how to do this on the main post. 

                           

                          Thanks for you help.

                          • 10. Re: Creating a text message Service Task
                            Fernando Pena Cantu Newbie

                            Hello Jozef,

                            I have attached my maven project to the main post. Unfortunately, I can't attached my Jar file as it contains sensitive information. I so instead I gave you my maven project. You just need to replace your ACCOUNT_SID, AUTH_TOKEN and phone number with yours and then you can package it into a jar file. I left very detail instructions on how to do this on the main post. 

                             

                            I would also like to give you my project in Jboss BPM suit to make the process of replication faster, However I have no idea how to this.

                            Do you know where my project is stored?  or How i can extract it from Jboss BPM suit so I can send it to you in a zip file.

                             

                            Thanks for you help.

                            • 11. Re: Creating a text message Service Task
                              Duncan Doyle Newbie

                              No, if you add a JAR file to the "WEB-INF/lib" of Business-Central or KIE-Server, the dependencies of your JAR are not added automatically. So, that explains the ClassNotFoundException.

                               

                              As stated earlier in this thread, there are multiple ways to add a WIH JAR to your project. Apart from adding the JAR to your WEB-INF/lib, you can also add the JAR file as a Maven Dependency to your KJAR (your business-process project). If you do this, BPM Suite will indeed add all the JARs dependencies to your project's runtime class loader.

                               

                              To extract a project from JBoss BPM Suite, you can simply use Git. BPM Suite exposes an Git SSH server on port 8001. To clone the project, use a standard Git client: "git clone ssh://{username}@localhost:8001/{repository-name}

                               

                              Cheers,

                               

                              Duncan

                              • 12. Re: Creating a text message Service Task
                                Fernando Pena Cantu Newbie

                                Thanks for the quick reply,

                                I believe I have also tried to add my jar as a Maven dependency to my business-process project. Jozef Marko, mentioned that I could create my work item handler like that. (Look at the long reply with a bunch of images)

                                However, that seem to not work as I got 2 errors instead of one. The same error which I posted above(... new org.jugvale.jbpm.workitemhandl ....), and another error for which I created a discussing about a week ago. WARN  XXX failed and will not be available for authoring

                                Do I need to remove my Jar file from WEB_INF/lib even thought I never call it from kie-wb-deployment-descriptor.xml?

                                Also I added my project to the main post.

                                 

                                I was unable to clone from git clone ssh://{username}@localhost:8001/{repository-name} or git clone git://{username}@localhost:9418/{repository-name}

                                I got the following errors:

                                -------------------------------------------------------------------------

                                $ git clone ssh://bpmsAdmin@localhost:8001/LearningProjects

                                Cloning into 'LearningProjects'...

                                Unable to negotiate with 127.0.0.1 port 8001: no matching host key type found. Their offer: ssh-dss

                                fatal: Could not read from remote repository.

                                 

                                 

                                Please make sure you have the correct access rights

                                ----------------------------------------------------------------------------------------

                                and

                                ----------------------------------------------------------------------------------------

                                $ git clone git://bpmsAdmin@localhost:9418/LearningProjects

                                Cloning into 'LearningProjects'...

                                fatal: unable to access 'https://bpmsAdmin@localhost:9418/LearningProjects/': error setting certificate verify locations:

                                  CAfile: C:/Users/nevathann/AppData/Local/Programs/Git/mingw64/ssl/certs/ca-bundle.crt

                                  CApath: none

                                ----------------------------------------------------------------------------------------

                                I have not access to C:/Users/nevathann so I my git may be using the configuration of somebody else.

                                Anyways that is matter for another discussion.

                                 

                                I got the project from C:\Users\MyUser\.m2\repository\MyRespositor hope this is the correct file.

                                 

                                Thanks,

                                 

                                Fernando