0 Replies Latest reply on Jan 25, 2008 3:49 PM by Priya Venkatesan

    Using JBOSS optimistic tree cache and Websphere 6.1.0.13

    Priya Venkatesan Newbie

      Hi,
      While trying to use hibernate 3.2.5 with WAS 6.1.0.13 I am facing these issues:
      My hibernate cfg file has the transaction manager set up to be

      org.hibernate.transaction.WebSphereExtendedJTATransactionLookup which is recommended

      while using hibernate with Websphere 6.1. I am using CMT transaction manager factory. However this gives me the error:

      aused by: java.lang.UnsupportedOperationException
      at

      org.hibernate.transaction.WebSphereExtendedJTATransactionLookup$TransactionManagerAdapte

      r.suspend(WebSphereExtendedJTATransactionLookup.java:111)
      at org.jboss.cache.interceptors.TxInterceptor.invoke(TxInterceptor.java:78)
      at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:67)
      at

      org.jboss.cache.interceptors.CacheMgmtInterceptor.invoke(CacheMgmtInterceptor.java:80)
      at org.jboss.cache.TreeCache.invokeMethod(TreeCache.java:4241)
      ... 40 more

      Then going through JBOSS discussion boards, I understood that I need to set the

      transaction manager to be org.hibernate.transaction.WebSphereTransactionManagerLookup

      which is meant to be used for lower versions of websphere. By doing so, this error

      disppeared, however I got the following problem while using optimistic tree cache.

      [1/25/08 11:49:45:664 PST] 00000029 RegisteredSyn E WTRN0074E: Exception caught from

      before_completion synchronization operation: org.jboss.util.NestedRuntimeException: ; -

      nested throwable: (org.jboss.cache.lock.TimeoutException: write lock for / could not be

      acquired after 15000 ms. Locks: Read lock owners: {}
      Write lock owner: GlobalTransaction::1
      (caller=GlobalTransaction::2, lock info: write owner=GlobalTransaction::1

      (activeReaders=0, activeWriter=Thread[QTMSessionPool,5,], waitingReaders=0,

      waitingWriters=1, waitingUpgrader=0)))
      at

      org.jboss.cache.interceptors.TxInterceptor$LocalSynchronizationHandler.beforeCompletion(

      TxInterceptor.java:1022)
      at

      org.jboss.cache.interceptors.OrderedSynchronizationHandler.beforeCompletion(OrderedSynch

      ronizationHandler.java:72)
      at

      com.ibm.ws.Transaction.JTA.RegisteredSyncs.distributeBefore(RegisteredSyncs.java:242)
      at

      com.ibm.ws.Transaction.JTA.TransactionImpl.prePrepare(TransactionImpl.java:2389)
      at

      com.ibm.ws.Transaction.JTA.TransactionImpl.stage1CommitProcessing(TransactionImpl.java:1

      622)
      at

      com.ibm.ws.Transaction.JTA.TransactionImpl.processCommit(TransactionImpl.java:1593)
      at com.ibm.ws.Transaction.JTA.TransactionImpl.commit(TransactionImpl.java:1528)
      at com.ibm.ws.Transaction.JTA.TranManagerImpl.commit(TranManagerImpl.java:237)
      at com.ibm.ws.Transaction.JTA.TranManagerSet.commit(TranManagerSet.java:162)
      at com.ibm.ejs.csi.TranStrategy.commit(TranStrategy.java:756)
      at com.ibm.ejs.csi.TranStrategy.postInvoke(TranStrategy.java:181)
      at

      com.ibm.ejs.csi.TransactionControlImpl.postInvoke(TransactionControlImpl.java:581)
      at com.ibm.ejs.container.EJSContainer.postInvoke(EJSContainer.java:3910)
      at

      com.ibm.ejs.container.MessageEndpointHandler.afterDelivery(MessageEndpointHandler.java:1

      353)
      at

      com.ibm.ejs.container.MessageEndpointHandler.invokeMessageEndpointMethod(MessageEndpoint

      Handler.java:775)
      at

      com.ibm.ejs.container.MessageEndpointHandler.invoke(MessageEndpointHandler.java:736)
      at $Proxy0.afterDelivery(Unknown Source)
      at

      com.ibm.ws.sib.ra.inbound.impl.SibRaTransactionalDispatcher.afterDelivery(SibRaTransacti

      onalDispatcher.java:468)
      at

      com.ibm.ws.sib.ra.inbound.impl.SibRaDispatcher.dispatch(SibRaDispatcher.java:720)
      at

      com.ibm.ws.sib.ra.inbound.impl.SibRaSingleProcessListener$SibRaWork.run(SibRaSingleProce

      ssListener.java:584)
      at com.ibm.ejs.j2c.work.WorkProxy.run(WorkProxy.java:418)
      at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1469)
      Caused by: org.jboss.cache.lock.TimeoutException: write lock for / could not be acquired

      after 15000 ms. Locks: Read lock owners: {}
      Write lock owner: GlobalTransaction::1
      (caller=GlobalTransaction::2, lock info: write owner=GlobalTransaction::1

      (activeReaders=0, activeWriter=Thread[QTMSessionPool,5,], waitingReaders=0,

      waitingWriters=1, waitingUpgrader=0))
      at org.jboss.cache.lock.IdentityLock.acquireWriteLock(IdentityLock.java:169)
      at org.jboss.cache.TreeNode.acquireWriteLock(TreeNode.java:546)
      at org.jboss.cache.TreeNode.acquire(TreeNode.java:506)
      at

      org.jboss.cache.interceptors.OptimisticLockingInterceptor.lockNodes(OptimisticLockingInt

      erceptor.java:141)
      at

      org.jboss.cache.interceptors.OptimisticLockingInterceptor.invoke(OptimisticLockingInterc

      eptor.java:68)
      at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:67)
      at

      org.jboss.cache.interceptors.TxInterceptor.runPreparePhase(TxInterceptor.java:754)
      at

      org.jboss.cache.interceptors.TxInterceptor$LocalSynchronizationHandler.beforeCompletion(

      TxInterceptor.java:1000)
      ... 21 more

      Can somebody tell me what is wrong?

      Thanks,
      Priya