Creating a text message Service Task
fernandocantu Feb 10, 2017 10:35 AMHello 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".
Then sign for free, and click get started
Enter you phone number and click versify by SMS and enter the verification code which you revised in a message.
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)
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
-
sms-sender.zip 14.8 KB
-
SMS2.zip 6.4 KB