-
Bug
-
Resolution: Done
-
Major
-
JBossAS-3.2.6 Final, JBossAS-3.2.7 Final
-
None
got a NullPointerException when JBoss 3.2.6 tried to synchronize already cleared bean:
Caused by: java.lang.NullPointerException
at org.jboss.ejb.GlobalTxEntityMap$GlobalTxSynchronization.synchronize(GlobalTxEntityMap.java:281)
at org.jboss.ejb.GlobalTxEntityMap.synchronizeEntities(GlobalTxEntityMap.java:166)
at org.jboss.ejb.EntityContainer.synchronizeEntitiesWithinTransaction(EntityContainer.java:119)
at org.jboss.ejb.EntityContainer.remove(EntityContainer.java:496)
The problem is obviously caused by this line:
throw new EJBException("Exception in store of entity:" +
((instance == null) ? "<null>" : instance.getId().toString()), causeByException);
we get NPE since instance.getId() is already null. As I can see, the same problem exists in 3.2.7 and 4.0