Bugs item #531954, was opened at 2002-03-19 11:35
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=376685&aid=531954&group_id=22866

Category: JBossCMP
Group: v3.0 Rabbit Hole
>Status: Closed
>Resolution: Invalid
Priority: 5
Submitted By: Chris Klumb (cklumb)
>Assigned to: Dain Sundstrom (dsundstrom)
Summary: NotSupported Trans / JDBCStoreManager

Initial Comment:
When a session bean with NotSupported transaction 
attribute calls a method on an entity bean which also 
has the same trans attribute, JDBCStoreManager throws 
a NullPointerException.  This occurs in the CVS from 
the night of 3/18/2002.  The method which throws the 
exception is:

public Map getApplicationTxDataMap() {
      try {
         Transaction tx = tm.getTransaction();
      
         // get the map between the tx and the 
txDataMap
         Map txMap = (Map)getApplicationData
(TX_DATA_KEY);
         synchronized(txMap) {
            // get the txDataMap from the txMap
            Map txDataMap = (Map)txMap.get(tx);

            // do we have an existing map
            if(txDataMap == null) {
               // We want to be notified when the 
transaction commits
               ApplicationTxDataSynchronization synch 
= 
                     new 
ApplicationTxDataSynchronization(tx);
               tx.registerSynchronization(synch); 
               // create and add the new map
               txDataMap = new HashMap();
               txMap.put(tx, txDataMap);
            }
            return txDataMap;
         }
      } catch(EJBException e) {
         throw e;
      } catch(Exception e) {
         throw new EJBException("Error getting 
application tx data map.", e);
      }
   }

The line following line throws the exception:

tx.registerSynchronization(synch); 

Here's the exception trace:

2002-03-19 11:20:19,045 ERROR 
[org.jboss.ejb.plugins.LogInterceptor] 
TransactionRolledbackException, causedBy:
java.lang.NullPointerException
        at 
org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.getAppl
icationTxDataMap(JDBCStoreManager.java:196)
        at 
org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.getAppl
icationTxData(JDBCStoreManager.java:212)
        at 
org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.getEnti
tyTxDataMap(JDBCStoreManager.java:224)
        at 
org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.getEnti
tyTxData(JDBCStoreManager.java:233)
        at 
org.jboss.ejb.plugins.cmp.jdbc.ReadAheadCache.getPreloa
dDataMap(ReadAheadCache.java:368)
        at 
org.jboss.ejb.plugins.cmp.jdbc.ReadAheadCache.load
(ReadAheadCache.java:204)
        at 
org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadEntityCommand.ex
ecute(JDBCLoadEntityCommand.java:76)
        at 
org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadEntityCommand.ex
ecute(JDBCLoadEntityCommand.java:62)
        at 
org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.loadEnt
ity(JDBCStoreManager.java:415)
        at 
org.jboss.ejb.plugins.CMPPersistenceManager.loadEntity
(CMPPersistenceManager.java:388)
        at 
org.jboss.ejb.plugins.EntitySynchronizationInterceptor.
invoke(EntitySynchronizationInterceptor.java:279)
        at 
org.jboss.ejb.plugins.EntityInstanceInterceptor.invoke
(EntityInstanceInterceptor.java:187)
        at 
org.jboss.ejb.plugins.EntityLockInterceptor.invoke
(EntityLockInterceptor.java:107)
        at 
org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext
(AbstractTxInterceptor.java:96)
        at 
org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransacti
ons(TxInterceptorCMT.java:142)
        at 
org.jboss.ejb.plugins.TxInterceptorCMT.invoke
(TxInterceptorCMT.java:61)
        at 
org.jboss.ejb.plugins.SecurityInterceptor.invoke
(SecurityInterceptor.java:127)
        at org.jboss.ejb.plugins.LogInterceptor.invoke
(LogInterceptor.java:166)
        at org.jboss.ejb.EntityContainer.invoke
(EntityContainer.java:474)
        at org.jboss.ejb.Container.invoke
(Container.java:681)
        at org.jboss.ejb.EntityContainer.invoke
(EntityContainer.java:1003)
        at 
com.sun.management.jmx.MBeanServerImpl.invoke
(MBeanServerImpl.java:1555)
        at 
com.sun.management.jmx.MBeanServerImpl.invoke
(MBeanServerImpl.java:1523)
        at 
org.jboss.invocation.local.LocalInvoker.invoke
(LocalInvoker.java:98)
        at 
org.jboss.invocation.InvokerInterceptor.invoke
(InvokerInterceptor.java:102)
        at 
org.jboss.proxy.TransactionInterceptor.invoke
(TransactionInterceptor.java:73)
        at org.jboss.proxy.SecurityInterceptor.invoke
(SecurityInterceptor.java:76)
        at org.jboss.proxy.ejb.EntityInterceptor.invoke
(EntityInterceptor.java:116)
        at org.jboss.proxy.ClientContainer.invoke
(ClientContainer.java:96)
        at $Proxy13.getStringValue(Unknown Source)
        at test.ejb.Session1Bean.method2
(Session1Bean.java:95)
        at java.lang.reflect.Method.invoke(Native 
Method)
        at 
org.jboss.ejb.StatelessSessionContainer$ContainerInterc
eptor.invoke(StatelessSessionContainer.java:648)
        at 
org.jboss.ejb.plugins.StatelessSessionInstanceIntercept
or.invoke(StatelessSessionInstanceInterceptor.java:77)
        at 
org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext
(AbstractTxInterceptor.java:96)
        at 
org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransacti
ons(TxInterceptorCMT.java:142)
        at 
org.jboss.ejb.plugins.TxInterceptorCMT.invoke
(TxInterceptorCMT.java:61)
        at 
org.jboss.ejb.plugins.SecurityInterceptor.invoke
(SecurityInterceptor.java:127)
        at org.jboss.ejb.plugins.LogInterceptor.invoke
(LogInterceptor.java:166)
        at 
org.jboss.ejb.StatelessSessionContainer.invoke
(StatelessSessionContainer.java:308)
        at org.jboss.ejb.Container.invoke
(Container.java:681)
        at 
com.sun.management.jmx.MBeanServerImpl.invoke
(MBeanServerImpl.java:1555)
        at 
com.sun.management.jmx.MBeanServerImpl.invoke
(MBeanServerImpl.java:1523)
        at 
org.jboss.invocation.jrmp.server.JRMPInvoker.invoke
(JRMPInvoker.java:364)
        at java.lang.reflect.Method.invoke(Native 
Method)
        at sun.rmi.server.UnicastServerRef.dispatch
(UnicastServerRef.java:241)
        at sun.rmi.transport.Transport$1.run
(Transport.java:152)
        at java.security.AccessController.doPrivileged
(Native Method)
        at sun.rmi.transport.Transport.serviceCall
(Transport.java:148)
        at 
sun.rmi.transport.tcp.TCPTransport.handleMessages
(TCPTransport.java:465)
        at 
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.ru
n(TCPTransport.java:706)
        at java.lang.Thread.run(Thread.java:484)

[Attached is a test case]

----------------------------------------------------------------------

>Comment By: Dain Sundstrom (dsundstrom)
Date: 2002-03-19 11:53

Message:
Logged In: YES 
user_id=251431

Not Supported transaction attribute is not supported by 
JBossCMP.  CMP 2.0 entities can only be accessed from a 
transaction.

----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=376685&aid=531954&group_id=22866

_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to