0 Replies Latest reply on Aug 5, 2003 3:13 PM by cvandyck

    3.2.0RC4 -> 3.2.2RC1 throwing Tx exceptions

    cvandyck

      When I upgraded to 3.2.2RC1 from 3.2.0RC4, I noticed that there were multiple transaction exceptions being thrown:

      The scenario in which it happens always revolves around accessing a CMP or CMR method outside of a session bean. In one of the methods that is throwing this exception, a session bean gathers a Collection of entities (w/o using a finder method), and then sorts that collection using a class that implements Comparator. This subclass of Comparator calls getName() on the entities in order to sort them alphabetically.

      When getName() (CMP) is called, this exception is thrown:

      java.lang.IllegalStateException: There is no tranaction associated with the current thread
      at org.jboss.ejb.plugins.cmp.jdbc.TransactionLocal.getTransaction(TransactionLocal.java:206)
      at org.jboss.ejb.plugins.cmp.jdbc.TransactionLocal.get(TransactionLocal.java:118)
      at org.jboss.ejb.plugins.cmp.jdbc.ReadAheadCache.getListMap(ReadAheadCache.java:538)
      at org.jboss.ejb.plugins.cmp.jdbc.ReadAheadCache.getEntityReadAheadInfo(ReadAheadCache.java:235)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadEntityCommand.execute(JDBCLoadEntityCommand.java:122)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadEntityCommand.execute(JDBCLoadEntityCommand.java:83)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.loadEntity(JDBCStoreManager.java:632)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.loadEntity(JDBCStoreManager.java:614)
      at org.jboss.ejb.plugins.CMPPersistenceManager.loadEntity(CMPPersistenceManager.java:386)
      at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.loadEntity(CachedConnectionInterceptor.java:353)
      at org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invoke(EntitySynchronizationInterceptor.java:232)
      at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:186)
      at org.jboss.ejb.plugins.EntityReentranceInterceptor.invoke(EntityReentranceInterceptor.java:82)
      at org.jboss.ejb.plugins.EntityInstanceInterceptor.invoke(EntityInstanceInterceptor.java:174)
      at org.jboss.ejb.plugins.EntityLockInterceptor.invoke(EntityLockInterceptor.java:89)
      at org.jboss.ejb.plugins.EntityCreationInterceptor.invoke(EntityCreationInterceptor.java:53)
      at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:84)
      at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:216)
      at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:104)
      at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:117)
      at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:191)
      at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
      at org.jboss.ejb.EntityContainer.internalInvoke(EntityContainer.java:484)
      at org.jboss.ejb.Container.invoke(Container.java:673)
      at org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invoke(BaseLocalProxyFactory.java:353)
      at org.jboss.ejb.plugins.local.EntityProxy.invoke(EntityProxy.java:38)
      at $Proxy194.getName(Unknown Source)

      .....


      It basically happens anytime a non-session bean accesses an entity. This behavior did not exist with 3.2.0.

      I understand that there's a bug being tracked on SF that is similar to this, but my problem seems to be a different case (i.e. not running a finder but just a CMP or CMR accessor method). Is this the same bug, or is there something wrong with my configuration ?

      thanks,
      Collin