This content has been marked as final.
Show 4 replies
-
1. Re: Problems deploying process
shavianshakes Apr 4, 2006 11:10 PM (in response to shavianshakes)Sorry, the xml didnt show up on my previous post. Here it is:
-
2. Re: Problems deploying process
shavianshakes Apr 5, 2006 6:12 PM (in response to shavianshakes)[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
kukeltje Apr 5, 2006 9:58 PM (in response to shavianshakes)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 Apr 7, 2006 12:21 PM (in response to shavianshakes)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