6 Replies Latest reply on Apr 20, 2007 4:06 AM by agusgr

    Can't deploy my BPEL process to jBPM BPEL 1.1 Beta3

    rainstar79

      Hi,

      I've got a problem in deploying my first BPEL process. I know it's a long text to read, but if you help me with this problem you will save my life ;-)

      I modeled my first BPEL process by using the Eclipse BPEL designer. Now I am at the point that I need to deploy this process. Therefore I took the examples folder of the jBPM BPEL 1.1 and replaced the files in the hello folder, by my new BPEL artifacts.
      When I run the ant task pack-definition, a zip file is generated properly. But when I say deploy-definition, an exception is thrown:

      [deployprocess] target url: http://localhost:8080/jbpm-bpel/deploy?processfile=file%3A%2FC%3A%2FProgramme%2FJava%2Fjbpm-bpel-1.1.Beta3%2Fexamples%2Fplanets%2Ftarget%2Fatm-process.zip
      [deployprocess] got response code: 500
      
      BUILD FAILED
      C:\Programme\Java\jbpm-bpel-1.1.Beta3\examples\common\bpel-build.xml:60: deployment failed, see details in the server console
      
      


      and

      2007-04-12 12:10:29,096 INFO [org.jbpm.bpel.xml.BpelReader] read wsdl
       definitions: PlanetsService.wsdl
      2007-04-12 12:10:29,112 INFO [org.jbpm.bpel.xml.BpelReader] read wsdl
       definitions: PlanetsServiceArtifacts.wsdl
      2007-04-12 12:10:29,112 INFO [org.jbpm.bpel.xml.BpelReader] read wsdl
       definitions: PlanetsService.wsdl
      2007-04-12 12:10:29,128 INFO [org.jbpm.bpel.xml.BpelReader] read wsdl
       definitions: droid.wsdl
      2007-04-12 12:10:29,128 ERROR [org.jbpm.bpel.xml.ProblemHandler]
      PlanetsService.bpel could not read wsdl document
      java.io.FileNotFoundException: C:\Programme\Java\jboss-4.0.5.GA\bin
      (Access denied)
       at java.io.FileInputStream.open(Native Method)
       at java.io.FileInputStream.<init>(FileInputStream.java:106)
       at org.jboss.net.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:105)
      
       at org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(Unknown
      Source)
       at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
      
       at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
      
       at java.lang.Thread.run(Thread.java:595)
      2007-04-12 12:10:29,128 ERROR [org.jbpm.bpel.xml.ProblemHandler]
      PlanetsService.bpel could not read wsdl document
      WSDLException: faultCode=PARSER_ERROR: Problem parsing ''.:
      C:\Programme\Java\jboss-4.0.5.GA\bin (Zugriff verweigert):
      java.io.FileNotFoundException: C:\Programme\Java\jboss-4.0.5.GA\bin (Zugriff verweigert)
      
       at java.io.FileInputStream.open(Native Method)
       at java.io.FileInputStream.<init>(FileInputStream.java:106)
       at org.jboss.net.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:105)
      
       at org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(Unknown
      Source)
      
      
      
      
      
      My BPEL process is defined in PlanetsService.bpel and is as follows:
      
      <?xml version="1.0" encoding="UTF-8"?>
      <bpws:process xmlns:bpws="http://schemas.xmlsoap.org/ws/2004/03/business-process/"
      xmlns:ns="http://planets.euArtifacts"
      xmlns:ns0="http://pluto.researchstudio.at/ibpm/DROIDService.jws"
      xmlns:ns1="http://pluto.researchstudio.at/ibpm/MigrateService.jws"
      xmlns:tns="http://planets.eu" exitOnStandardFault="yes"
      name="PlanetsService" suppressJoinFailure="yes"
      targetNamespace="http://planets.eu">
      
      <bpws:import importType="http://schemas.xmlsoap.org/wsdl/"
      location="PlanetsService.wsdl" namespace="http://planets.eu"/>
      
      <bpws:import importType="http://schemas.xmlsoap.org/wsdl/"
      location="droid.wsdl" namespace="http://pluto.researchstudio.at/ibpm/DROIDService.jws"/>
      <bpws:import importType="http://schemas.xmlsoap.org/wsdl/"
      namespace="http://planets.euArtifacts"/>
      <bpws:import importType="http://schemas.xmlsoap.org/wsdl/"
      location="PlanetsServiceArtifacts.wsdl" namespace="http://planets.euArtifacts"/>
      <bpws:import importType="http://schemas.xmlsoap.org/wsdl/"
      location="migration.wsdl" namespace="http://pluto.researchstudio.at/ibpm/MigrateService.jws"/>
      
      <bpws:partnerLinks>
      <bpws:partnerLink myRole="PlanetsServiceProvider" name="client"
      partnerLinkType="tns:PlanetsService" partnerRole="PlanetsServiceRequester"/>
      <bpws:partnerLink name="DROID" partnerLinkType="ns:DROID-PLKT"
      partnerRole="DROIDService"/>
      <bpws:partnerLink name="Migration" partnerLinkType="ns:Migration-PLKT"
       partnerRole="MigrationService"/>
      </bpws:partnerLinks>
      <bpws:variables>
      <bpws:variable messageType="tns:PlanetsServiceRequestMessage" name="input"/>
      <bpws:variable messageType="tns:PlanetsServiceResponseMessage" name="output"/>
      <bpws:variable messageType="ns0:identifyFormatResponse" name="DROIDResponse"/>
      <bpws:variable messageType="ns0:identifyFormatRequest" name="DROIDRequest"/>
      <bpws:variable messageType="ns1:migrateFileResponse" name="MigrationResponse"/>
      <bpws:variable messageType="ns1:migrateFileRequest" name="MigrationRequest"/>
      </bpws:variables>
      <bpws:sequence name="main">
      <bpws:receive createInstance="yes" name="receiveInput"
      operation="initiate" partnerLink="client" portType="tns:PlanetsService" variable="input"/>
      <bpws:assign name="Assign" validate="no">
      <bpws:copy>
      <bpws:from part="payload" variable="input">
      <bpws:query queryLanguage="http://www.w3.org/TR/1999/REC-xpath-19991116">
      <![CDATA[/tns:input]]></bpws:query>
      </bpws:from>
      <bpws:to part="s" variable="DROIDRequest"/>
      </bpws:copy>
      </bpws:assign>
      <bpws:invoke inputVariable="DROIDRequest" name="InvokeDROID"
      operation="identifyFormat" outputVariable="DROIDResponse"
      partnerLink="DROID" portType="ns0:DROIDService"/>
      
      <bpws:assign name="Assign1" validate="no">
      <bpws:copy>
      <bpws:from part="identifyFormatReturn" variable="DROIDResponse"/>
      <bpws:to part="file" variable="MigrationRequest"/>
      </bpws:copy>
      </bpws:assign>
      <bpws:invoke inputVariable="MigrationRequest" name="InvokeMigration"
       operation="migrateFile" outputVariable="MigrationResponse"
      partnerLink="Migration" portType="ns1:MigrateService"/>
      <bpws:assign name="Assign2" validate="no">
      <bpws:copy>
      <bpws:from part="migrateFileReturn" variable="MigrationResponse"/>
      <bpws:to part="payload" variable="output">
      <bpws:query queryLanguage="http://www.w3.org/TR/1999/REC-xpath-19991116"><![CDATA[/tns:result]]></bpws:query>
      </bpws:to>
      </bpws:copy>
      </bpws:assign>
      <bpws:invoke inputVariable="output" name="callbackClient"
      operation="onResult" partnerLink="client" portType="tns:PlanetsServiceCallback"/>
      </bpws:sequence>
      </bpws:process>
      
      
      
      
      
      My PlanetsService.wsdl is:
      
      
      <?xml version="1.0"?>
      <definitions name="PlanetsService"
       targetNamespace="http://planets.eu"
       xmlns:tns="http://planets.eu"
       xmlns:plnk="http://schemas.xmlsoap.org/ws/2004/03/partner-link/"
       xmlns="http://schemas.xmlsoap.org/wsdl/"
       >
      
      <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
       TYPE DEFINITION - List of services participating in this BPEL process
       The default output of the BPEL designer uses strings as input and
       output to the BPEL Process. But you can define or import any XML
       Schema type and us them as part of the message types.
       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
       <types>
       <schema attributeFormDefault="unqualified"
       elementFormDefault="qualified"
       targetNamespace="http://planets.eu"
       xmlns="http://www.w3.org/2001/XMLSchema"
       >
      
       <element name="PlanetsServiceRequest">
       <complexType>
       <sequence>
       <element name="input" type="string" />
       </sequence>
       </complexType>
       </element>
      
       <element name="PlanetsServiceResponse">
       <complexType>
       <sequence>
       <element name="result" type="string"/>
       </sequence>
       </complexType>
       </element>
      
       </schema>
       </types>
      
      <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
       MESSAGE TYPE DEFINITION - Definition of the message types used as
       part of the port type defintions
       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
       <message name="PlanetsServiceRequestMessage">
       <part name="payload" element="tns:PlanetsServiceRequest"/>
       </message>
      
       <message name="PlanetsServiceResponseMessage">
       <part name="payload" element="tns:PlanetsServiceResponse"/>
       </message>
      
      
      <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
       PORT TYPE DEFINITION - A port type groups a set of operations into
       a logical service unit.
       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
       <!-- portType implemented by the PlanetsService BPEL process -->
       <portType name="PlanetsService">
       <operation name="initiate">
       <input message="tns:PlanetsServiceRequestMessage"/>
       </operation>
       </portType>
      
       <!-- portType implemented by the requester of PlanetsService BPEL process
       for asynchronous callback purposes
       -->
       <portType name="PlanetsServiceCallback">
       <operation name="onResult">
       <input message="tns:PlanetsServiceResponseMessage"/>
       </operation>
       </portType>
      
      
      <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
       PARTNER LINK TYPE DEFINITION
       the PlanetsService partnerLinkType binds the provider and
       requester portType into an asynchronous conversation.
       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
       <plnk:partnerLinkType name="PlanetsService">
       <plnk:role name="PlanetsServiceProvider" portType="tns:PlanetsService"/>
       <plnk:role name="PlanetsServiceRequester" portType="tns:PlanetsServiceCallback"/>
       </plnk:partnerLinkType>
      </definitions>
      
      
      
      This is my bpel-definition in the Meta-Inf folder:
      
      
      <?xml version="1.0" encoding="UTF-8"?>
      <bpelDefinition location="PlanetsService.bpel" 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_definition_1_0.xsd">
      
       <!-- makes WSDL interface elements available to the process -->
       <imports>
       <wsdl location="PlanetsService.wsdl" />
       <wsdl location="PlanetsServiceArtifacts.wsdl" />
       </imports>
      
      </bpelDefinition>
      
      
      
      and here is my PlanetsServiceArtifacts.wsdl:
      
      
      <?xml version="1.0" encoding="UTF-8"?>
      <bpelDefinition location="PlanetsService.bpel" 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_definition_1_0.xsd">
      
       <!-- makes WSDL interface elements available to the process -->
       <imports>
       <wsdl location="PlanetsService.wsdl" />
       <wsdl location="PlanetsServiceArtifacts.wsdl" />
       </imports>
      
      </bpelDefinition>
      
      
      
      
      I invoke 2 external Services, which can be found here:
      http://pluto.researchstudio.at/ibpm/DROIDService.jws?wsdl
      http://pluto.researchstudio.at/ibpm/MigrateService.jws?wsdl
      
      Thanks for your HELP!!!!
      cheers Rainer


        • 1. Re: Can't deploy my BPEL process to jBPM BPEL 1.1 Beta3

          Hi,
          I had the same problem. The eclipse designer don't create the files properly.
          I've found one error in your code:
          1.- In PlanetService.bpel you have this line:

          <bpws:import importType="http://schemas.xmlsoap.org/wsdl/"
          namespace="http://planets.euArtifacts"/>

          In this line, you only import a namespace, not a file, and the bpel parser throw this exception:
          WSDLException: faultCode=PARSER_ERROR: Problem parsing ''.:
          , because tries to import a file without name.
          Try to remove this line. Notice that you import the namespace in the next line, and there will be no problem.

          If you make this change, probably have a new exception. Something like "partner link doesn't match". The error probably will be in the PlanetServiceArtifacts.wsdl, but in your post you have write the same code for bpel-definition.xml and PlanetServiceArtifacts.wsdl. Post the correct code.

          I hope that I help you.
          Sorry for my bad English,
          Regards,
          Agus

          • 2. Re: Can't deploy my BPEL process to jBPM BPEL 1.1 Beta3
            rainstar79

            Hi agusgr,
            THANK you for your reply!!!!!!!
            I will check it out right now and post my results.
            Thanks for the hint that I posted the same code twice, so here is the code for PlanetsServiceArtifacts.wsdl

            <?xml version="1.0" encoding="UTF-8"?>
            <definitions xmlns:bpws="http://schemas.xmlsoap.org/ws/2004/03/business-process/"
             xmlns:plnk="http://schemas.xmlsoap.org/ws/2004/03/partner-link/"
            xmlns:tns="http://planets.euArtifacts"
            xmlns:wsdl="http://pluto.researchstudio.at/ibpm/DROIDService.jws"
            xmlns:wsdl1="http://pluto.researchstudio.at/ibpm/MigrateService.jws"
            name="PlanetsServiceArtifacts"
            targetNamespace="http://planets.euArtifacts"
            xmlns="http://schemas.xmlsoap.org/wsdl/">
            <plnk:partnerLinkType name="DROID-PLKT">
            <plnk:role name="DROIDService" portType="wsdl:DROIDService"/>
            </plnk:partnerLinkType>
            <plnk:partnerLinkType name="Migration-PLKT">
            <plnk:role name="MigrationService" portType="wsdl1:MigrateService"/>
            </plnk:partnerLinkType>
            <import location="droid.wsdl" namespace="http://pluto.researchstudio.at/ibpm/DROIDService.jws"/>
            <import location="migration.wsdl" namespace="http://pluto.researchstudio.at/ibpm/MigrateService.jws"/>
            </definitions>
            
            


            Stay tunded!

            Cheers

            • 3. Re: Can't deploy my BPEL process to jBPM BPEL 1.1 Beta3
              rainstar79

              you are right agusgr, now I got the following error message:

              11:53:35,448 ERROR [[processDeployServlet]] Servlet.service() for servlet proces
              sDeployServlet threw exception
              org.jbpm.jpdl.JpdlException: [[ERROR] PlanetsService.bpel port type of first rol
              e not found [/bpws:process/bpws:partnerLinks/bpws:partnerLink[2]], [ERROR] Plane
              tsService.bpel port type of first role not found [/bpws:process/bpws:partnerLink
              s/bpws:partnerLink[3]], [ERROR] PlanetsService.bpel operation not found [/bpws:p
              rocess/bpws:sequence/bpws:invoke[1]], [ERROR] PlanetsService.bpel could not read
               process document]
               at org.jbpm.jpdl.par.ProcessArchive.parseProcessDefinition(ProcessArchiv
              e.java:84)
               at org.jbpm.bpel.web.ProcessDeployServlet.doGet(ProcessDeployServlet.jav
              a:50)
              


              • 4. Re: Can't deploy my BPEL process to jBPM BPEL 1.1 Beta3

                Well, try to move the import statement in PlanetServiceArtifacts.wsdl at the beginning, just after the definition, like this:

                <?xml version="1.0" encoding="UTF-8"?>
                <definitions xmlns:bpws="http://schemas.xmlsoap.org/ws/2004/03/business-process/"
                 xmlns:plnk="http://schemas.xmlsoap.org/ws/2004/03/partner-link/"
                xmlns:tns="http://planets.euArtifacts"
                xmlns:wsdl="http://pluto.researchstudio.at/ibpm/DROIDService.jws"
                xmlns:wsdl1="http://pluto.researchstudio.at/ibpm/MigrateService.jws"
                name="PlanetsServiceArtifacts"
                targetNamespace="http://planets.euArtifacts"
                xmlns="http://schemas.xmlsoap.org/wsdl/">
                
                <import location="droid.wsdl" namespace="http://pluto.researchstudio.at/ibpm/DROIDService.jws"/>
                <import location="migration.wsdl" namespace="http://pluto.researchstudio.at/ibpm/MigrateService.jws"/>
                
                <plnk:partnerLinkType name="DROID-PLKT">
                <plnk:role name="DROIDService" portType="wsdl:DROIDService"/>
                </plnk:partnerLinkType>
                <plnk:partnerLinkType name="Migration-PLKT">
                <plnk:role name="MigrationService" portType="wsdl1:MigrateService"/>
                </plnk:partnerLinkType>
                </definitions>


                Read this post,
                http://www.jboss.com/index.html?module=bb&op=viewtopic&t=102501
                I had the same problem as you.
                I think that you can deploy your bpel process well with this changes.
                Regards,

                Agus

                • 5. Re: Can't deploy my BPEL process to jBPM BPEL 1.1 Beta3
                  rainstar79

                  Hi Agus,
                  thanks for your help. I was now able to deploy my process!!!!!!

                  But here is my next question :-)

                  What is my next step after I ran: ant deploy-definition I got the right message:

                  17:31:35,559 INFO [[/jbpm-bpel]] processDeployServlet:
                  deployed process definition: Planets


                  I always thought, that my process is now running as a Web Service and I can see it in the jboss Monitoring under http://localhost:8080/jbossws/services?

                  Where do I see my BPEL process running now in order to create a client to communicate with my process?!?

                  ..or do I have to run another ant-task?!?

                  Thanks for your help!
                  Cheers Rainer


                  • 6. Re: Can't deploy my BPEL process to jBPM BPEL 1.1 Beta3

                    Hi,
                    Now you have the bpel process running in the server, but not as a web service. The next steps are:
                    1.- Create the wsdl files to interact whit the process. You have to run the ant task: ant generate-service.
                    2.- Create the "artifacts" to interact whit the process. You have to run the ant task: ant generate-artifacts.
                    3.- Deploy the web service to interact whit the process. You have to run the ant task: ant deploy.

                    To the first step you don't need any file, only run the ant task. It generates some wsdl files in the target folder.
                    To the second step you need the wscompile.xml file. It's a file with the configuaration settings to the wscompile tool. It generates the java classes that your web service uses.
                    To the third step you need:
                    -web.xml
                    -webservices.xml
                    -bpel-application.xml
                    -A class that implements the interface generated in the second step.

                    You have more information in the user guide, there are some examples. It's in \jbpm-bpel-1.1.Beta3\doc\userguide.

                    Try to do it, and post your problems.
                    Regards,

                    Agus