glassfish
  1. glassfish
  2. GLASSFISH-19089

deploying @WebServiceProvider causes NPE in EjbSecurityComponentInvocationHandler

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 4.0_b55
    • Fix Version/s: 4.0_b56_ms5
    • Component/s: ejb_container
    • Labels:
      None

      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()

        Issue Links

          Activity

          Hide
          amy.yang added a comment -

          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

          Show
          amy.yang added a comment - 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
          Hide
          amy.yang added a comment -

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

          Show
          amy.yang added a comment - I'm running tests for the fix. Will check in when all of them passed.

            People

            • Assignee:
              amy.yang
              Reporter:
              Lukas Jungmann
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: