4 Replies Latest reply on Apr 7, 2006 12:21 PM by fptoth

    Problems deploying process

    Shavian Shakes Newbie


      New to Jboss/Eclipse here.

      I am using the jBPM 3.1-beta3 startes kit.

      I followed the instructions in http://wiki.jboss.org/wiki/Wiki.jsp?page=JbpmGettingStarted and they worked very smoothly. Nice.

      After that I followed the graphical process designer guide (http://docs.jboss.com/jbpm/v3/gpd/) but when I try to deploy the process via the "Deploy Process Archive" in Eclipse, I get the error pasted in the end. I saw a couple of other folks having similar problems on this forum and looks like this is a bug (???)

      I then try the ant route to deploy the hello.par process. Here is my ant file:

      <?xml version="1.0"?>


      description










      [ The document mentions using DeployParTask, but I didnt find any such class in the jar file. Also, cfg seems to be a mandatory attribute something not mentioned in the docs]

      When I run this, I get the error:

      BUILD FAILED
      java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory

      So I added the commons logging jar files to the project and put them in the classpath etc. Even then I am getting the same error. I searched around on this forum and google but no hints so far.

      Any pointers on how to proceed will be really helpful.

      ------
      Exception with the "Deploy Process Archive" from Eclpise:

      java.io.IOException: Server returned HTTP response code: 500 for URL: http://localhost:8080/jbpm/upload
      at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
      at org.jbpm.ui.util.ProcessDeployer.deployProcessWithServlet(Unknown Source)
      at org.jbpm.ui.util.ProcessDeployer.access$2(Unknown Source)
      at org.jbpm.ui.util.ProcessDeployer$1.run(Unknown Source)
      at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:346)
      at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:291)
      at org.eclipse.jface.dialogs.ProgressMonitorDialog.run(ProgressMonitorDialog.java:447)

        • 1. Re: Problems deploying process
          Shavian Shakes Newbie

          Sorry, the xml didnt show up on my previous post. Here it is:






          • 2. Re: Problems deploying process
            Shavian Shakes Newbie

            [Finally figured how to add code in the text]:

            <?xml version="1.0"?>
            <project name="Hello jBPM" default="Main Build">
             <description>
             description
             </description>
            
             <target name="Main Build">
             <taskdef name="deploypar" classname="org.jbpm.ant.DeployProcessTask">
             <classpath path="C:\work\jboss\jbpm-starter-kit\jbpm-starters-kit-3.1\jbpm\build\jbpm-3.1.jar" />
             </taskdef>
             <deploypar process="src/process/hello.par" cfg="C:\work\workspace\Hello jBPM\src\config.files\hibernate.cfg.xml" />
             </target>
            </project>
            



            Since the error I was getting was related to the commons-logging, I added that to the external jars section for the ant file (build.xml above). On running the same, the error (java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory) went away, but I got new NoClassDefFoundError relating to dom4j and hibernate classes which got subsequently resolved when I added the repective jars to the ant file classpath (not the project's classpath).

            After this the ant build starts but fails midway giving the following error:

            Main Build:
            [deploypar] Apr 5, 2006 3:05:26 PM org.hibernate.cfg.Environment
            [deploypar] INFO: Hibernate 3.1
            [deploypar] Apr 5, 2006 3:05:26 PM org.hibernate.cfg.Environment
            [deploypar] INFO: hibernate.properties not found
            [deploypar] Apr 5, 2006 3:05:26 PM org.hibernate.cfg.Environment
            [deploypar] INFO: using CGLIB reflection optimizer
            [deploypar] Apr 5, 2006 3:05:26 PM org.hibernate.cfg.Environment
            [deploypar] INFO: using JDK 1.4 java.sql.Timestamp handling
            [deploypar] Apr 5, 2006 3:05:26 PM org.hibernate.cfg.Configuration configure
            [deploypar] INFO: configuring from file: hibernate.cfg.xml
            [deploypar] Apr 5, 2006 3:05:26 PM org.hibernate.cfg.Configuration addResource
            [deploypar] INFO: Reading mappings from resource: org/jbpm/graph/action/Script.hbm.xml
            [deploypar] org.hibernate.MappingException: Resource: org/jbpm/graph/action/Script.hbm.xml not found
            [deploypar] at org.hibernate.cfg.Configuration.addResource(Configuration.java:478)
            [deploypar] at org.hibernate.cfg.Configuration.parseMappingElement(Configuration.java:1443)
            [deploypar] at org.hibernate.cfg.Configuration.parseSessionFactory(Configuration.java:1411)
            [deploypar] at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1392)
            [deploypar] at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1368)
            [deploypar] at org.hibernate.cfg.Configuration.configure(Configuration.java:1322)
            [deploypar] at org.jbpm.ant.AntHelper.getConfiguration(AntHelper.java:55)
            [deploypar] at org.jbpm.ant.AntHelper.getJbpmConfiguration(AntHelper.java:93)
            [deploypar] at org.jbpm.ant.DeployProcessTask.execute(DeployProcessTask.java:57)
            [deploypar] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java: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.java:1216)
            [deploypar] at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
            [deploypar] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
            [deploypar] at org.eclipse.ant.internal.ui.antsupport.EclipseDefaultExecutor.executeTargets(EclipseDefaultExecutor.java:32)
            [deploypar] at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
            [deploypar] at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.run(InternalAntRunner.java:423)
            [deploypar] at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.main(InternalAntRunner.java:137)

            BUILD FAILED
            C:\Documents and Settings\NKhandel\workspace\Hello jBPM\build.xml:11: couldn't deploy process archives : Resource: org/jbpm/graph/action/Script.hbm.xml not found
            at org.jbpm.ant.DeployProcessTask.execute(DeployProcessTask.java:88)
            at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
            at org.apache.tools.ant.Task.perform(Task.java:364)
            at org.apache.tools.ant.Target.execute(Target.java:341)
            at org.apache.tools.ant.Target.performTasks(Target.java:369)
            at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
            at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
            at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
            at org.eclipse.ant.internal.ui.antsupport.EclipseDefaultExecutor.executeTargets(EclipseDefaultExecutor.java:32)
            at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
            at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.run(InternalAntRunner.java:423)
            at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.main(InternalAntRunner.java:137)

            Total time: 2 seconds


            So, clueless again. Looks like I am doing something stupid, coz no one else seems to be getting these problems (?). Also I am wondering if all these jars are really required in the ant classpat ?

            • 3. Re: Problems deploying process
              Ronald van Kuijk Master

              what about adding org/jbpm/graph/action/Script.hbm.xml to the classparth as well, or better, the parent dir of /org/.... since I bet you will get multiple errors again if you just add this file.

              And no, nobody gets these errors. Did you start with some newly self prepared ant script?

              And yes, all these are needed in the classpath.

              hth,

              Ronald

              • 4. Re: Problems deploying process
                fptoth Newbie

                Hi,

                I used your build.xml as a starting point and tried to accomplish the same thing (deploying a process with ant).

                It worked, but see my new post about hibernate.properties problems.

                Here's my build.xml:

                <?xml version="1.0"?>
                <project name="Hello jBPM" default="Main Build">
                 <description>
                 description
                 </description>
                
                 <target name="Main Build">
                 <taskdef name="deploypar" classname="org.jbpm.ant.DeployProcessTask">
                 <classpath>
                 <pathelement path="src/config.files/" />
                 <pathelement path="build/jbpm-3.1.jar" />
                 <fileset dir="lib/jboss" includes="*.jar"/>
                 <fileset dir="lib/hibernate" includes="*.jar"/>
                 <pathelement path="build/classes.identity/" />
                 <fileset dir="lib/dom4j" />
                 <pathelement path="../jbpm-db/mssql/lib/jtds-1.2.jar" />
                 </classpath>
                 </taskdef>
                 <deploypar
                 process="build/websale.process"
                 cfg="src/config.files/npg-hibernate.cfg.xml"
                 />
                 </target>
                </project>


                Fred