2 Replies Latest reply on Oct 19, 2005 9:07 AM by Christian Kalkhoff

    Hibernate Support broken in JBoss 4.0.3? (UserTransaction no

    Christian Kalkhoff Newbie

      Hi,

      i just deployed my hibernate driven application in jboss 4.0.3. Previously it ran on jboss 4.0.3RC2 very fine.

      As soon the server was up and i tried to open a database connection with Session.beginTransaction it throws an exception:

      UserTransaction not bound

      Looking in JNDIView.list() the UserTransaction shows up in global JNDI Namespace.

      In a last attempt i replaced the lib/hibernate3.jar lib/hibernate-entitymanager.jar files with deploy/hibernate.deployer/hibernate3.jar and deploy/hibernate.deployer/hibernate-entitymanager.jar from JBoss 4.0.3RC2. Now everything works fine.

      Hope i helped some of the other people here.

        • 1. Re: Hibernate Support broken in JBoss 4.0.3? (UserTransactio
          Gyula K Newbie

          Unfortunatelly I don't have the jars from the RC2 and I have the same error.. I was able to fix the "UserTransaction not bound" issue by modifying the JBossTransactionManagerLookup class to contain the proper JNDI name ("UserTransaction" instead of "java:comp/UserTransaction") The transaction goes through this way, but I get a "org.hibernate.HibernateException: Not able to obtain connection" error later :(

          Here is the log:
          org.hibernate.HibernateException: Not able to obtain connection
          at org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:117)
          at org.hibernate.jdbc.AbstractBatcher.prepareSelectStatement(AbstractBatcher.java:99)
          at org.hibernate.persister.entity.AbstractEntityPersister.getDatabaseSnapshot(AbstractEntity
          Persister.java:977)
          at org.hibernate.engine.StatefulPersistenceContext.getDatabaseSnapshot(StatefulPersistenceCo
          ntext.java:304)
          at org.hibernate.engine.ForeignKeys.isTransient(ForeignKeys.java:189)
          at org.hibernate.engine.ForeignKeys$Nullifier.isNullifiable(ForeignKeys.java:137)
          at org.hibernate.engine.ForeignKeys$Nullifier.nullifyTransientReferences(ForeignKeys.java:69
          )
          at org.hibernate.engine.ForeignKeys$Nullifier.nullifyTransientReferences(ForeignKeys.java:47
          )
          at org.hibernate.event.def.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEven
          tListener.java:263)
          at org.hibernate.event.def.AbstractSaveEventListener.performSave(AbstractSaveEventListener.j
          ava:167)
          at org.hibernate.event.def.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventLi
          stener.java:114)
          at org.hibernate.event.def.DefaultPersistEventListener.entityIsTransient(DefaultPersistEvent
          Listener.java:131)
          at org.hibernate.event.def.DefaultPersistEventListener.onPersist(DefaultPersistEventListener
          .java:87)
          at org.hibernate.event.def.DefaultPersistEventListener.onPersist(DefaultPersistEventListener
          .java:38)
          at org.hibernate.impl.SessionImpl.firePersist(SessionImpl.java:589)
          at org.hibernate.impl.SessionImpl.persist(SessionImpl.java:567)
          at org.hibernate.impl.SessionImpl.persist(SessionImpl.java:571)
          at com.mypackage.persistence.dao.hibernate.GenericHibernateDAO.persist(GenericHibernateDAO.
          java:22)


          Any idea?
          Thanks!

          • 2. Re: Hibernate Support broken in JBoss 4.0.3? (UserTransactio
            Christian Kalkhoff Newbie

            The issue is in JIRA as http://jira.jboss.com/jira/browse/JBAS-2364 and has been fixed for release 4.0.3SP1.

            Release date is next monday, i hope it is held.[/url]