org.hibernate.HibernateException: javax.naming.NameNotFoundException: Name comp/websphere not found in context "java:".

Hibernate JIRA | dave jackson | 1 decade ago
  1. 0

    Hibernate / Mailing Lists

    sourceforge.net | 1 year ago
    org.hibernate.HibernateException: javax.naming.NameNotFoundException: Name comp/websphere not found in context "java:".
  2. 0

    I'm currently having problems with the WAS6 ExtendedJTATransaction when using an MDB to update the database. The problem does not occur when using CMT SSBs. It looks like the ExtendedJTATransaction is simply not available after the CMT completes and the WebSphereExtendedJTATransactionLookup class attempts to look it up at java:comp/websphere/ExtendedJTATransaction as part of the normal 'after completion' callback. The problem occurs when the afterCompletion callback event fires and the ConnectionManager.isAggressiveRelease() method is called from ConnectionManager.afterTransaction(). This attempts to check to see if a transaction is in progress. This test in fact causes the transaction manager to be created (together with a look up of the current transaction) The lookup of the ExtendedJTATransaction fails and the an exception is thrown (see stack trace below). Although there may be an inconsistency in the way that a SSB and MDB operate, It seems fair to say that the transaction may not be available if it has completed. A workaround is therefore requested. Stack trace: [15/12/05 11:07:49:303 GMT] 0000003f RegisteredSyn E WTRN0074E: Exception caught from after_completion synchronization operation: org.hibernate.HibernateException: javax.naming.NameNotFoundException: Name comp/websphere not found in context "java:". at org.hibernate.transaction.WebSphereExtendedJTATransactionLookup$TransactionManagerAdapter$TransactionAdapter.<init>(WebSphereExtendedJTATransactionLookup.java:235) at org.hibernate.transaction.WebSphereExtendedJTATransactionLookup$TransactionManagerAdapter$TransactionAdapter.<init>(WebSphereExtendedJTATransactionLookup.java:215) at org.hibernate.transaction.WebSphereExtendedJTATransactionLookup$TransactionManagerAdapter.getTransaction(WebSphereExtendedJTATransactionLookup.java:163) at org.hibernate.util.JTAHelper.isTransactionInProgress(JTAHelper.java:36) at org.hibernate.jdbc.JDBCContext.isTransactionInProgress(JDBCContext.java:180) at org.hibernate.jdbc.ConnectionManager.isAggressiveRelease(ConnectionManager.java:142) at org.hibernate.jdbc.ConnectionManager.afterTransaction(ConnectionManager.java:189) at org.hibernate.jdbc.JDBCContext.afterTransactionCompletion(JDBCContext.java:213) at org.hibernate.transaction.CacheSynchronization.afterCompletion(CacheSynchronization.java:85) at org.hibernate.transaction.WebSphereExtendedJTATransactionLookup$1.invoke(WebSphereExtendedJTATransactionLookup.java:265) at $Proxy30.afterCompletion(Unknown Source) at com.ibm.ws.jtaextensions.SynchronizationCallbackWrapper.afterCompletion(SynchronizationCallbackWrapper.java:74) at com.ibm.ws.Transaction.JTA.RegisteredSyncs.distributeAfter(RegisteredSyncs.java(Compiled Code)) at com.ibm.ws.Transaction.JTA.TransactionImpl.distributeAfter(TransactionImpl.java:3652) at com.ibm.ws.Transaction.JTA.TransactionImpl.postCompletion(TransactionImpl.java:3631) at com.ibm.ws.Transaction.JTA.TransactionImpl.internalCommit(TransactionImpl.java:2522) at com.ibm.ws.Transaction.JTA.TransactionImpl.stage2CommitProcessing(TransactionImpl.java:1609) at com.ibm.ws.Transaction.JTA.TransactionImpl.processCommit(TransactionImpl.java:1483) at com.ibm.ws.Transaction.JTA.TransactionImpl.commit(TransactionImpl.java:1414) at com.ibm.ws.Transaction.JTA.TranManagerImpl.commit(TranManagerImpl.java:236) at com.ibm.ws.Transaction.JTA.TranManagerSet.commit(TranManagerSet.java:157) at com.ibm.ejs.csi.TranStrategy.commit(TranStrategy.java:716) at com.ibm.ejs.csi.TranStrategy.postInvoke(TranStrategy.java:167) at com.ibm.ejs.csi.TransactionControlImpl.postInvoke(TransactionControlImpl.java:569) at com.ibm.ejs.container.EJSContainer.postInvoke(EJSContainer.java(Compiled Code)) at com.ibm.ejs.container.MDBWrapper.onMessage(MDBWrapper.java:102) at com.ibm.ejs.container.MDBWrapper.onMessage(MDBWrapper.java:127) at com.ibm.ejs.jms.listener.ServerSession.run(ServerSession.java:458) at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1455) Caused by: javax.naming.NameNotFoundException: Name comp/websphere not found in context "java:". at com.ibm.ws.naming.ipbase.NameSpace.getParentCtxInternal(NameSpace.java(Compiled Code)) at com.ibm.ws.naming.ipbase.NameSpace.lookupInternal(NameSpace.java(Compiled Code)) at com.ibm.ws.naming.ipbase.NameSpace.lookup(NameSpace.java(Inlined Compiled Code)) at com.ibm.ws.naming.urlbase.UrlContextImpl.lookup(UrlContextImpl.java(Compiled Code)) at com.ibm.ws.naming.java.javaURLContextRoot.lookup(javaURLContextRoot.java(Compiled Code)) at com.ibm.ws.naming.java.javaURLContextRoot.lookup(javaURLContextRoot.java(Compiled Code)) at javax.naming.InitialContext.lookup(InitialContext.java(Compiled Code)) at org.hibernate.transaction.WebSphereExtendedJTATransactionLookup$TransactionManagerAdapter$TransactionAdapter.<init>(WebSphereExtendedJTATransactionLookup.java:227) ... 28 more

    Hibernate JIRA | 1 decade ago | dave jackson
    org.hibernate.HibernateException: javax.naming.NameNotFoundException: Name comp/websphere not found in context "java:".
  3. 0

    I'm currently having problems with the WAS6 ExtendedJTATransaction when using an MDB to update the database. The problem does not occur when using CMT SSBs. It looks like the ExtendedJTATransaction is simply not available after the CMT completes and the WebSphereExtendedJTATransactionLookup class attempts to look it up at java:comp/websphere/ExtendedJTATransaction as part of the normal 'after completion' callback. The problem occurs when the afterCompletion callback event fires and the ConnectionManager.isAggressiveRelease() method is called from ConnectionManager.afterTransaction(). This attempts to check to see if a transaction is in progress. This test in fact causes the transaction manager to be created (together with a look up of the current transaction) The lookup of the ExtendedJTATransaction fails and the an exception is thrown (see stack trace below). Although there may be an inconsistency in the way that a SSB and MDB operate, It seems fair to say that the transaction may not be available if it has completed. A workaround is therefore requested. Stack trace: [15/12/05 11:07:49:303 GMT] 0000003f RegisteredSyn E WTRN0074E: Exception caught from after_completion synchronization operation: org.hibernate.HibernateException: javax.naming.NameNotFoundException: Name comp/websphere not found in context "java:". at org.hibernate.transaction.WebSphereExtendedJTATransactionLookup$TransactionManagerAdapter$TransactionAdapter.<init>(WebSphereExtendedJTATransactionLookup.java:235) at org.hibernate.transaction.WebSphereExtendedJTATransactionLookup$TransactionManagerAdapter$TransactionAdapter.<init>(WebSphereExtendedJTATransactionLookup.java:215) at org.hibernate.transaction.WebSphereExtendedJTATransactionLookup$TransactionManagerAdapter.getTransaction(WebSphereExtendedJTATransactionLookup.java:163) at org.hibernate.util.JTAHelper.isTransactionInProgress(JTAHelper.java:36) at org.hibernate.jdbc.JDBCContext.isTransactionInProgress(JDBCContext.java:180) at org.hibernate.jdbc.ConnectionManager.isAggressiveRelease(ConnectionManager.java:142) at org.hibernate.jdbc.ConnectionManager.afterTransaction(ConnectionManager.java:189) at org.hibernate.jdbc.JDBCContext.afterTransactionCompletion(JDBCContext.java:213) at org.hibernate.transaction.CacheSynchronization.afterCompletion(CacheSynchronization.java:85) at org.hibernate.transaction.WebSphereExtendedJTATransactionLookup$1.invoke(WebSphereExtendedJTATransactionLookup.java:265) at $Proxy30.afterCompletion(Unknown Source) at com.ibm.ws.jtaextensions.SynchronizationCallbackWrapper.afterCompletion(SynchronizationCallbackWrapper.java:74) at com.ibm.ws.Transaction.JTA.RegisteredSyncs.distributeAfter(RegisteredSyncs.java(Compiled Code)) at com.ibm.ws.Transaction.JTA.TransactionImpl.distributeAfter(TransactionImpl.java:3652) at com.ibm.ws.Transaction.JTA.TransactionImpl.postCompletion(TransactionImpl.java:3631) at com.ibm.ws.Transaction.JTA.TransactionImpl.internalCommit(TransactionImpl.java:2522) at com.ibm.ws.Transaction.JTA.TransactionImpl.stage2CommitProcessing(TransactionImpl.java:1609) at com.ibm.ws.Transaction.JTA.TransactionImpl.processCommit(TransactionImpl.java:1483) at com.ibm.ws.Transaction.JTA.TransactionImpl.commit(TransactionImpl.java:1414) at com.ibm.ws.Transaction.JTA.TranManagerImpl.commit(TranManagerImpl.java:236) at com.ibm.ws.Transaction.JTA.TranManagerSet.commit(TranManagerSet.java:157) at com.ibm.ejs.csi.TranStrategy.commit(TranStrategy.java:716) at com.ibm.ejs.csi.TranStrategy.postInvoke(TranStrategy.java:167) at com.ibm.ejs.csi.TransactionControlImpl.postInvoke(TransactionControlImpl.java:569) at com.ibm.ejs.container.EJSContainer.postInvoke(EJSContainer.java(Compiled Code)) at com.ibm.ejs.container.MDBWrapper.onMessage(MDBWrapper.java:102) at com.ibm.ejs.container.MDBWrapper.onMessage(MDBWrapper.java:127) at com.ibm.ejs.jms.listener.ServerSession.run(ServerSession.java:458) at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1455) Caused by: javax.naming.NameNotFoundException: Name comp/websphere not found in context "java:". at com.ibm.ws.naming.ipbase.NameSpace.getParentCtxInternal(NameSpace.java(Compiled Code)) at com.ibm.ws.naming.ipbase.NameSpace.lookupInternal(NameSpace.java(Compiled Code)) at com.ibm.ws.naming.ipbase.NameSpace.lookup(NameSpace.java(Inlined Compiled Code)) at com.ibm.ws.naming.urlbase.UrlContextImpl.lookup(UrlContextImpl.java(Compiled Code)) at com.ibm.ws.naming.java.javaURLContextRoot.lookup(javaURLContextRoot.java(Compiled Code)) at com.ibm.ws.naming.java.javaURLContextRoot.lookup(javaURLContextRoot.java(Compiled Code)) at javax.naming.InitialContext.lookup(InitialContext.java(Compiled Code)) at org.hibernate.transaction.WebSphereExtendedJTATransactionLookup$TransactionManagerAdapter$TransactionAdapter.<init>(WebSphereExtendedJTATransactionLookup.java:227) ... 28 more

    Hibernate JIRA | 1 decade ago | dave jackson
    org.hibernate.HibernateException: javax.naming.NameNotFoundException: Name comp/websphere not found in context "java:".
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Hibernate Community • View topic - hibernate.cfg.xml not found

    hibernate.org | 3 months ago
    java.lang.ExceptionInInitializerError

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. org.hibernate.HibernateException

      javax.naming.NameNotFoundException: Name comp/websphere not found in context "java:".

      at org.hibernate.transaction.WebSphereExtendedJTATransactionLookup$TransactionManagerAdapter$TransactionAdapter.<init>()
    2. Hibernate
      WebSphereExtendedJTATransactionLookup$TransactionManagerAdapter.getTransaction
      1. org.hibernate.transaction.WebSphereExtendedJTATransactionLookup$TransactionManagerAdapter$TransactionAdapter.<init>(WebSphereExtendedJTATransactionLookup.java:235)
      2. org.hibernate.transaction.WebSphereExtendedJTATransactionLookup$TransactionManagerAdapter$TransactionAdapter.<init>(WebSphereExtendedJTATransactionLookup.java:215)
      3. org.hibernate.transaction.WebSphereExtendedJTATransactionLookup$TransactionManagerAdapter.getTransaction(WebSphereExtendedJTATransactionLookup.java:163)
      3 frames
    3. Hibernate
      JTAHelper.isTransactionInProgress
      1. org.hibernate.util.JTAHelper.isTransactionInProgress(JTAHelper.java:36)
      1 frame
    4. Hibernate
      WebSphereExtendedJTATransactionLookup$1.invoke
      1. org.hibernate.jdbc.JDBCContext.isTransactionInProgress(JDBCContext.java:180)
      2. org.hibernate.jdbc.ConnectionManager.isAggressiveRelease(ConnectionManager.java:142)
      3. org.hibernate.jdbc.ConnectionManager.afterTransaction(ConnectionManager.java:189)
      4. org.hibernate.jdbc.JDBCContext.afterTransactionCompletion(JDBCContext.java:213)
      5. org.hibernate.transaction.CacheSynchronization.afterCompletion(CacheSynchronization.java:85)
      6. org.hibernate.transaction.WebSphereExtendedJTATransactionLookup$1.invoke(WebSphereExtendedJTATransactionLookup.java:265)
      6 frames
    5. Unknown
      $Proxy30.afterCompletion
      1. $Proxy30.afterCompletion(Unknown Source)
      1 frame
    6. com.ibm.ws
      SynchronizationCallbackWrapper.afterCompletion
      1. com.ibm.ws.jtaextensions.SynchronizationCallbackWrapper.afterCompletion(SynchronizationCallbackWrapper.java:74)
      1 frame