1 Reply Latest reply on Dec 15, 2005 3:33 AM by Alejandro Guizar

    BpelReader NullPointerException

    Roy Forever Newbie

      I am trying to deploy my business process
      by modifying Hello World example but found out problem of it.

      Just a minutes ago, I deploy Hello World example and run the test,
      it is complete success and I only replace hello.bpel and hello.wsdl
      and re-deploy it as following
      Open command line
      > CD C:\JBPM_BPEL\doc\examples\hello
      > ANT create-schema
      > ANT pack-definition
      > ANT deploy-definition

      The exception

      [deploypar] 16:22:55,234 INFO BpelReader : read wsdl definitions: hello.wsdl
      [deploypar] 16:22:55,296 DEBUG BpelReader : upgraded bpel document: hello.bpel
      [deploypar] java.lang.NullPointerException
      [deploypar] at org.jbpm.bpel.xml.BpelReader.readActivity(BpelReader.java:930
      )
      [deploypar] at org.jbpm.bpel.xml.BpelReader.readScope(BpelReader.java:416)
      [deploypar] at org.jbpm.bpel.xml.BpelReader.read(BpelReader.java:206)
      [deploypar] at org.jbpm.bpel.xml.BpelReader.read(BpelReader.java:162)
      [deploypar] at org.jbpm.bpel.par.BpelArchiveParser.readFromArchive(BpelArchi
      veParser.java:28)
      [deploypar] at org.jbpm.jpdl.par.ProcessArchive.parseProcessDefinition(Proce
      ssArchive.java:46)
      [deploypar] at org.jbpm.graph.def.ProcessDefinition.parseParZipInputStream(P
      rocessDefinition.java:154)
      [deploypar] at org.jbpm.jpdl.par.ProcessArchiveDeployer.deployZipInputStream
      (ProcessArchiveDeployer.java:46)
      [deploypar] at org.jbpm.ant.DeployParTask.deploy(DeployParTask.java:69)
      [deploypar] at org.jbpm.ant.DeployParTask.execute(DeployParTask.java:57)
      [deploypar] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.ja
      va:275)
      [deploypar] at org.apache.tools.ant.Task.perform(Task.java:364)
      [deploypar] at org.apache.tools.ant.Target.execute(Target.java:341)
      [deploypar] at org.apache.tools.ant.Target.performTasks(Target.java:369)
      [deploypar] at org.apache.tools.ant.Project.executeSortedTargets(Project.jav
      a:1216)
      [deploypar] at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
      
      [deploypar] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(De
      faultExecutor.java:40)
      [deploypar] at org.apache.tools.ant.Project.executeTargets(Project.java:1068
      )
      [deploypar] at org.apache.tools.ant.Main.runBuild(Main.java:668)
      [deploypar] at org.apache.tools.ant.Main.startAnt(Main.java:187)
      [deploypar] at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
      [deploypar] at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
      
      BUILD FAILED
      C:\JBPM_BPEL\doc\examples\hello\build.xml:101: couldn't deploy process archives
      : null
      
      Total time: 16 seconds


      The context of those modified files are following:
      hello.bpel
      <?xml version="1.0" encoding="UTF-8"?>
      <bpws:process xmlns:bpws="http://schemas.xmlsoap.org/ws/2003/03/business-process/"
      xmlns="http://schemas.xmlsoap.org/ws/2003/03/business-process/"
      xmlns:my="http://testing/Greeting"
      xmlns:xsd="http://www.w3.org/2001/XMLSchema"
      name="Greeting"
      suppressJoinFailure="yes"
      targetNamespace="http://testing/Greeting">
       <bpws:partnerLinks>
       <bpws:partnerLink myRole="GreetingRole" name="myPartnerLink"
       partnerLinkType="my:GreetingLT"/>
       </bpws:partnerLinks>
       <bpws:variables>
       <bpws:variable messageType="my:Message" name="myVariable"/>
       </bpws:variables>
       <bpws:sequence>
       <bpws:receive createInstance="yes" name="receive" operation="operation"
       partnerLink="myPartnerLink" portType="my:Greeting" variable="myVariable"/>
       <bpws:assign name="assign">
       <bpws:copy>
       <bpws:from expression="concat('Hello', bpws:getVariableData
       ('myVariable', 'part', '/my:GreetingMessage/value'))"/>
       <bpws:to part="part" query="/my:GreetingMessage/value"
       variable="myVariable"/>
       </bpws:copy>
       </bpws:assign>
       <bpws:reply name="reply" operation="operation" partnerLink="myPartnerLink"
       portType="my:Greeting" variable="myVariable"/>
       </bpws:sequence>
      </bpws:process>


      hello.wsdl
      <?xml version="1.0" encoding="UTF-8"?>
      <definitions xmlns="http://schemas.xmlsoap.org/wsdl/"
      xmlns:bpws="http://schemas.xmlsoap.org/ws/2003/03/business-process/"
      xmlns:my="http://testing/Greeting"
      xmlns:plnk="http://schemas.xmlsoap.org/ws/2003/05/partner-link/"
      xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
      xmlns:xsd="http://www.w3.org/2001/XMLSchema"
      name="Greeting - WSDL"
      targetNamespace="http://testing/Greeting">
       <types>
       <xsd:schema targetNamespace="http://testing/Greeting">
       <xsd:element name="GreetingMessage">
       <xsd:complexType>
       <xsd:sequence>
       <xsd:element name="value" type="xsd:string"/>
       </xsd:sequence>
       </xsd:complexType>
       </xsd:element>
       </xsd:schema>
       </types>
       <message name="Message">
       <part element="my:GreetingMessage" name="part"/>
       </message>
       <portType name="Greeting">
       <operation name="operation">
       <input message="my:Message" name="inputMessage"/>
       <output message="my:Message" name="Message"/>
       </operation>
       </portType>
       <binding name="GreetingBIND" type="my:Greeting">
       <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
       <operation name="operation">
       <soap:operation/>
       <input>
       <soap:body use="literal"/>
       </input>
       <output>
       <soap:body use="literal"/>
       </output>
       </operation>
       </binding>
       <service name="GreetingService">
       <port binding="my:GreetingBIND" name="GreetingPort">
       <soap:address location="http://localhost:8080/soap/GreetingService"/>
       </port>
       </service>
       <plnk:partnerLinkType name="GreetingLT">
       <plnk:role name="GreetingRole">
       <plnk:portType name="my:Greeting"/>
       </plnk:role>
       </plnk:partnerLinkType>
      </definitions>


      What is the mistake I made?
      In addition, Is there any document describe the deployment more details?

      Thank you very much for your useful help ^^

      Roy
      A complete beginner of jBPM

        • 1. Re: BpelReader NullPointerException
          Alejandro Guizar Master

          Apologies for the delay. I was working on this one today :-)

          BPEL 1.1 processes are supported through an XSL transformation at deployment time. There are, however, a multitude of corner cases, specially in namespace manipulation, that require special handling.

          Release 1.0 alpha 3 didn't test a process with prefixed elements in the BPEL document. Following Murphy's law, if it can fail, it will fail. Here, BpelReader looks for a child element of process, whose namespace URI equals that of v2, and whose local name matches a BPEL activity. The transformer fails and the activity remains with the old v1.1 namespace, so the process element appears not to have any activity.

          This issue is fixed now and will be included in the 1.0 alpha 4 release.