[jboss-user] [JBoss jBPM] - Could not instantiate TransactionManagerLookup

greenHand do-not-reply at jboss.com
Wed May 28 14:35:36 EDT 2008


I have the jbpm-enterprise.ear deployed in Weblogic 9.2.3. The jndi to the data source is also setup. I wrote a message driven bean to invoke jbpm with the following onMessage() method:
	public void onMessage(Message msg) {
  | 		try {
  | 			InitialContext ctx = new InitialContext();
  | 			
  | 			RemoteCommandServiceHome commandServiceHome = 
  | 				(RemoteCommandServiceHome) ctx.lookup("ejb/CommandServiceBean");
  | 			RemoteCommandService commandService = commandServiceHome.create();
  | 			commandService.execute(new NewProcessInstanceCommand("MyProcessDef"));
  | 		}
  | 		catch (NamingException e) {
  | 			// TODO Auto-generated catch block
  | 			e.printStackTrace();
  | 		}
  | 		catch (RemoteException e) {
  | 			// TODO Auto-generated catch block
  | 			e.printStackTrace();
  | 		}
  | 		catch (CreateException e) {
  | 			// TODO Auto-generated catch block
  | 			e.printStackTrace();
  | 		}
  | 		catch (Exception e) {
  | 			// TODO Auto-generated catch block
  | 			e.printStackTrace();
  | 		}
  | 	}
However, I got the "Could not instantiate TransactionManagerLookup" error when the message is received:

org.jbpm.JbpmException: couldn't execute org.jbpm.command.NewProcessInstanceCommand at 139ed6f
	at org.jbpm.ejb.impl.CommandServiceBean.execute(CommandServiceBean.java:92)
	at org.jbpm.ejb.impl.CommandServiceBean_jdfmx8_EOImpl.execute(CommandServiceBean_jdfmx8_EOImpl.java:60)
	at org.jbpm.ejb.impl.CommandServiceBean_jdfmx8_EOImpl_WLSkel.invoke(Unknown Source)
	at weblogic.rmi.internal.ServerRequest.sendReceive(ServerRequest.java:174)
	at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:335)
	at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:252)
	at org.jbpm.ejb.impl.CommandServiceBean_jdfmx8_EOImpl_923_WLStub.execute(Unknown Source)
	at com.pbsg.mst.wf.WFStarterMDB.onMessage(WFStarterMDB.java:48)
	at weblogic.ejb.container.internal.MDListener.execute(MDListener.java:429)
	at weblogic.ejb.container.internal.MDListener.transactionalOnMessage(MDListener.java:335)
	at weblogic.ejb.container.internal.MDListener.onMessage(MDListener.java:291)
	at com.ibm.mq.jms.MQMessageConsumer.receiveAsyncQ(MQMessageConsumer.java:2431)
	at com.ibm.mq.jms.MQMessageConsumer.receiveAsync(MQMessageConsumer.java:3816)
	at com.ibm.mq.jms.SessionAsyncHelper.run(SessionAsyncHelper.java:420)
	at java.lang.Thread.run(Thread.java:595)

org.hibernate.HibernateException: Could not instantiate TransactionManagerLookup
	at org.hibernate.transaction.TransactionManagerLookupFactory.getTransactionManagerLookup(TransactionManagerLookupFactory.java:47)
	at org.hibernate.cfg.SettingsFactory.createTransactionManagerLookup(SettingsFactory.java:418)
	at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:140)
	at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2009)
	at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1292)
	at org.jbpm.persistence.db.DbPersistenceServiceFactory.getSessionFactory(DbPersistenceServiceFactory.java:91)
	at org.jbpm.persistence.db.DbPersistenceService.getSessionFactory(DbPersistenceService.java:95)
	at org.jbpm.persistence.db.DbPersistenceService.getSession(DbPersistenceService.java:99)
	at org.jbpm.persistence.db.DbPersistenceService.getGraphSession(DbPersistenceService.java:341)
	at org.jbpm.JbpmContext.getGraphSession(JbpmContext.java:571)
	at org.jbpm.JbpmContext.newProcessInstance(JbpmContext.java:408)
	at org.jbpm.command.NewProcessInstanceCommand.execute(NewProcessInstanceCommand.java:74)
	at org.jbpm.ejb.impl.CommandServiceBean.execute(CommandServiceBean.java:90)
	at org.jbpm.ejb.impl.CommandServiceBean_jdfmx8_EOImpl.execute(CommandServiceBean_jdfmx8_EOImpl.java:60)
	at org.jbpm.ejb.impl.CommandServiceBean_jdfmx8_EOImpl_WLSkel.invoke(Unknown Source)
	at weblogic.rmi.internal.ServerRequest.sendReceive(ServerRequest.java:174)
	at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:335)
	at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:252)
	at org.jbpm.ejb.impl.CommandServiceBean_jdfmx8_EOImpl_923_WLStub.execute(Unknown Source)
	at com.pbsg.mst.wf.WFStarterMDB.onMessage(WFStarterMDB.java:48)
	at weblogic.ejb.container.internal.MDListener.execute(MDListener.java:429)
	at weblogic.ejb.container.internal.MDListener.transactionalOnMessage(MDListener.java:335)
	at weblogic.ejb.container.internal.MDListener.onMessage(MDListener.java:291)
	at com.ibm.mq.jms.MQMessageConsumer.receiveAsyncQ(MQMessageConsumer.java:2431)
	at com.ibm.mq.jms.MQMessageConsumer.receiveAsync(MQMessageConsumer.java:3816)
	at com.ibm.mq.jms.SessionAsyncHelper.run(SessionAsyncHelper.java:420)
	at java.lang.Thread.run(Thread.java:595)
> 

Here is the hibernate.cfg.xml settings:

<session-factory>
  | 
  |     <!-- hibernate dialect -->
  |     <property name="hibernate.dialect">org.hibernate.dialect.Oracle9Dialect</property>
  | 
  |     <!-- JDBC connection properties (begin) ===
  |     <property name="hibernate.connection.driver_class">oracle.jdbc.driver.OracleDriver</property>
  |     <property name="hibernate.connection.url">jdbc:oracle:thin:@localhost:1521:xe</property>
  |     <property name="hibernate.connection.username">name</property>
  |     <property name="hibernate.connection.password">pass</property>
  |     ==== JDBC connection properties (end) -->
  |     
  |     <property name="hibernate.cache.provider_class">org.hibernate.cache.HashtableCacheProvider</property>
  |     
  |     <!-- DataSource properties (begin) -->
  |     <property name="hibernate.connection.datasource">java:comp/env/jdbc/JbpmDS</property>
  |     <!-- DataSource 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.WebLogicTransactionManagerLookup</property>
  |     ==== JTA transaction properties (end) -->
  | 
  |     <!-- CMT transaction properties (begin) -->
  |     <property name="hibernate.transaction.factory_class">org.hibernate.transaction.CMTTransactionFactory</property>
  |     <property name="hibernate.transaction.manager_lookup_class">org.hibernate.transaction.WebLogicTransactionManagerLookup</property>
  |     <!-- CMT transaction properties (end) -->

Can anyone help? Thank you very much for your help.

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

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



More information about the jboss-user mailing list