0 Replies Latest reply on Dec 6, 2011 2:06 AM by ganesh.guddu

    No TransactionManagerLookup configured ??

    ganesh.guddu

      I am new to Jboss App server. I have a sample Hibernate application( using container managed entityManager) deployed on Jboss AS. I am getting following lines in my log file :

       

      INFO  [org.hibernate.transaction.TransactionManagerLookupFactory] (http-127.0.0.1-8080-1) No TransactionManagerLookup configured (in JTA environment, use of read-write or transactional second-level cache is not recommended)

      Everything is working fine when I am trying to fetching Objects from Database.When trying to update an object I am getting this exception :

      ERROR [org.hibernate.ejb.AbstractEntityManagerImpl] (http-127.0.0.1-8080-1) Unable to mark for rollback on PersistenceException:

      java.lang.IllegalStateException: [com.arjuna.ats.internal.jta.transaction.arjunacore.nosuchtx] [com.arjuna.ats.internal.jta.transaction.arjunacore.nosuchtx] No such transaction!

         at com.arjuna.ats.internal.jta.transaction.arjunacore.BaseTransaction.setRollbackOnly(BaseTransaction.java:191)

      .

      INFO  [STDOUT] (http-127.0.0.1-8080-1) Executing an update/delete query

      ERROR [STDERR] (http-127.0.0.1-8080-1) javax.persistence.TransactionRequiredException: Executing an update/delete query

      ERROR [STDERR] (http-127.0.0.1-8080-1)    at org.hibernate.ejb.QueryImpl.executeUpdate(QueryImpl.java:48)

      .

      I tried with the following property in my persistence.xml file :

      <property name="hibernate.transaction.factory_class " value="org.hibernate.transaction.JTATransactionFactory"/>     

      <property name="hibernate.transaction.manager_lookup_class" value="org.hibernate.transaction.JBossTransactionManagerLookup"/>

      <property name="jta.UserTransaction"  value="java:comp/UserTransaction"/>

      But the problem is not solved. Am I missing something ?? or I will have to do some configuration changes in JBoss AS to use TransactionManager.

       

      Thanks.