0 Replies Latest reply on Oct 6, 2005 8:18 AM by Peter Voringer

    TransactionException: Could not find UserTransaction in JNDI

    Peter Voringer Newbie

      Hi,

      i developed with 4.0.3RC1+RC2 and all works fine. Today i tried to deploy my application to 4.0.3 release and i get an exception.

      In some way Hibernate TransactionFactory cannot create a Transaction because the Factory doesn´t find something via JNDI...

      My service.xml looks like this:

      <server>
       <mbean code="org.jboss.hibernate.jmx.Hibernate"
       name="jboss.har:service=Hibernate">
       <depends>jboss:service=Naming</depends>
       <depends>jboss:service=TransactionManager</depends>
       <depends>jboss.jca:service=DataSourceBinding,name=documentarchiv</depends>
       <attribute name="DatasourceName">java:/documentarchiv</attribute>
       <attribute name="Dialect">org.hibernate.dialect.MySQLDialect</attribute>
       <attribute name="SessionFactoryName">java:/hibernate/DocumentArchivSessionFactory</attribute>
       <attribute name="CacheProviderClass">org.hibernate.cache.NoCacheProvider</attribute>
       <attribute name="ShowSqlEnabled">true</attribute>
       </mbean>
      </server>
      
      


      Perhaps someone has the same problem and can give me some hints.
      Thx very much..


      Regards


      Peter




      The Exception Stacktrace looks like this:

      2005-10-06 14:10:04,015 DEBUG [org.hibernate.impl.SessionFactoryObjectFactory] JNDI lookup: hibernate/DocumentArchivSessionFactory
      2005-10-06 14:10:04,015 DEBUG [org.hibernate.impl.SessionFactoryObjectFactory] lookup: uid=013bb34806c5d6350106c5d682d00001
      2005-10-06 14:10:04,062 DEBUG [org.hibernate.jdbc.JDBCContext] successfully registered Synchronization
      2005-10-06 14:10:04,062 DEBUG [org.hibernate.impl.SessionImpl] opened session at timestamp: 11286006040
      2005-10-06 14:10:04,062 DEBUG [org.hibernate.transaction.JTATransaction] Looking for UserTransaction under: java:comp/UserTransaction
      2005-10-06 14:10:04,062 ERROR [org.hibernate.transaction.JTATransaction] Could not find UserTransaction in JNDI
      javax.naming.NameNotFoundException: UserTransaction not bound
       at org.jnp.server.NamingServer.getBinding(NamingServer.java:514)
       at org.jnp.server.NamingServer.getBinding(NamingServer.java:522)
       at org.jnp.server.NamingServer.getObject(NamingServer.java:528)
       at org.jnp.server.NamingServer.lookup(NamingServer.java:281)
       at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:610)
       at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:701)
       at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:572)
       at javax.naming.InitialContext.lookup(InitialContext.java:351)
       at org.hibernate.transaction.JTATransaction.<init>(JTATransaction.java:60)
       at org.hibernate.transaction.JTATransactionFactory.createTransaction(JTATransactionFactory.java:53)
       at org.hibernate.jdbc.JDBCContext.getTransaction(JDBCContext.java:190)
       at org.hibernate.impl.SessionImpl.getTransaction(SessionImpl.java:1197)
       at org.hibernate.impl.SessionImpl.beginTransaction(SessionImpl.java:1204)
       at de.absoft.documentarchiv.ejb.LoginManager.login(LoginManager.java:217)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:585)
       at org.jboss.invocation.Invocation.performCall(Invocation.java:345)
       at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:214)
       at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:149)
       at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:154)
       at org.jboss.webservice.server.ServiceEndpointInterceptor.invoke(ServiceEndpointInterceptor.java:54)
       at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:48)
       at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:106)
       at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:335)
       at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:166)
       at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:153)
       at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:192)
       at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
       at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:624)
       at org.jboss.ejb.Container.invoke(Container.java:873)
       at org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invoke(BaseLocalProxyFactory.java:415)
       at org.jboss.ejb.plugins.local.StatelessSessionProxy.invoke(StatelessSessionProxy.java:88)
       at $Proxy86.login(Unknown Source)
       at de.absoft.documentarchiv.util.LoginManagerUtil.login(LoginManagerUtil.java:81)
       at de.absoft.documentarchiv.web.filter.LoginFilter.doFilter(LoginFilter.java:45)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
       at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
       at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
       at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
       at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:39)
       at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:159)
       at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:59)
       at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
       at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
       at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
       at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
       at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
       at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
       at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
       at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
       at java.lang.Thread.run(Thread.java:595)
      2005-10-06 14:10:04,062 DEBUG [org.hibernate.transaction.CacheSynchronization] transaction after completion callback, status: 4
      2005-10-06 14:10:04,062 DEBUG [org.hibernate.jdbc.JDBCContext] after transaction completion
      2005-10-06 14:10:04,062 DEBUG [org.hibernate.impl.SessionImpl] after transaction completion
      2005-10-06 14:10:04,062 DEBUG [org.hibernate.transaction.CacheSynchronization] automatically closing session
      2005-10-06 14:10:04,062 DEBUG [org.hibernate.impl.SessionImpl] automatically closing session
      2005-10-06 14:10:04,062 DEBUG [org.hibernate.impl.SessionImpl] closing session
      2005-10-06 14:10:04,062 ERROR [org.jboss.ejb.plugins.LogInterceptor] RuntimeException in method: public abstract boolean de.absoft.documentarchiv.interfaces.LoginManagerLocal.login(de.absoft.documentarchiv.security.DAPrincipal) throws de.absoft.documentarchiv.exception.SystemException:
      org.hibernate.TransactionException: Could not find UserTransaction in JNDI:
       at org.hibernate.transaction.JTATransaction.<init>(JTATransaction.java:64)
       at org.hibernate.transaction.JTATransactionFactory.createTransaction(JTATransactionFactory.java:53)
       at org.hibernate.jdbc.JDBCContext.getTransaction(JDBCContext.java:190)
       at org.hibernate.impl.SessionImpl.getTransaction(SessionImpl.java:1197)
       at org.hibernate.impl.SessionImpl.beginTransaction(SessionImpl.java:1204)
       at de.absoft.documentarchiv.ejb.LoginManager.login(LoginManager.java:217)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:585)
       at org.jboss.invocation.Invocation.performCall(Invocation.java:345)
       at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:214)
       at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:149)
       at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:154)
       at org.jboss.webservice.server.ServiceEndpointInterceptor.invoke(ServiceEndpointInterceptor.java:54)
       at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:48)
       at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:106)
       at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:335)
       at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:166)
       at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:153)
       at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:192)
       at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
       at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:624)
       at org.jboss.ejb.Container.invoke(Container.java:873)
       at org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invoke(BaseLocalProxyFactory.java:415)
       at org.jboss.ejb.plugins.local.StatelessSessionProxy.invoke(StatelessSessionProxy.java:88)
       at $Proxy86.login(Unknown Source)
       at de.absoft.documentarchiv.util.LoginManagerUtil.login(LoginManagerUtil.java:81)
       at de.absoft.documentarchiv.web.filter.LoginFilter.doFilter(LoginFilter.java:45)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
       at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
       at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
       at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
       at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:39)
       at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:159)
       at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:59)
       at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
       at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
       at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
       at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
       at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
       at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
       at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
       at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
       at java.lang.Thread.run(Thread.java:595)