[jboss-user] [JBoss jBPM] - problem with transaction

mkalibek do-not-reply at jboss.com
Sat Feb 23 05:27:20 EST 2008


Hello, I'm quite new to jBPM.

I wrote such part of code


  | JbpmConfiguration jbpmConfiguration = JbpmConfiguration.getInstance();
  | 		JbpmContext jbpmContext = jbpmConfiguration.createJbpmContext();
  | 		try {
  | 			TaskInstance ti = jbpmContext.loadTaskInstanceForUpdate(taskID);
  | 			// do something
  | 			ti.end();
  | 		}
  | 		finally {
  | 			jbpmContext.close();
  | 		}
  | 

Here after task instance is finished, process instance must end.
As I understand, jbpmContext saves task instance and then process instance attempts to be saved to. But following error occurs:


  | 16:08:22,015 ERROR [EjbSchedulerService] javax.naming.NameNotFoundException: ejb not bound
  | 16:08:22,015 ERROR [GraphElement] action threw exception: ejb local timer lookup problem
  | org.jbpm.JbpmException: ejb local timer lookup problem
  | 	at org.jbpm.scheduler.ejbtimer.EjbSchedulerService.<init>(EjbSchedulerService.java:34)
  | 	at org.jbpm.scheduler.ejbtimer.EjbSchedulerServiceFactory.openService(EjbSchedulerServiceFactory.java:11)
  | 	at org.jbpm.svc.Services.getService(Services.java:144)
  | 	at org.jbpm.svc.Services.getCurrentService(Services.java:91)
  | 	at org.jbpm.graph.exe.ProcessInstance.end(ProcessInstance.java:329)
  | 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  | 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
  | 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  | 	at java.lang.reflect.Method.invoke(Method.java:585)
  | 	at org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.invoke(JavassistLazyInitializer.java:173)
  | ...
  | ...
  | ...
  | 

In jbpm.cfg.xml settings are:

  |     <service name="persistence">
  |       <factory>
  |         <bean class="org.jbpm.persistence.db.DbPersistenceServiceFactory">
  |           <field name="isCurrentSessionEnabled">
  |             <true/>
  |           </field>
  |         </bean>      	
  |       </factory>
  |     </service>
  | 

In hibernate.cfg.xml are:


  |     <property name="hibernate.transaction.factory_class">org.hibernate.transaction.JTATransactionFactory</property>
  |     <property name="hibernate.transaction.manager_lookup_class">org.hibernate.transaction.JBossTransactionManagerLookup</property>
  |     <property name="jta.UserTransaction">java:comp/UserTransaction</property>
  | 
Anyone knows why it is?

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

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



More information about the jboss-user mailing list