Bug 950864

Summary: Sporadiacal a NullPointerException is thrown if a SFSB is removed
Product: [JBoss] JBoss Enterprise Application Platform 6 Reporter: wfink
Component: EJBAssignee: Jaikiran Pai <jpai>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: urgent Docs Contact:
Priority: urgent    
Version: 6.0.1CC: dimitris, jason.greene, jawilson, jdoyle, jmartisk, jpai, myarboro, rdickens, rsvoboda, smumford
Target Milestone: ER2   
Target Release: EAP 6.1.1   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
In previous releases of Red Hat JBoss Enterprise Application Platform 6, it was found that removing a Stateful Session Bean (SFSB)could lead to a NullPointerException (NPE) being thrown. This was because the +org.jboss.as.ejb3.component.EJBUtilities+ class was not setting up dependencies properly. FIX:
Story Points: ---
Clone Of:
: 953033 (view as bug list) Environment:
Last Closed: 2013-09-16 20:27:13 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 953033    

Description wfink 2013-04-11 06:08:17 UTC
Description of problem:
If a SFSB should be removed sometimes a NPE occurs.

The call stack of the application looks quite like this:

1.	client application calls servlet
2.	servlet calls stateless session bean A method which is transactional
3.	stateless session bean method calls some methods on the statefull session bean
4.	stateless session bean calls @remove annotated method on statefull session bean in the same transaction



Caused by: java.lang.NullPointerException
        at org.jboss.as.ejb3.cache.TransactionAwareObjectFactory.getCurrentTransaction(TransactionAwareObjectFactory.java:79) [jboss-as-ejb3-7.1.3.Final-redhat-4.jar:7.1.3.Final-redhat-4]
        at org.jboss.as.ejb3.cache.TransactionAwareObjectFactory.destroyInstance(TransactionAwareObjectFactory.java:62) [jboss-as-ejb3-7.1.3.Final-redhat-4.jar:7.1.3.Final-redhat-4]
        at org.jboss.as.ejb3.cache.impl.backing.NonPassivatingBackingCacheImpl.remove(NonPassivatingBackingCacheImpl.java:165) [jboss-as-ejb3-7.1.3.Final-redhat-4.jar:7.1.3.Final-redhat-4]
        at org.jboss.as.ejb3.cache.impl.backing.NonPassivatingBackingCacheImpl.remove(NonPassivatingBackingCacheImpl.java:57) [jboss-as-ejb3-7.1.3.Final-redhat-4.jar:7.1.3.Final-redhat-4]
        at org.jboss.as.ejb3.cache.spi.impl.AbstractCache.remove(AbstractCache.java:100) [jboss-as-ejb3-7.1.3.Final-redhat-4.jar:7.1.3.Final-redhat-4]
        at org.jboss.as.ejb3.cache.spi.impl.AbstractCache.remove(AbstractCache.java:39) [jboss-as-ejb3-7.1.3.Final-redhat-4.jar:7.1.3.Final-redhat-4]
        at org.jboss.as.ejb3.component.stateful.StatefulSessionComponent.removeSession(StatefulSessionComponent.java:283) [jboss-as-ejb3-7.1.3.Final-redhat-4.jar:7.1.3.Final-redhat-4]
        at org.jboss.as.ejb3.component.stateful.StatefulRemoveInterceptor.processInvocation(StatefulRemoveInterceptor.java:100) [jboss-as-ejb3-7.1.3.Final-redhat-4.jar:7.1.3.Final-redhat-4]
        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final-redhat-2.jar:1.1.1.Final-redhat-2]
        at org.jboss.as.ejb3.component.stateful.StatefulComponentInstanceInterceptor.processInvocation(StatefulComponentInstanceInterceptor.java:67) [jboss-as-ejb3-7.1.3.Final-redhat-4.jar:7.1.3.Final-redhat-4]
        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final-redhat-2.jar:1.1.1.Final-redhat-2]
        at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInCallerTx(CMTTxInterceptor.java:200) [jboss-as-ejb3-7.1.3.Final-redhat-4.jar:7.1.3.Final-redhat-4]
        ... 103 more

Comment 1 Jaikiran Pai 2013-04-16 11:55:58 UTC
Pull request to EAP repo sent https://github.com/jbossas/jboss-eap/pull/103

Comment 3 Jason T. Greene 2013-04-19 16:27:19 UTC
Need the acks

Comment 6 Paul Gier 2013-07-01 22:18:44 UTC
Looks like this fix was included in 6.1.0 but was never verified by QA.  Marking for 6.1.1 to be tested.

Comment 7 Jan Martiska 2013-07-03 11:35:54 UTC
Verified in 6.1.1.ER2

Comment 8 Scott Mumford 2013-08-23 05:52:07 UTC
Have added the beginning of a Release Note to the text field above.

Requesting information about how this issue was resolved. 
Was EjbUtilities removed as suggested in WFLY-65?