<< Back to previous view

[GLASSFISH-19089] deploying @WebServiceProvider causes NPE in EjbSecurityComponentInvocationHandler Created: 19/Sep/12  Updated: 20/Sep/12  Resolved: 20/Sep/12

Status: Resolved
Project: glassfish
Component/s: ejb_container
Affects Version/s: 4.0_b55
Fix Version/s: 4.0_b56_ms5

Type: Bug Priority: Major
Reporter: Lukas Jungmann Assignee: amy.yang
Resolution: Fixed Votes: 0
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

File Attachments: Zip Archive ejb-npe.zip    
Issue Links:
Related
is related to GLASSFISH-19088 deployment fails for EJB based ws pro... Resolved
Tags:
Participants: amy.yang and Lukas Jungmann

 Description   

-have attached ejb module containing one simple @Stateless @WebServiceProvider bean
-deploy it

=>

SEVERE: SECEJB9000: Exception while running pre-invoke
java.lang.NullPointerException
at org.glassfish.ejb.security.application.EjbSecurityComponentInvocationHandler$1.beforePreInvoke(EjbSecurityComponentInvocationHandler.java:79)
at org.glassfish.api.invocation.InvocationManagerImpl.preInvoke(InvocationManagerImpl.java:149)
at com.sun.ejb.containers.EjbEndpointFacadeImpl.startInvocation(EjbEndpointFacadeImpl.java:108)
at org.glassfish.webservices.EjbRuntimeEndpointInfo.prepareInvocation(EjbRuntimeEndpointInfo.java:184)
at org.glassfish.webservices.EjbRuntimeEndpointInfo.initRuntimeInfo(EjbRuntimeEndpointInfo.java:344)
at org.glassfish.webservices.WebServiceEjbEndpointRegistry.registerEndpoint(WebServiceEjbEndpointRegistry.java:127)
at com.sun.ejb.containers.BaseContainer.initializeHome(BaseContainer.java:1173)
at com.sun.ejb.containers.StatelessSessionContainer.initializeHome(StatelessSessionContainer.java:214)
at com.sun.ejb.containers.BaseContainerFactory.initContainer(BaseContainerFactory.java:67)
at com.sun.ejb.containers.StatelessContainerFactory.createContainer(StatelessContainerFactory.java:61)
at org.glassfish.ejb.startup.EjbApplication.loadContainers(EjbApplication.java:221)
...

WARNING: Unexpected error in EJB WebService endpoint post processing
org.glassfish.api.invocation.InvocationException
at org.glassfish.ejb.security.application.EjbSecurityComponentInvocationHandler$1.beforePreInvoke(EjbSecurityComponentInvocationHandler.java:83)
at org.glassfish.api.invocation.InvocationManagerImpl.preInvoke(InvocationManagerImpl.java:149)
at com.sun.ejb.containers.EjbEndpointFacadeImpl.startInvocation(EjbEndpointFacadeImpl.java:108)
at org.glassfish.webservices.EjbRuntimeEndpointInfo.prepareInvocation(EjbRuntimeEndpointInfo.java:184)
at org.glassfish.webservices.EjbRuntimeEndpointInfo.initRuntimeInfo(EjbRuntimeEndpointInfo.java:344)
at org.glassfish.webservices.WebServiceEjbEndpointRegistry.registerEndpoint(WebServiceEjbEndpointRegistry.java:127)
at com.sun.ejb.containers.BaseContainer.initializeHome(BaseContainer.java:1173)
at com.sun.ejb.containers.StatelessSessionContainer.initializeHome(StatelessSessionContainer.java:214)
at com.sun.ejb.containers.BaseContainerFactory.initContainer(BaseContainerFactory.java:67)
at com.sun.ejb.containers.StatelessContainerFactory.createContainer(StatelessContainerFactory.java:61)
at org.glassfish.ejb.startup.EjbApplication.loadContainers(EjbApplication.java:221)
...

problem seems to be that when BaseContainer.initializeHome is called, SecurityManager (EJBSecurityManager) may still be null - see BaseContainerFactory.initContainer()



 Comments   
Comment by amy.yang [ 20/Sep/12 02:39 AM ]

I'm running tests for the fix. Will check in when all of them passed.

Comment by amy.yang [ 20/Sep/12 06:40 AM ]

Project: glassfish
Repository: svn
Revision: 56044
Author: amy.yang
Date: 2012-09-20 06:22:05 UTC
Link:

Log Message:
------------
Fix for http://java.net/jira/browse/GLASSFISH-19089. call initializeHome() after EJBSecurityManager was created

Revisions:
----------
56044

Modified Paths:
---------------
trunk/main/appserver/ejb/ejb-container/src/main/java/com/sun/ejb/containers/BaseContainerFactory.java

Generated at Sun Apr 20 21:43:11 UTC 2014 using JIRA 4.0.2#472.