2 Replies Latest reply on Dec 5, 2006 6:21 PM by njipwo Bertrand

    Simple WS <invoke> causes NullPointerException. Why?? Please

    Peter Kovgan Newbie

      Hi!

      I have extended hello example by my invoke to my web service.

      and I failed to invoke my web service.
      I know exacly, that I failed upon invoked, I checked it!

      Please, help!!!


      I do receive, assign, invoke, reply.

      hello.bpel:

      <?xml version="1.0" encoding="UTF-8"?>
      <process name="HelloWorld"
      targetNamespace="http://jbpm.org/examples/hello"
       xmlns="http://schemas.xmlsoap.org/ws/2003/03/business-process/"
       xmlns:tns="http://jbpm.org/examples/hello"
       xmlns:bpel="http://schemas.xmlsoap.org/ws/2003/03/business-process/"
       xmlns:apns="http://client/com/sap/xtp/customer"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="http://schemas.xmlsoap.org/ws/2003/03/business-process/
       http://schemas.xmlsoap.org/ws/2003/03/business-process/">
      
       <partnerLinks>
       <partnerLink name="caller" partnerLinkType="tns:Greeter-Caller"
       myRole="Greeter" />
       <partnerLink name="customer" partnerLinkType="tns:Customer-LinkType"
       partnerRole="Customer" />
       </partnerLinks>
      
      
      
       <variables>
       <variable name="request" messageType="tns:nameMessage" />
       <variable name="response" messageType="tns:greetingMessage" />
       <variable name="requestToCustomer" messageType="apns:createRequest" />
       <variable name="responseFromCustomer" messageType="apns:createResponse" />
       </variables>
      
      
      
      
      
       <sequence>
      
       <!-- receive the name of a person -->
       <receive operation="sayHello" partnerLink="caller" portType="tns:Greeter"
       variable="request" createInstance="yes" />
      
       <!-- compose a greeting phrase -->
       <assign>
       <copy>
       <from expression="concat('Name:',bpel:getVariableData('request', 'name'))" />
       <to variable="requestToCustomer" part="customerName" />
       </copy>
       <copy>
       <from expression="concat('Description:',bpel:getVariableData('request', 'name'))" />
       <to variable="requestToCustomer" part="description" />
       </copy>
       <copy>
       <from expression="concat('Address:',bpel:getVariableData('request', 'name'))" />
       <to variable="requestToCustomer" part="address" />
       </copy>
       </assign>
      
       <invoke name="create" operation="create" partnerLink="customer" portType="apns:CustomerService" inputVariable="requestToCustomer" outputVariable="responseFromCustomer" />
      
      <!-- compose a greeting phrase -->
       <assign>
       <copy>
       <from expression="concat('Hello, ',
       bpel:getVariableData('request', 'name'), '!')" />
       <to variable="response" part="greeting" />
       </copy>
       </assign>
      
      
       <!-- reply with the greeting -->
       <reply operation="sayHello" partnerLink="caller" portType="tns:Greeter"
       variable="response" />
       </sequence>
      
      </process>
      


      My web service deployed , using axis 1.3 and works on the same jboss instance, where my BP deployed.

      And my hello.wsdl is like this:

      <?xml version="1.0" encoding="UTF-8"?>
      <definitions targetNamespace="http://jbpm.org/examples/hello"
       xmlns="http://schemas.xmlsoap.org/wsdl/"
       xmlns:tns="http://jbpm.org/examples/hello"
       xmlns:apns="http://client/com/sap/xtp/customer"
       xmlns:bpel="http://schemas.xmlsoap.org/ws/2003/03/business-process/"
       xmlns:plt="http://schemas.xmlsoap.org/ws/2003/05/partner-link/"
       xmlns:xsd="http://www.w3.org/2001/XMLSchema" >
      
       <import namespace="http://client/com/sap/xtp/customer" location="http://localhost:8080/quickstart/services/CustomerService?wsdl"/>
      
       <plt:partnerLinkType name="Greeter-Caller">
       <plt:role name="Greeter">
       <plt:portType name="tns:Greeter" />
       </plt:role>
       </plt:partnerLinkType>
      
      
       <plt:partnerLinkType name="Customer-LinkType">
       <plt:role name="Customer">
       <plt:portType name="apns:CustomerService"/>
       </plt:role>
       </plt:partnerLinkType>
      
      
      
      
       <!-- carries the name of a person -->
       <message name="nameMessage">
       <part name="name" type="xsd:string" />
       </message>
      
       <!-- carries the greeting -->
       <message name="greetingMessage">
       <part name="greeting" type="xsd:string" />
       </message>
      
       <!-- describes the interface presented to callers -->
       <portType name="Greeter">
       <operation name="sayHello">
       <input message="tns:nameMessage" />
       <output message="tns:greetingMessage" />
       </operation>
       </portType>
      
      </definitions>
      







      I have exception upon call to process:

      2006-11-14 15:53:40,137 DEBUG [org.jbpm.bpel.integration.jms.StartListener] caught exception while passing control to process, searching for handler
      org.jbpm.graph.def.DelegationException
       at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:352)
       at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:346)
       at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:346)
       at org.jbpm.graph.def.GraphElement$$FastClassByCGLIB$$7a7d6aa6.invoke(<generated>)
       at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
       at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.intercept(CGLIBLazyInitializer.java:163)
       at org.jbpm.bpel.def.CompositeActivity$$EnhancerByCGLIB$$7810329b.raiseException(<generated>)
       at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:346)
       at org.jbpm.bpel.def.Activity.enter(Activity.java:106)
       at org.jbpm.graph.def.Transition.take(Transition.java:119)
       at org.jbpm.graph.def.Node.leave(Node.java:383)
       at org.jbpm.bpel.def.Activity.leave(Activity.java:171)
       at org.jbpm.bpel.def.ProcessInstanceStarter.visit(ProcessInstanceStarter.java:57)
       at org.jbpm.bpel.def.Receive.accept(Receive.java:82)
       at org.jbpm.bpel.def.Receive$$FastClassByCGLIB$$516412f0.invoke(<generated>)
       at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
       at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.intercept(CGLIBLazyInitializer.java:163)
       at org.jbpm.bpel.def.Receive$$EnhancerByCGLIB$$f0638c92.accept(<generated>)
       at org.jbpm.bpel.def.ProcessInstanceStarter.visit(ProcessInstanceStarter.java:97)
       at org.jbpm.bpel.def.Sequence.accept(Sequence.java:105)
       at org.jbpm.bpel.def.Activity$$FastClassByCGLIB$$a89e54a2.invoke(<generated>)
       at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
       at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.intercept(CGLIBLazyInitializer.java:163)
       at org.jbpm.bpel.def.Activity$$EnhancerByCGLIB$$db28b188.accept(<generated>)
       at org.jbpm.bpel.def.ProcessInstanceStarter.visit(ProcessInstanceStarter.java:43)
       at org.jbpm.bpel.def.BpelDefinition.messageReceived(BpelDefinition.java:109)
       at org.jbpm.bpel.integration.jms.StartListener.onMessage(StartListener.java:115)
       at org.jboss.mq.SpyMessageConsumer.run(SpyMessageConsumer.java:694)
       at java.lang.Thread.run(Thread.java:595)
      Caused by: org.jbpm.graph.def.DelegationException
       at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:352)
       at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:346)
       at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:346)
       at org.jbpm.graph.def.GraphElement$$FastClassByCGLIB$$7a7d6aa6.invoke(<generated>)
       at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
       at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.intercept(CGLIBLazyInitializer.java:163)
       at org.jbpm.bpel.def.CompositeActivity$$EnhancerByCGLIB$$7810329b.raiseException(<generated>)
       at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:346)
       at org.jbpm.bpel.def.Activity.enter(Activity.java:106)
       at org.jbpm.graph.def.Transition.take(Transition.java:119)
       at org.jbpm.graph.def.Node.leave(Node.java:383)
       at org.jbpm.bpel.def.Activity.leave(Activity.java:171)
       at org.jbpm.bpel.def.Assign.execute(Assign.java:55)
       at org.jbpm.bpel.def.Activity.enter(Activity.java:101)
       ... 20 more
      Caused by: java.lang.NullPointerException
       at org.jbpm.bpel.integration.exe.SoapEndpointReference.selectPort(SoapEndpointReference.java:94)
       at org.jbpm.bpel.integration.jms.IntegrationControl.getPartnerClient(IntegrationControl.java:234)
       at org.jbpm.bpel.integration.jms.JmsIntegrationService.invoke(JmsIntegrationService.java:171)
       at org.jbpm.bpel.def.Invoke.execute(Invoke.java:44)
       at org.jbpm.bpel.def.Activity.enter(Activity.java:101)
       ... 25 more
      2006-11-14 15:53:40,137 ERROR [org.jbpm.bpel.integration.jms.StartListener] could not start process instance
      org.jbpm.graph.def.DelegationException
       at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:352)
       at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:346)
       at org.jbpm.bpel.integration.jms.StartListener.onMessage(StartListener.java:120)
       at org.jboss.mq.SpyMessageConsumer.run(SpyMessageConsumer.java:694)
       at java.lang.Thread.run(Thread.java:595)
      Caused by: org.jbpm.graph.def.DelegationException
       at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:352)
       at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:346)
       at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:346)
       at org.jbpm.graph.def.GraphElement$$FastClassByCGLIB$$7a7d6aa6.invoke(<generated>)
       at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
       at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.intercept(CGLIBLazyInitializer.java:163)
       at org.jbpm.bpel.def.CompositeActivity$$EnhancerByCGLIB$$7810329b.raiseException(<generated>)
       at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:346)
       at org.jbpm.bpel.def.Activity.enter(Activity.java:106)
       at org.jbpm.graph.def.Transition.take(Transition.java:119)
       at org.jbpm.graph.def.Node.leave(Node.java:383)
       at org.jbpm.bpel.def.Activity.leave(Activity.java:171)
       at org.jbpm.bpel.def.ProcessInstanceStarter.visit(ProcessInstanceStarter.java:57)
       at org.jbpm.bpel.def.Receive.accept(Receive.java:82)
       at org.jbpm.bpel.def.Receive$$FastClassByCGLIB$$516412f0.invoke(<generated>)
       at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
       at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.intercept(CGLIBLazyInitializer.java:163)
       at org.jbpm.bpel.def.Receive$$EnhancerByCGLIB$$f0638c92.accept(<generated>)
       at org.jbpm.bpel.def.ProcessInstanceStarter.visit(ProcessInstanceStarter.java:97)
       at org.jbpm.bpel.def.Sequence.accept(Sequence.java:105)
       at org.jbpm.bpel.def.Activity$$FastClassByCGLIB$$a89e54a2.invoke(<generated>)
       at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
       at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.intercept(CGLIBLazyInitializer.java:163)
       at org.jbpm.bpel.def.Activity$$EnhancerByCGLIB$$db28b188.accept(<generated>)
       at org.jbpm.bpel.def.ProcessInstanceStarter.visit(ProcessInstanceStarter.java:43)
       at org.jbpm.bpel.def.BpelDefinition.messageReceived(BpelDefinition.java:109)
       at org.jbpm.bpel.integration.jms.StartListener.onMessage(StartListener.java:115)
       ... 2 more
      Caused by: org.jbpm.graph.def.DelegationException
       at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:352)
       at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:346)
       at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:346)
       at org.jbpm.graph.def.GraphElement$$FastClassByCGLIB$$7a7d6aa6.invoke(<generated>)
       at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
       at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.intercept(CGLIBLazyInitializer.java:163)
       at org.jbpm.bpel.def.CompositeActivity$$EnhancerByCGLIB$$7810329b.raiseException(<generated>)
       at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:346)
       at org.jbpm.bpel.def.Activity.enter(Activity.java:106)
       at org.jbpm.graph.def.Transition.take(Transition.java:119)
       at org.jbpm.graph.def.Node.leave(Node.java:383)
       at org.jbpm.bpel.def.Activity.leave(Activity.java:171)
       at org.jbpm.bpel.def.Assign.execute(Assign.java:55)
       at org.jbpm.bpel.def.Activity.enter(Activity.java:101)
       ... 20 more
      Caused by: java.lang.NullPointerException
       at org.jbpm.bpel.integration.exe.SoapEndpointReference.selectPort(SoapEndpointReference.java:94)
       at org.jbpm.bpel.integration.jms.IntegrationControl.getPartnerClient(IntegrationControl.java:234)
       at org.jbpm.bpel.integration.jms.JmsIntegrationService.invoke(JmsIntegrationService.java:171)
       at org.jbpm.bpel.def.Invoke.execute(Invoke.java:44)
       at org.jbpm.bpel.def.Activity.enter(Activity.java:101)
       ... 25 more
      2006-11-14 15:53:40,147 DEBUG [org.jbpm.JbpmContext] closing JbpmContext
      2006-11-14 15:53:40,147 DEBUG [org.jbpm.svc.Services] closing service 'persistence': org.jbpm.bpel.persistence.db.DbPersistenceService@10cf62
      2006-11-14 15:53:40,147 DEBUG [org.jbpm.persistence.db.DbPersistenceService] rolling back hibernate transaction
      2006-11-14 15:53:40,147 DEBUG [org.hibernate.transaction.JDBCTransaction] rollback
      2006-11-14 15:53:40,147 DEBUG [org.hibernate.transaction.JDBCTransaction] re-enabling autocommit
      2006-11-14 15:53:40,147 DEBUG [org.hibernate.transaction.JDBCTransaction] rolled back JDBC Connection
      2006-11-14 15:53:40,147 DEBUG [org.hibernate.jdbc.ConnectionManager] aggressively releasing JDBC connection
      2006-11-14 15:53:40,147 DEBUG [org.hibernate.jdbc.ConnectionManager] releasing JDBC connection [ (open PreparedStatements: 0, globally: 0) (open ResultSets: 0, globally: 0)]
      2006-11-14 15:53:40,147 DEBUG [org.jbpm.persistence.db.DbPersistenceService] closing hibernate session
      2006-11-14 15:53:40,147 DEBUG [org.jbpm.svc.Services] closing service 'integration': org.jbpm.bpel.integration.jms.JmsIntegrationService@19f332b