[jbpm-users] [JBoss jBPM] - Deploy Processdefinition via Ant

MikeSchulze do-not-reply at jboss.com
Thu Mar 5 08:36:21 EST 2009


Hi - I am having some problems deploying my process-definition. I have looked at the reference-documentation but it didn't helped me much because it's quite incomplete and out of date.
My problem:


  | [deploypar] WARNUNG: Could not bind factory to JNDI
  | [deploypar] javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file:  java.naming.factory.initial
  | [deploypar] 	at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:645)
  | [deploypar] 	at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:247)
  | [deploypar] 	at javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:284)
  | [deploypar] 	at javax.naming.InitialContext.getNameParser(InitialContext.java:439)
  | [deploypar] 	at org.hibernate.util.NamingHelper.bind(NamingHelper.java:52)
  | [deploypar] 	at org.hibernate.impl.SessionFactoryObjectFactory.addInstance(SessionFactoryObjectFactory.java:90)
  | [deploypar] 	at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:306)
  | [deploypar] 	at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1294)
  | [deploypar] 	at org.jbpm.persistence.db.DbPersistenceServiceFactory.getSessionFactory(DbPersistenceServiceFactory.java:91)
  | [deploypar] 	at org.jbpm.persistence.db.DbPersistenceService.getSessionFactory(DbPersistenceService.java:95)
  | [deploypar] 	at org.jbpm.persistence.db.DbPersistenceService.getSession(DbPersistenceService.java:99)
  | [deploypar] 	at org.jbpm.persistence.db.DbPersistenceService.getGraphSession(DbPersistenceService.java:345)
  | [deploypar] 	at org.jbpm.JbpmContext.getGraphSession(JbpmContext.java:571)
  | [deploypar] 	at org.jbpm.JbpmContext.deployProcessDefinition(JbpmContext.java:173)
  | [deploypar] 	at org.jbpm.ant.DeployProcessTask.deploy(DeployProcessTask.java:93)
  | [deploypar] 	at org.jbpm.ant.DeployProcessTask.execute(DeployProcessTask.java:58)
  | [deploypar] 	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
  | [deploypar] 	at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
  | [deploypar] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  | [deploypar] 	at java.lang.reflect.Method.invoke(Method.java:585)
  | [deploypar] 	at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105)
  | [deploypar] 	at org.apache.tools.ant.Task.perform(Task.java:348)
  | [deploypar] 	at org.apache.tools.ant.Target.execute(Target.java:357)
  | [deploypar] 	at org.apache.tools.ant.Target.performTasks(Target.java:385)
  | [deploypar] 	at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329)
  | [deploypar] 	at org.apache.tools.ant.Project.executeTarget(Project.java:1298)
  | [deploypar] 	at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
  | [deploypar] 	at org.eclipse.ant.internal.ui.antsupport.EclipseDefaultExecutor.executeTargets(EclipseDefaultExecutor.java:32)
  | [deploypar] 	at org.apache.tools.ant.Project.executeTargets(Project.java:1181)
  | [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:\eclipse_workspace\saporo-util\build\build.xml:422: java.lang.NoClassDefFoundError: antlr/ANTLRException
  | 

this is my ant-taget:

  | 	<target name="deploy-process">
  | 	      <taskdef name="deploypar" classname="org.jbpm.ant.DeployProcessTask">
  | 	        	<classpath id="process-classpath">
  | 	        		<fileset dir="${util.dir}/build/deploy-process"/>
  | 	        		<pathelement location="${ejb.project.dir}/target/my.jar/com/myproject/common/sql/SolarfixDB2Dialect.class"/>
  | 	        	</classpath>    
  | 	      </taskdef>
  | 	      <deploypar process="${util.dir}/build/deploy-process/process.par"/> 
  | 	    </target>
  | 
Within the classpath i have the following jars:

  | bsh.jar
  | cglib.jar
  | commons-collections.jarr
  | commons-logging.jar
  | hibernate3.jar
  | jbpm-jpdl.jar
  | log4j.xml
  | 
  | 
  | My hibernate.cfg.xml and my jbpm.cfg.xml are included within my Process-Archive, because it wasn't sufficient ti just add them to the classpath. This is a part of my Hibernate.cfg.xml:
  | 
  | 
  |   | <?xml version='1.0' encoding='utf-8'?>
  |   | <!DOCTYPE hibernate-configuration PUBLIC
  |   |           "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
  |   |           "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
  |   | <hibernate-configuration>
  |   |   <session-factory>
  |   |     <property name="hibernate.dialect">org.hibernate.dialect.DB2Dialect</property>
  |   | 	
  |   |     <!-- JDBC connection properties (begin) -->
  |   |     <property name="hibernate.connection.driver_class">com.ibm.db2.jcc.DB2Driver</property>
  |   |     <property name="hibernate.connection.url">jdbc:db2://localhost:50000/MYDB:currentSchema=SCHEMA;</property>
  |   |     <property name="hibernate.connection.username">user</property>
  |   |     <property name="hibernate.connection.password">password</property>
  |   |     <!--  JDBC connection properties (end) -->   
  |   |     
  |   |     <!-- JTA transaction properties (begin)
  |   |     <property name="hibernate.transaction.factory_class">org.hibernate.transaction.JTATransactionFactory</property>
  |   |     <property name="hibernate.transaction.manager_lookup_class">org.hibernate.transaction.JBossTransactionManagerLookup</property>
  |   |     JTA transaction properties (end) -->
  |   | 
  | 
  | Does anybody have an idea, what i've done wrong? Why do i have to declare JNDI - when i just want to deploy my processdefinition?
  | 
  | Thx - Mike

View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4215293#4215293

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4215293



More information about the jbpm-users mailing list