JBoss Community

create a ESBServiceWorkItemHandler

created by pitstop in jBPM Development - View the full discussion

Hi all,

I need to create a ESBServiceWorkItemHandler to create a wf task  that invokes a service on jbossesb.

I have two different servers. The server one hosts BRMS, the second server hosts SOA-P where there the esb to invoke.

I deployed my WorkItemHandler implementation in business-central-server.war. 

When ESBServiceWorkItemHandler is invoked I cannot instanziate the service invoker and this exception is thrown:

 

17:02:38,437 ERROR [STDERR] org.jboss.soa.esb.listeners.message.MessageDeliverException: Invocation exception. null
17:02:38,438 ERROR [STDERR]     at org.jboss.soa.esb.client.ServiceInvoker.loadServiceClusterInfo(ServiceInvoker.java:580)
17:02:38,438 ERROR [STDERR]     at org.jboss.soa.esb.client.ServiceInvoker.<init>(ServiceInvoker.java:176)
17:02:38,438 ERROR [STDERR]     at org.jboss.soa.esb.client.ServiceInvoker.<init>(ServiceInvoker.java:157)
17:02:38,438 ERROR [STDERR]     at org.jboss.soa.esb.client.ServiceInvoker.<init>(ServiceInvoker.java:199)
17:02:38,438 ERROR [STDERR]     at it.poste.crs.sipac.routing.client.example.ESBServiceWorkItemHandler.getServiceInvoker(ESBServiceWorkItemHandler.java:97)
17:02:38,438 ERROR [STDERR]     at it.poste.crs.sipac.routing.client.example.ESBServiceWorkItemHandler.executeWorkItem(ESBServiceWorkItemHandler.java:73)
17:02:38,438 ERROR [STDERR]     at org.drools.persistence.jpa.processinstance.JPAWorkItemManager.internalExecuteWorkItem(JPAWorkItemManager.java:55)
17:02:38,438 ERROR [STDERR]     at org.jbpm.workflow.instance.node.WorkItemNodeInstance.internalTrigger(WorkItemNodeInstance.java:107)
17:02:38,438 ERROR [STDERR]     at org.jbpm.workflow.instance.impl.NodeInstanceImpl.trigger(NodeInstanceImpl.java:122)
17:02:38,438 ERROR [STDERR]     at org.jbpm.workflow.instance.impl.NodeInstanceImpl.triggerNodeInstance(NodeInstanceImpl.java:210)
17:02:38,438 ERROR [STDERR]     at org.jbpm.workflow.instance.impl.NodeInstanceImpl.triggerConnection(NodeInstanceImpl.java:218)
17:02:38,438 ERROR [STDERR]     at org.jbpm.workflow.instance.node.SplitInstance.internalTrigger(SplitInstance.java:100)
17:02:38,438 ERROR [STDERR]     at org.jbpm.workflow.instance.impl.NodeInstanceImpl.trigger(NodeInstanceImpl.java:122)
17:02:38,438 ERROR [STDERR]     at org.jbpm.workflow.instance.impl.NodeInstanceImpl.triggerNodeInstance(NodeInstanceImpl.java:210)
17:02:38,438 ERROR [STDERR]     at org.jbpm.workflow.instance.impl.NodeInstanceImpl.triggerCompleted(NodeInstanceImpl.java:169)
17:02:38,438 ERROR [STDERR]     at org.jbpm.workflow.instance.node.StartNodeInstance.triggerCompleted(StartNodeInstance.java:49)
17:02:38,438 ERROR [STDERR]     at org.jbpm.workflow.instance.node.StartNodeInstance.internalTrigger(StartNodeInstance.java:41)
17:02:38,438 ERROR [STDERR]     at org.jbpm.workflow.instance.impl.NodeInstanceImpl.trigger(NodeInstanceImpl.java:122)
17:02:38,438 ERROR [STDERR]     at org.jbpm.ruleflow.instance.RuleFlowProcessInstance.internalStart(RuleFlowProcessInstance.java:35)
17:02:38,438 ERROR [STDERR]     at org.jbpm.process.instance.impl.ProcessInstanceImpl.start(ProcessInstanceImpl.java:188)
17:02:38,439 ERROR [STDERR]     at org.jbpm.workflow.instance.impl.WorkflowProcessInstanceImpl.start(WorkflowProcessInstanceImpl.java:305)
17:02:38,439 ERROR [STDERR]     at org.jbpm.process.instance.ProcessRuntimeImpl.startProcessInstance(ProcessRuntimeImpl.java:169)
17:02:38,439 ERROR [STDERR]     at org.jbpm.process.instance.ProcessRuntimeImpl.startProcess(ProcessRuntimeImpl.java:139)
17:02:38,439 ERROR [STDERR]     at org.drools.common.AbstractWorkingMemory.startProcess(AbstractWorkingMemory.java:1082)
17:02:38,439 ERROR [STDERR]     at org.drools.impl.StatefulKnowledgeSessionImpl.startProcess(StatefulKnowledgeSessionImpl.java:318)
17:02:38,439 ERROR [STDERR]     at org.drools.command.runtime.process.StartProcessCommand.execute(StartProcessCommand.java:119)
17:02:38,439 ERROR [STDERR]     at org.drools.command.runtime.process.StartProcessCommand.execute(StartProcessCommand.java:38)
17:02:38,439 ERROR [STDERR]     at org.drools.command.impl.DefaultCommandService.execute(DefaultCommandService.java:36)
17:02:38,439 ERROR [STDERR]     at org.drools.persistence.SingleSessionCommandService.execute(SingleSessionCommandService.java:360)
17:02:38,439 ERROR [STDERR]     at org.drools.command.impl.CommandBasedStatefulKnowledgeSession.startProcess(CommandBasedStatefulKnowledgeSession.java:223)
17:02:38,439 ERROR [STDERR]     at org.jbpm.integration.console.CommandDelegate.startProcess(CommandDelegate.java:120)
17:02:38,439 ERROR [STDERR]     at org.jbpm.integration.console.ProcessManagement.newInstance(ProcessManagement.java:88)
17:02:38,439 ERROR [STDERR]     at org.jboss.bpm.console.server.FormProcessingFacade.startProcessWithUI(FormProcessingFacade.java:197)
17:02:38,439 ERROR [STDERR]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
17:02:38,439 ERROR [STDERR]     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
17:02:38,439 ERROR [STDERR]     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
17:02:38,439 ERROR [STDERR]     at java.lang.reflect.Method.invoke(Method.java:597)
17:02:38,439 ERROR [STDERR]     at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:140)
17:02:38,439 ERROR [STDERR]     at org.jboss.resteasy.core.ResourceMethod.invokeOnTarget(ResourceMethod.java:255)
17:02:38,439 ERROR [STDERR]     at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:220)
17:02:38,439 ERROR [STDERR]     at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:209)
17:02:38,439 ERROR [STDERR]     at org.jboss.resteasy.core.SynchronousDispatcher.getResponse(SynchronousDispatcher.java:519)
17:02:38,439 ERROR [STDERR]     at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:496)
17:02:38,439 ERROR [STDERR]     at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:119)
17:02:38,440 ERROR [STDERR]     at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:208)
17:02:38,440 ERROR [STDERR]     at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:55)
17:02:38,440 ERROR [STDERR]     at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:50)
17:02:38,440 ERROR [STDERR]     at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
17:02:38,440 ERROR [STDERR]     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
17:02:38,440 ERROR [STDERR]     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
17:02:38,440 ERROR [STDERR]     at org.jboss.bpm.console.server.util.GWTJsonFilter.doFilter(GWTJsonFilter.java:59)
17:02:38,440 ERROR [STDERR]     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
17:02:38,440 ERROR [STDERR]     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
17:02:38,440 ERROR [STDERR]     at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
17:02:38,440 ERROR [STDERR]     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
17:02:38,440 ERROR [STDERR]     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
17:02:38,440 ERROR [STDERR]     at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
17:02:38,440 ERROR [STDERR]     at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
17:02:38,440 ERROR [STDERR]     at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:183)
17:02:38,440 ERROR [STDERR]     at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:534)
17:02:38,440 ERROR [STDERR]     at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:95)
17:02:38,440 ERROR [STDERR]     at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
17:02:38,440 ERROR [STDERR]     at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
17:02:38,440 ERROR [STDERR]     at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
17:02:38,440 ERROR [STDERR]     at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
17:02:38,440 ERROR [STDERR]     at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
17:02:38,440 ERROR [STDERR]     at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
17:02:38,440 ERROR [STDERR]     at org.jboss.web.tomcat.service.request.ActiveRequestResponseCacheValve.internalProcess(ActiveRequestResponseCacheValve.java:74)
17:02:38,440 ERROR [STDERR]     at org.jboss.web.tomcat.service.request.ActiveRequestResponseCacheValve.invoke(ActiveRequestResponseCacheValve.java:47)
17:02:38,440 ERROR [STDERR]     at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
17:02:38,441 ERROR [STDERR]     at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
17:02:38,441 ERROR [STDERR]     at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:599)
17:02:38,441 ERROR [STDERR]     at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:451)
17:02:38,441 ERROR [STDERR]     at java.lang.Thread.run(Thread.java:662)
17:02:38,441 ERROR [STDERR] Caused by: org.jboss.soa.esb.services.registry.RegistryException: Invocation exception. null
17:02:38,441 ERROR [STDERR]     at org.jboss.soa.esb.services.registry.RegistryFactory.createRegistry(RegistryFactory.java:121)
17:02:38,441 ERROR [STDERR]     at org.jboss.soa.esb.services.registry.RegistryFactory.getRegistry(RegistryFactory.java:86)
17:02:38,441 ERROR [STDERR]     at org.jboss.soa.esb.listeners.RegistryUtil.getEprs(RegistryUtil.java:222)
17:02:38,441 ERROR [STDERR]     at org.jboss.soa.esb.client.ServiceInvoker.loadServiceClusterInfo(ServiceInvoker.java:567)
17:02:38,441 ERROR [STDERR]     ... 73 more
17:02:38,441 ERROR [STDERR] Caused by: java.lang.NullPointerException
17:02:38,441 ERROR [STDERR]     at java.lang.Class.forName0(Native Method)
17:02:38,441 ERROR [STDERR]     at java.lang.Class.forName(Class.java:249)
17:02:38,441 ERROR [STDERR]     at org.jboss.soa.esb.util.ClassUtil.forName(ClassUtil.java:65)
17:02:38,441 ERROR [STDERR]     at org.jboss.soa.esb.services.registry.RegistryFactory.createRegistry(RegistryFactory.java:110)
17:02:38,441 ERROR [STDERR]     ... 76 more

 

It seems that is a classpath problem  but I have deployed in WEB-INF/lib of  business-central-server.war  a jar containing the workitemhandler implementation and these files: jbossesb-properties.xml, jndi.properties and META-INF/uddi.xml

In WEB-INF/lib of  business-central-server.war  there are also the jbossesb-*.jar  , juddi-client-*.jar and uddi-ws.*.jar. The other libraries to invoke an external client are deployed under <server-name>/lib

 

These client with the dependencies described is successfully invoked from my standalone jbds environment.  Where is the best place to deploy lib for my esbclient?

 

Any help is appreciated

thanks

rocco

Reply to this message by going to Community

Start a new discussion in jBPM Development at Community