Atomikos Forum

All feedback will be investigated, but priority support, confidential support, and product priority updates are reserved for customers. Interested in becoming a customer? Subscribe here...

Only registered users can post (registration is free). Problems registering? Send an email to to get help.

Cannot call method 'commit' while a global transaction is runnin

I’m trying run Atomikos TransactionsEssentials with JPA(Hibernate). I’m getting this exception “Cannot call method 'commit' while a global transaction is running”. This is occuring when the EntityManager executes a persist:

UserTransaction userTransaction = new com.atomikos.icatch.jta.UserTransactionImp();
 HibernateEntityManagerFactory emf =  (HibernateEntityManagerFactory) Persistence.createEntityManagerFactory("wlsm");
  EntityManager em = emf.createEntityManager();
 EventEntity event = new EventEntity();
  em.persist(event);// throws exception

My persistence.xml
<property name="hibernate.connection.provider_class" value="com.atomikos.icatch.jta.hibernate3.AtomikosConnectionProvider"/>
<property name="hibernate.connection.atomikos.nonxa" value="true"/>
<property name="hibernate.connection.atomikos.driverClassName" value="com.informix.jdbc.IfxDriver"/>
<property name="hibernate.connection.atomikos.poolSize" value="1"/>
<property name="hibernate.connection.atomikos.maxPoolSize" value="1"/>
<property name="hibernate.connection.atomikos.user" value="informix"/>
<property name="hibernate.connection.atomikos.password" value="Werner1#"/>
<property name="hibernate.connection.atomikos.url" value="jdbc:informix-sqli://localhost:5621/wlms:INFORMIXSERVER=IDSLOCAL"/>
<property name="hibernate.connection.atomikos.uniqueResourceName" value="wlms"/>


I seen one post one this, but there was no solution offered.
Jay Watts Send private email
donderdag 9 juni 2011
Guy Pardon Send private email
donderdag 9 juni 2011
Yes I did.
Jay Watts Send private email
donderdag 9 juni 2011
I download the source code and step through in debug mode(Eclipse). Exception is thrown in AtomikosThreadLocalConnection.invoke

else if ( isInTransaction() ) {
            if (XA_INCOMPATIBLE_METHODS.contains(methodName))
                AtomikosSQLException.throwAtomikosSQLException("Cannot call method '" + methodName + "' while a global transaction is running");
Jay Watts Send private email
donderdag 9 juni 2011
I got this working, problem was with my persistence.xml configuration...was using hibernate 2 property names instead of hibernate 3 property names.
Jay Watts Send private email
vrijdag 10 juni 2011
Cool - thanks for the update!
Guy Pardon Send private email
dinsdag 14 juni 2011

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics
Powered by FogBugz