4 Replies Latest reply on Oct 29, 2007 8:11 PM by Alejandro Guizar

    org.jbpm.graph.def.DelegationException in JBPM-BPEL

    Aldo Lezza Newbie

      I created a simple process.
      If I remove an invoke activity the process works but if I leave the invoke
      I got the following server-sideexception. Stack trace is

      
      2007-10-23 20:50:48,902 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:367)
       at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:358)
       at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:358)
       at sun.reflect.GeneratedMethodAccessor284.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:585)
       at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.invoke(CGLIBLazyInitializer.java:185)
       at org.jbpm.bpel.graph.def.CompositeActivity$$EnhancerByCGLIB$$dd750a80.raiseException(<generated>)
       at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:358)
       at org.jbpm.bpel.graph.def.Activity.enter(Activity.java:110)
       at org.jbpm.graph.def.Transition.take(Transition.java:151)
       at org.jbpm.graph.def.Node.leave(Node.java:393)
       at org.jbpm.bpel.graph.def.Activity.leave(Activity.java:184)
       at org.jbpm.bpel.graph.basic.Assign.execute(Assign.java:55)
       at org.jbpm.bpel.graph.def.Activity.enter(Activity.java:105)
       at org.jbpm.graph.def.Transition.take(Transition.java:151)
       at org.jbpm.graph.def.Node.leave(Node.java:393)
       at org.jbpm.bpel.graph.def.Activity.leave(Activity.java:184)
       at org.jbpm.bpel.graph.basic.Assign.execute(Assign.java:55)
       at org.jbpm.bpel.graph.def.Activity.enter(Activity.java:105)
       at org.jbpm.graph.def.Transition.take(Transition.java:151)
       at org.jbpm.graph.def.Node.leave(Node.java:393)
       at org.jbpm.bpel.graph.def.Activity.leave(Activity.java:184)
       at org.jbpm.bpel.graph.basic.Assign.execute(Assign.java:55)
       at org.jbpm.bpel.graph.def.Activity.enter(Activity.java:105)
       at org.jbpm.graph.def.Transition.take(Transition.java:151)
       at org.jbpm.graph.def.Node.leave(Node.java:393)
       at org.jbpm.bpel.graph.def.Activity.leave(Activity.java:184)
       at org.jbpm.bpel.graph.basic.Assign.execute(Assign.java:55)
       at org.jbpm.bpel.graph.def.Activity.enter(Activity.java:105)
       at org.jbpm.graph.def.Transition.take(Transition.java:151)
       at org.jbpm.graph.def.Node.leave(Node.java:393)
       at org.jbpm.bpel.graph.def.Activity.leave(Activity.java:184)
       at org.jbpm.bpel.graph.basic.Assign.execute(Assign.java:55)
       at org.jbpm.bpel.graph.def.Activity.enter(Activity.java:105)
       at org.jbpm.graph.def.Transition.take(Transition.java:151)
       at org.jbpm.graph.def.Node.leave(Node.java:393)
       at org.jbpm.bpel.graph.def.Activity.leave(Activity.java:184)
       at org.jbpm.bpel.graph.struct.ProcessInstanceStarter.visit(ProcessInstanceStarter.java:66)
       at org.jbpm.bpel.graph.basic.Receive.accept(Receive.java:81)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:585)
       at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.invoke(CGLIBLazyInitializer.java:185)
       at org.jbpm.bpel.graph.basic.Receive$$EnhancerByCGLIB$$edc5dc62.accept(<generated>)
       at org.jbpm.bpel.graph.struct.ProcessInstanceStarter.visit(ProcessInstanceStarter.java:100)
       at org.jbpm.bpel.graph.struct.Sequence.accept(Sequence.java:104)
       at sun.reflect.GeneratedMethodAccessor185.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:585)
       at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.invoke(CGLIBLazyInitializer.java:185)
       at org.jbpm.bpel.graph.def.Activity$$EnhancerByCGLIB$$fa3fa02d.accept(<generated>)
       at org.jbpm.bpel.graph.struct.ProcessInstanceStarter.visit(ProcessInstanceStarter.java:54)
       at org.jbpm.bpel.graph.def.BpelDefinition.messageReceived(BpelDefinition.java:111)
       at org.jbpm.bpel.integration.jms.StartListener.onMessage(StartListener.java:124)
       at org.jboss.mq.SpyMessageConsumer.run(SpyMessageConsumer.java:696)
       at java.lang.Thread.run(Thread.java:595)
      Caused by: java.lang.NullPointerException
       at org.jboss.ws.soap.SOAPConnectionImpl.getRemotingMetaData(SOAPConnectionImpl.java:236)
       at org.jboss.ws.soap.SOAPConnectionImpl.call(SOAPConnectionImpl.java:156)
       at org.jboss.ws.soap.SOAPConnectionImpl.call(SOAPConnectionImpl.java:99)
       at org.jbpm.bpel.integration.client.SoapClient.callImpl(SoapClient.java:148)
       at org.jbpm.bpel.integration.client.SoapClient.call(SoapClient.java:111)
       at org.jbpm.bpel.integration.jms.JmsIntegrationService.invoke(JmsIntegrationService.java:242)
       at org.jbpm.bpel.graph.basic.Invoke.execute(Invoke.java:46)
       at org.jbpm.bpel.graph.def.Activity.enter(Activity.java:105)
       ... 48 more
      2007-10-23 20:50:48,903 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:367)
       at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:358)
       at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:358)
       at sun.reflect.GeneratedMethodAccessor284.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:585)
       at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.invoke(CGLIBLazyInitializer.java:185)
       at org.jbpm.bpel.graph.def.CompositeActivity$$EnhancerByCGLIB$$dd750a80.raiseException(<generated>)
       at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:358)
       at org.jbpm.bpel.graph.def.Activity.enter(Activity.java:110)
       at org.jbpm.graph.def.Transition.take(Transition.java:151)
       at org.jbpm.graph.def.Node.leave(Node.java:393)
       at org.jbpm.bpel.graph.def.Activity.leave(Activity.java:184)
       at org.jbpm.bpel.graph.basic.Assign.execute(Assign.java:55)
       at org.jbpm.bpel.graph.def.Activity.enter(Activity.java:105)
       at org.jbpm.graph.def.Transition.take(Transition.java:151)
       at org.jbpm.graph.def.Node.leave(Node.java:393)
       at org.jbpm.bpel.graph.def.Activity.leave(Activity.java:184)
       at org.jbpm.bpel.graph.basic.Assign.execute(Assign.java:55)
       at org.jbpm.bpel.graph.def.Activity.enter(Activity.java:105)
       at org.jbpm.graph.def.Transition.take(Transition.java:151)
       at org.jbpm.graph.def.Node.leave(Node.java:393)
       at org.jbpm.bpel.graph.def.Activity.leave(Activity.java:184)
       at org.jbpm.bpel.graph.basic.Assign.execute(Assign.java:55)
       at org.jbpm.bpel.graph.def.Activity.enter(Activity.java:105)
       at org.jbpm.graph.def.Transition.take(Transition.java:151)
       at org.jbpm.graph.def.Node.leave(Node.java:393)
       at org.jbpm.bpel.graph.def.Activity.leave(Activity.java:184)
       at org.jbpm.bpel.graph.basic.Assign.execute(Assign.java:55)
       at org.jbpm.bpel.graph.def.Activity.enter(Activity.java:105)
       at org.jbpm.graph.def.Transition.take(Transition.java:151)
       at org.jbpm.graph.def.Node.leave(Node.java:393)
       at org.jbpm.bpel.graph.def.Activity.leave(Activity.java:184)
       at org.jbpm.bpel.graph.basic.Assign.execute(Assign.java:55)
       at org.jbpm.bpel.graph.def.Activity.enter(Activity.java:105)
       at org.jbpm.graph.def.Transition.take(Transition.java:151)
       at org.jbpm.graph.def.Node.leave(Node.java:393)
       at org.jbpm.bpel.graph.def.Activity.leave(Activity.java:184)
       at org.jbpm.bpel.graph.struct.ProcessInstanceStarter.visit(ProcessInstanceStarter.java:66)
       at org.jbpm.bpel.graph.basic.Receive.accept(Receive.java:81)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:585)
       at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.invoke(CGLIBLazyInitializer.java:185)
       at org.jbpm.bpel.graph.basic.Receive$$EnhancerByCGLIB$$edc5dc62.accept(<generated>)
       at org.jbpm.bpel.graph.struct.ProcessInstanceStarter.visit(ProcessInstanceStarter.java:100)
       at org.jbpm.bpel.graph.struct.Sequence.accept(Sequence.java:104)
       at sun.reflect.GeneratedMethodAccessor185.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:585)
       at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.invoke(CGLIBLazyInitializer.java:185)
       at org.jbpm.bpel.graph.def.Activity$$EnhancerByCGLIB$$fa3fa02d.accept(<generated>)
       at org.jbpm.bpel.graph.struct.ProcessInstanceStarter.visit(ProcessInstanceStarter.java:54)
       at org.jbpm.bpel.graph.def.BpelDefinition.messageReceived(BpelDefinition.java:111)
       at org.jbpm.bpel.integration.jms.StartListener.onMessage(StartListener.java:124)
       at org.jboss.mq.SpyMessageConsumer.run(SpyMessageConsumer.java:696)
       at java.lang.Thread.run(Thread.java:595)
      Caused by: java.lang.NullPointerException
       at org.jboss.ws.soap.SOAPConnectionImpl.getRemotingMetaData(SOAPConnectionImpl.java:236)
       at org.jboss.ws.soap.SOAPConnectionImpl.call(SOAPConnectionImpl.java:156)
       at org.jboss.ws.soap.SOAPConnectionImpl.call(SOAPConnectionImpl.java:99)
       at org.jbpm.bpel.integration.client.SoapClient.callImpl(SoapClient.java:148)
       at org.jbpm.bpel.integration.client.SoapClient.call(SoapClient.java:111)
       at org.jbpm.bpel.integration.jms.JmsIntegrationService.invoke(JmsIntegrationService.java:242)
       at org.jbpm.bpel.graph.basic.Invoke.execute(Invoke.java:46)
       at org.jbpm.bpel.graph.def.Activity.enter(Activity.java:105)
       ... 48 more
      2007-10-23 20:50:48,904 DEBUG [org.jbpm.JbpmContext] closing JbpmContext
      
      



      The service that has to be invoked has been already deployed and successfully tested. So it works! I got the wsdl from the URI
      Here is my BPEL code


      
      <?xml version="1.0" encoding="UTF-8"?>
      <process
       name="Login"
       targetNamespace="http://j2ee.netbeans.org/wsdl/Login"
       xmlns="http://schemas.xmlsoap.org/ws/2004/03/business-process/"
       xmlns:xsd="http://www.w3.org/2001/XMLSchema"
       xmlns:bpel="http://schemas.xmlsoap.org/ws/2003/03/business-process/"
       xmlns:wsdlNS="http://j2ee.netbeans.org/wsdl/Login" xmlns:ns3="http://xml.netbeans.org/schema/LoginTypes" xmlns:ns1="http://j2ee.netbeans.org/wsdl/Login" xmlns:ns2="http://j2ee.netbeans.org/wsdl/ControlloAccesso">
      
       <partnerLinks>
       <partnerLink name="CAPL" partnerLinkType="ns1:CAPLT" partnerRole="ProcessRole"/>
       <partnerLink name="ReceivePL" partnerLinkType="ns1:LoginPartner" myRole="LoginPortTypeRole"/>
       </partnerLinks>
       <variables>
       <variable name="LoginOperationResponse" messageType="ns1:LoginOperationReply"/>
       <variable name="CAOutput" messageType="ns2:ControlloAccessoOperationReply"/>
       <variable name="CAInput" messageType="ns2:ControlloAccessoOperationRequest"/>
       <variable name="CredenzialiRequest" messageType="ns1:LoginOperationRequest"/>
       <variable name="temp" type="ns3:Credenziali"/>
       </variables>
       <sequence>
       <receive name="ReceviCredenziali" createInstance="yes" partnerLink="ReceivePL" operation="LoginOperation" portType="ns1:LoginPortType" variable="CredenzialiRequest"/>
      
       <assign>
       <copy>
       <from variable="CredenzialiRequest" part="inRequest" />
       <to variable="temp" query="nome" />
       </copy>
       </assign>
      
       <assign>
       <copy>
       <from variable="CredenzialiRequest" part="inRequest" />
       <to variable="temp" query="password" />
       </copy>
       </assign>
      
       <assign>
       <copy>
       <from variable="temp" />
       <to variable="CAInput" part="cred" />
       </copy>
       </assign>
      
       <assign>
       <copy>
       <from variable="CredenzialiRequest" part="inRequest" />
       <to variable="CAInput" part="cred" query="/cred/nome" />
       </copy>
       </assign>
      
       <assign>
       <copy>
       <from variable="CredenzialiRequest" part="inRequest" />
       <to variable="CAInput" part="cred" query="/cred/password" />
       </copy>
       </assign>
      
       <invoke name="ChiamaControlloAccesso" partnerLink="CAPL" operation="controlloAccessoOperation" portType="ns2:ControlloAccessoPortType" inputVariable="CAInput" outputVariable="CAOutput"/>
      
       <reply name="RitornaEsito" partnerLink="ReceivePL" operation="LoginOperation" portType="ns1:LoginPortType" variable="LoginOperationResponse"/>
       </sequence>
      
      </process>
      
      


      If ChiamaControlloAccesso is commented or removed the process works fine, but I got the previous exception if present.

      Thanks to anyone. Bye

        • 1. Re: org.jbpm.graph.def.DelegationException in JBPM-BPEL
          Agustín Gañan Newbie

          Hi
          I think that your problem is that you have to add the URL of the service that you invoke in the bpel-application.xml file. For example, I use 2 services in my bpel process and my bpel-application.xml is like this:

          <?xml version="1.0" encoding="UTF-8"?>
          <bpelApplication name="procesoLocalizacion" xmlns="http://jbpm.org/bpel"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xsi:schemaLocation="http://jbpm.org/bpel
           http://jbpm.org/bpel/bpel_application_1_0.xsd" >
           <serviceCatalogs>
           <urlCatalog contextUrl="http://ws.ip2location.com/">
           <!-- published WSDL document of Country Info Service -->
           <wsdl location="ip2locationwebservice.asmx?wsdl" />
           </urlCatalog>
           <urlCatalog contextUrl="http://www.atomic-x.com/xmlservices/">
           <!-- published WSDL document of Country Info Service -->
           <wsdl location="dnslookupservice.asmx?wsdl" />
           </urlCatalog>
           </serviceCatalogs>
          
          </bpelApplication>


          I hope that this help you

          Regards

          Agus

          • 2. Re: org.jbpm.graph.def.DelegationException in JBPM-BPEL
            Aldo Lezza Newbie

            Ok,
            thanks for answering but I have already set my URIs in the catalog.

            I saw it from advanced example ATM.

            I'm thinking that this error is related to wrong manipulation of messages and
            messages parts in the BPEL. This way when the service calling occurs the SOAP message is in a wrong state. This is due to wrong message manipulation in queries, i.e. you've to fully qualify the namespace of the objects you're going to modify.

            If you need further explanations, ask me.

            However, as soon I have a working example, I'll post it somewhere.

            Bye.

            • 3. Re: org.jbpm.graph.def.DelegationException in JBPM-BPEL
              Aldo Lezza Newbie

              I found it out!

              It was a bad web service building. I looks like when jbpm-bpel acts as a client (invoke situation) it is sensible to service implementation.

              I found out that my service was missing the soapAction attribute in the binding. The odd thing was that a test client worked out with that.

              But I regenerated the service after adding the soapAction and the invoke doesn't broke any more.

              Bye

              • 4. Re: org.jbpm.graph.def.DelegationException in JBPM-BPEL
                Alejandro Guizar Master

                Zazzaz,

                After an examination of the stack trace you posted, the error occurs inside the SAAJ implementation (JBossWS) not in jBPM BPEL code. I'd like to determine why JBossWS malfunctions when the sopaAction attribute is not present. Which JBoss AS version are you using?