2 Replies Latest reply on Jun 11, 2007 8:32 AM by kukeltje

    Urgent, Please help

    vpnuser

      Hi,

      This is regarding Hello World Bpel process again. I am stuck at the deployment stage. Please give guidance in moving on.

      The error in eclipse is given below

      Buildfile: D:\Va\jbpm-bpel-1.1.Beta3\examples\hello\build.xml
      pack-definition:
      deploy-definition:
      [deployprocess] target url: http://localhost:8080/jbpm-bpel/deploy?processfile=file%3A%2FD%3A%2FVeena%2Fjbpm-bpel-1.1.Beta3%2Fexamples%2Fhello%2Ftarget%2Fhello-process.zip
      [deployprocess] got response code: 500
      BUILD FAILED: D:\Va\jbpm-bpel-1.1.Beta3\examples\common\bpel-build-hello.xml:68: deployment failed, see details in the server console
      Total time: 5 seconds
      


      The error in the console is

      08:32,731 ERROR [[processDeployServlet]] Servlet.service() for servlet processDeployServlet threw exception
       .java.lang.NullPointerException
       at java.util.Properties$LineReader.readLine(Properties.java:365)
       at java.util.Properties.load(Properties.java:293)
       at org.jbpm.util.ClassLoaderUtil.getProperties(ClassLoaderUtil.java:63)
       at org.jbpm.graph.def.ProcessDefinition.createNewProcessDefinition(ProcessDefinition.java:98)
       at org.jbpm.jpdl.par.ProcessArchive.parseProcessDefinition(ProcessArchive.java:77)
       at org.jbpm.bpel.web.ProcessDeployServlet.doGet(ProcessDeployServlet.java:50)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
       at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
       at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
       at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
       at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
       at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
       at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
       at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
       at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
       at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
       at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
       at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
       at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
       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)
      
      The bpel, wsdl and xml files are pasted below.
      
      BPEL is,
      
      
      <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/">
      
       <partnerLinks>
       <!-- establishes the relationship with the caller agent -->
       <partnerLink name="caller" partnerLinkType="tns:Greeter-Caller"
       myRole="Greeter" />
       </partnerLinks>
      
       <variables>
       <!-- holds the incoming message -->
       <variable name="request" messageType="tns:nameMessage" />
       <!-- holds the outgoing message -->
       <variable name="response" messageType="tns:greetingMessage" />
       </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('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>
      
      
      
      WSDL is,
      
      
      <definitions targetNamespace="http://jbpm.org/examples/hello"
       xmlns="http://schemas.xmlsoap.org/wsdl/"
       xmlns:tns="http://jbpm.org/examples/hello"
       xmlns:xsd="http://www.w3.org/2001/XMLSchema"
       xmlns:plt="http://schemas.xmlsoap.org/ws/2003/05/partner-link/">
      
       <!-- characterizes the relationship between the greeter and its caller -->
       <plt:partnerLinkType name="Greeter-Caller">
       <plt:role name="Greeter">
       <plt:portType name="tns:Greeter" />
       </plt:role>
       <!-- the Caller does not provide services to the Greeter,
       this is why we omit the "Caller" 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>
      
      
      
      bpel-definition.xml is given below.
      
      
      <?xml version="1.0" encoding="UTF-8"?>
      <bpelDefinition location="hello.bpel" xmlns="http://jbpm.org/bpel"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      
      
       <!-- makes WSDL interface elements available to the process -->
       <imports>
       <wsdl location="hello.wsdl" />
       </imports>
      
      </bpelDefinition>
      
      
      
      
      
      It is creating the hello-process.zip file in the target directory however not getting deployed. I tried the same for JBoss application server 4.0.4GA and 4.0.5GA. And jbpm-bpel-1.1.Beta3 is used.
      
      Please help me in this.


        • 1. Re: Urgent, Please help
          vpnuser

          I had made some changes in the build.xml files, please find them below.


          The bpel-build.xml is given below


          <?xml version="1.0"?>
          <project name="bpel">
          
           <!-- =============== -->
           <!-- === IMPORTS === -->
           <!-- =============== -->
          
           <import file="ws-build-hello.xml" />
          
           <!-- ================== -->
           <!-- === PROPERTIES === -->
           <!-- ================== -->
          
           <property name="bpel.dir" value="${project.dir}/src/main/bpel" />
          
          
          
           <!-- ================== -->
           <!-- === CLASSPATHS === -->
           <!-- ================== -->
          
           <path id="jbpm.bpel.path">
           <pathelement location="${common.config.dir}" />
           <pathelement location="${jbpm.bpel.config.dir}" />
           <pathelement location="${lib.jbpm.bpel.jar}" />
           <pathelement location="${lib.jbpm.jpdl.jar}" />
           <pathelement location="${lib1.dir}" />
           <pathelement location="${lib2.dir}" />
           <pathelement location="${lib3.dir}" />
           <pathelement location="${lib4.dir}" />
          
          
           <pathelement location="${lib.commons.collections.local}" />
           <pathelement location="${lib.commons.lang.local}" />
           <pathelement location="${lib.commons.logging.local}" />
           <pathelement location="${lib.dom4j.local}" />
           <pathelement location="${lib.jaxen.local}" />
           <pathelement location="${lib.log4j.local}" />
           <pathelement location="${lib.wsdl4j.local}" />
           </path>
          
           <!-- ======================= -->
           <!-- === ANT DEFINITIONS === -->
           <!-- ======================= -->
          
          
           <taskdef name="deployprocess"
           classname="org.jbpm.bpel.ant.DeployProcessTask"
           classpathref="jbpm.bpel.path" />
           <taskdef name="servicegen"
           classname="org.jbpm.bpel.ant.ServiceGeneratorTask"
           classpathref="jbpm.bpel.path" />
          
           <!-- ================================== -->
           <!-- === PROCESS DEFINITION DEPLOYMENT === -->
           <!-- ================================== -->
          
           <target name="pack-definition">
           <mkdir dir="${output.dir}" />
           <zip destfile="${output.dir}/${module.name}-process.zip">
           <fileset dir="${bpel.dir}" />
           </zip>
           </target>
          
          <target name="deploy-definition"
           depends="pack-definition"
           description="deploy the process definition to jbpm">
           <deployprocess processfile="D:/Va/jbpm-bpel-1.1.Beta3/examples/hello/target/${module.name}-process.zip" />
           <!-- Store the process definition in the jBPM database -->
           <storeprocess processfile="D:/Va/jboss-4.0.4.GA/server/default/deploy/${module.name}-process.zip" />
           </target>
          
           <!-- =============================== -->
           <!-- === WSDL SERVICE GENERATION === -->
           <!-- =============================== -->
          
           <target name="generate-service"
           depends="pack-definition"
           description="generate wsdl binding and service elements">
           <!-- generate binding and service elements -->
           <servicegen processfile="${output.dir}/${module.name}-process.zip"
           outputdir="${output.web.dir}/wsdl"
           bindingfile="${module.name}-binding-.wsdl"
           servicefile="${module.name}-service.wsdl" />
           <!-- copy xml schema documents -->
           <copy todir="${output.web.dir}/wsdl">
           <fileset dir="${bpel.dir}" includes="**/*.xsd" />
           </copy>
           </target>
          
           <!-- ============================== -->
           <!-- === APPLICATION DEPLOYMENT === -->
           <!-- ============================== -->
          
           <target name="redeploy"
           depends="deploy-definition, generate-service, generate-artifacts, deploy"
           description="deploy definition, regenerate artifacts and deploy web module" />
          
          </project>
          


          and the ws-build.xml is given below,
          <?xml version="1.0"?>
          <project name="template">
          
           <!-- ================== -->
           <!-- === PROPERTIES === -->
           <!-- ================== -->
          
           <!-- project directories -->
           <property name="common.dir" value="${ant.file.template}/.." />
           <property name="basedir" value="D:/Va/jbpm-bpel-1.1.Beta3" />
           <property name="project.dir" value="."/>
           <property name="module.name" value="hello"/>
          
           <property name="lib1.dir" value="D:/Va/jbpm-bpel-1.1.Beta3/lib/jbpm-bpel.jar" />
           <property name="lib2.dir" value="D:/Va/jbpm-bpel-1.1.Beta3/lib/jbpm-identity.jar" />
           <property name="lib3.dir" value="D:/Va/jbpm-bpel-1.1.Beta3/lib/jbpm-jmx.jar" />
           <property name="lib4.dir" value="D:/Va/jbpm-bpel-1.1.Beta3/lib/jbpm-jpdl.jar" />
           <property name="common.config.dir" value="D:/Va/jbpm-bpel-1.1.Beta3/examples/common/src/main/config" />
           <property name="jbpm.bpel.config.dir" value="D:/Va/jbpm-bpel-1.1.Beta3/config"/>
          <property name="lib.wsdl4j.local" value="D:/Va/jbpm-bpel-1.1.Beta3/lib/ibm-wsdl4j/1.5.2/lib"/>
          
          
           <property name="java.dir" value="${project.dir}/src/main/java" />
           <property name="resources.dir" value="${project.dir}/src/main/resources" />
           <property name="web.dir" value="${resources.dir}/web" />
           <property name="client.dir" value="${resources.dir}/client" />
          
           <property name="test.java.dir" value="${project.dir}/src/test/java" />
          
           <property name="output.dir" value="${project.dir}/target" />
           <property name="output.java.dir" value="${output.dir}/java" />
           <property name="output.classes.dir" value="${output.dir}/classes" />
           <property name="output.web.dir" value="${output.dir}/resources/web" />
          
           <property name="output.test.dir" value="${output.dir}/test" />
           <property name="output.test.classes.dir" value="${output.test.dir}/classes" />
           <property name="output.test.reports.dir" value="${output.test.dir}/reports" />
          
           <property name="common.java.dir" value="${common.dir}/src/main/java" />
           <property name="common.config.dir" value="${common.dir}/src/main/config" />
           <property name="common.classes.dir" value="${common.dir}/target/classes" />
          
           <!-- project specific properties -->
           <property name="module.name" value="${ant.project.name}" />
           <property name="jbpm.root" value="${common.dir}/../../.." />
          
           <!-- property files -->
           <property file="${user.home}/jbpm/build.properties" />
           <property file="../../config/build.properties" />
          
           <!-- jboss server configuration -->
           <property name="jboss.server" value="default" />
           <property name="jboss.server.dir"
           value="${jboss.home}/server/${jboss.server}" />
           <property name="jboss.server.deploy.dir"
           value="${jboss.home}/server/${jboss.server}/deploy" />
          
           <!-- ================== -->
           <!-- === CLASSPATHS === -->
           <!-- ================== -->
          
           <path id="jboss.path">
           <pathelement location="${common.config.dir}" />
           <fileset dir="${jboss.home}/client" includes="*.jar" />
           </path>
          
           <path id="wstools.path">
           <path refid="jboss.path" />
           <pathelement location="${web.dir}" />
           <pathelement location="${output.web.dir}" />
           </path>
          
           <path id="wscompile.path">
           <fileset dir="${jwsdp.home}/jaxrpc/lib" includes="*.jar" />
           <pathelement location="${java.home}/../lib/tools.jar" />
           <pathelement location="${resources.dir}" />
           </path>
          
           <path id="test.path">
           <path refid="jboss.path" />
           <pathelement location="${common.classes.dir}" />
           <pathelement location="${output.classes.dir}" />
           </path>
          
           <!-- =============== -->
           <!-- === CLEANUP === -->
           <!-- =============== -->
          
           <target name="clean" description="remove generated files">
           <delete dir="${output.dir}" failonerror="no" />
           </target>
          
           <!-- ==================================== -->
           <!-- === MAPPING ARTIFACTS GENERATION === -->
           <!-- ==================================== -->
          
           <target name="detect-wsgenerator">
           <available property="wstools.available"
           classname="org.jboss.ws.tools.ant.wstools"
           classpathref="jboss.path" />
           <condition property="wsgenerator.available">
           <or>
           <isset property="wstools.available" />
           <isset property="jwsdp.home" />
           </or>
           </condition>
           <fail message="no artifacts generator available"
           unless="wsgenerator.available" />
           </target>
          
           <target name="setup-wstools" if="wstools.available" unless="jwsdp.home">
           <taskdef name="wstools"
           classname="org.jboss.ws.tools.ant.wstools"
           classpathref="wstools.path" />
           <antcall target="call-wstools" />
           </target>
          
           <target name="call-wstools">
           <wstools dest="${output.java.dir}" config="${resources.dir}/wstools.xml" />
           <move file="${output.java.dir}/jaxrpc-mapping.xml"
           todir="${output.web.dir}" />
           </target>
          
           <target name="setup-wscompile" if="jwsdp.home">
           <taskdef name="wscompile"
           classname="com.sun.xml.rpc.tools.ant.Wscompile"
           classpathref="wscompile.path" />
           <mkdir dir="${output.classes.dir}" />
           <mkdir dir="${output.web.dir}" />
           <antcall target="call-wscompile" />
           <delete>
           <fileset dir="${output.java.dir}" includes="**/*_Impl.java" />
           <fileset dir="${output.classes.dir}" includes="**/*_Impl.class" />
           </delete>
           </target>
          
           <target name="call-wscompile">
           <wscompile fork="on"
           verbose="on"
           import="on"
           keep="on"
           features="norpcstructures,wsi,strict"
           base="${output.classes.dir}"
           sourcebase="${output.java.dir}"
           mapping="${output.web.dir}/jaxrpc-mapping.xml"
           config="${resources.dir}/wscompile.xml"
           classpathref="wscompile.path"
           jvmargs="-Duser.dir=${project.dir}" />
           </target>
          
           <target name="generate-artifacts"
           depends="detect-wsgenerator"
           description="generate java mapping artifacts">
           <mkdir dir="${output.java.dir}" />
           <antcall target="setup-wstools" />
           <antcall target="setup-wscompile" />
           </target>
          
           <!-- =================================== -->
           <!-- === CODE & RESOURCE COMPILATION === -->
           <!-- =================================== -->
          
           <target name="compile">
           <mkdir dir="${output.classes.dir}" />
           <javac destdir="${output.classes.dir}"
           classpathref="jboss.path"
           source="${javac.source}"
           target="${javac.target}"
           debug="${javac.debug}"
           deprecation="${javac.deprecation}">
           <src path="${java.dir}" />
           <src path="${output.java.dir}" />
           </javac>
           <copy todir="${output.classes.dir}">
           <fileset dir="${java.dir}" excludes="**/*.java" />
           </copy>
           </target>
          
           <!-- =========================== -->
           <!-- === WEB MODULE ASSEMBLY === -->
           <!-- =========================== -->
          
           <target name="pack-web" depends="compile">
           <war warfile="${output.dir}/${module.name}.war" webxml="${web.dir}/web.xml">
           <classes dir="${output.classes.dir}" />
           <webinf dir="${web.dir}" excludes="web.xml" />
           <webinf dir="${output.web.dir}" />
           </war>
           </target>
          
           <!-- ============================== -->
           <!-- === APPLICATION DEPLOYMENT === -->
           <!-- ============================== -->
          
           <target name="deploy"
           depends="pack-web"
           description="deploy application to server">
           <copy todir="${jboss.server.deploy.dir}"
           file="${output.dir}/${module.name}.war" />
           </target>
          
           <target name="undeploy" description="undeploy application from server">
           <delete file="${jboss.server.deploy.dir}/${module.name}.war" />
           </target>
          
           <target name="redeploy"
           depends="generate-artifacts, deploy"
           description="regenerate artifacts and deploy application" />
          
           <!-- ===================================== -->
           <!-- === APPLICATION CLIENT DEPLOYMENT === -->
           <!-- ===================================== -->
          
           <available property="client.available" file="${client.dir}" type="dir" />
          
           <target name="pack-client" if="client.available">
           <mkdir dir="${output.dir}" />
           <jar destfile="${output.dir}/${module.name}-client.jar">
           <metainf dir="${client.dir}" />
           <metainf file="${output.web.dir}/jaxrpc-mapping.xml" />
           <zipfileset dir="${jboss.server.dir}/data/wsdl/${module.name}.war"
           prefix="META-INF/wsdl" />
           </jar>
           </target>
          
           <target name="deploy-client" depends="pack-client" if="client.available">
           <copy todir="${jboss.server.deploy.dir}"
           file="${output.dir}/${module.name}-client.jar" />
           </target>
          
           <target name="undeploy-client" if="client.available">
           <delete file="${jboss.server.deploy.dir}/${module.name}-client.jar" />
           </target>
          
           <!-- ====================== -->
           <!-- === TEST EXECUTION === -->
           <!-- ====================== -->
          
           <available property="test.available" file="${test.java.dir}" type="dir" />
          
           <target name="compile-common">
           <mkdir dir="${common.classes.dir}" />
           <javac destdir="${common.classes.dir}"
           srcdir="${common.java.dir}"
           classpathref="jboss.path"
           source="${javac.source}"
           target="${javac.target}"
           debug="${javac.debug}"
           deprecation="${javac.deprecation}" />
           </target>
          
           <target name="compile-test" depends="compile-common" if="test.available">
           <mkdir dir="${output.test.classes.dir}" />
           <javac destdir="${output.test.classes.dir}"
           srcdir="${test.java.dir}"
           classpathref="test.path"
           source="${javac.source}"
           target="${javac.target}"
           debug="${javac.debug}"
           deprecation="${javac.deprecation}" />
           </target>
          
           <target name="run-test"
           depends="compile-test"
           description="test the deployed application"
           if="test.available">
           <antcall target="pack-client" />
           <mkdir dir="${output.test.reports.dir}" />
           <junit fork="on"
           forkmode="once"
           printsummary="on"
           haltonfailure="on"
           dir="${output.dir}">
           <sysproperty key="jbossws.target.server" value="jboss" />
           <classpath>
           <path refid="test.path" />
           <pathelement path="${output.test.classes.dir}" />
           </classpath>
           <batchtest todir="${output.test.reports.dir}">
           <fileset dir="${output.test.classes.dir}" includes="**/*Test.class" />
           </batchtest>
           <formatter type="xml" />
           </junit>
           </target>
          
          </project>
          


          • 2. Re: Urgent, Please help
            kukeltje

            and? you changed the build scripts but expect us to find the differences?

            Besides that, the error reports a nullpointer in parsing a properties file. Would it be possible for you to track down what the cause of this is?