1 Reply Latest reply on Oct 3, 2007 6:49 AM by Daniel Zimmermann

    javax.persistence.PersistenceException: org.hibernate.Hibern

    Daniel Zimmermann Newbie

      Hi @all!

      since I've solved my fist larger problem (even if a small missing thing was causing it) I had encountered a variety of different other Exception - wrong libraries and such stuff.

      But know I'm - again - looking very confused on my server logging...


      3:58:23,406 INFO [SessionFactoryImpl] building session factory
      13:58:23,890 INFO [SessionFactoryObjectFactory] Not binding factory to JNDI, no JNDI name configured
      13:58:23,890 ERROR [[TologResponderServlet]] Servlet.service() for servlet TologResponderServlet threw exception
      javax.persistence.PersistenceException: org.hibernate.HibernateException: The chosen transaction strategy requires access to the JTA TransactionManager
      at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:720)
      at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:121)
      at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:51)
      at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:33)
      at de.zimmermann.diplom.tmservice.util.database.TologTestDatabaseQueryResponder.init_local(TologTestDatabaseQueryResponder.java:612)
      at de.zimmermann.diplom.tmservice.util.TologQueryResponder.init_local(TologQueryResponder.java:56)
      at de.zimmermann.diplom.tmservice.servlet.TologResponderServlet.processRequest(TologResponderServlet.java:69)
      at de.zimmermann.diplom.tmservice.servlet.TologResponderServlet.doGet(TologResponderServlet.java:140)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
      at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
      at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
      at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580)
      at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
      at java.lang.Thread.run(Thread.java:619)
      Caused by: org.hibernate.HibernateException: The chosen transaction strategy requires access to the JTA TransactionManager
      at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:329)
      at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1294)
      at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:713)
      ... 27 more


      Has anyone of you already encountered such a problem and remembers, what you've done to solve it???

      Thanks in advance!
      BGMF

        • 1. Re: javax.persistence.PersistenceException: org.hibernate.Hi
          Daniel Zimmermann Newbie

          Ok, I solved it by myself.

          It would be rude, not to tell you, what was wrong!

          I dunno what excatly I've made wrong, when I build my programm, but the problem was my chosen transaction-strategy in persistence.xml - I'd chosen JTA.

          I googled a lot and found this:
          http://www.abcseo.com/tech/java/jboss-ebj-troubleshooting

          Search for

          JTA Transaction Manager


          I have tagged a class @Stateless and it works all fine in application context (without those ear stuff and the db-connection divided from the rest of the application) but there was the problem.
          I did everything like they shown in this solvement and added this property
          <property name="hibernate.transaction.manager_lookup_class" value="org.hibernate.transaction.JBossTransactionManagerLookup"/>

          to the property section in the persistence.xml

          Now everything working fine!

          Thank you anyway...
          BGMF