glassfish
  1. glassfish
  2. GLASSFISH-18515

ejb31/ejblite/javamodule fails on web.zip with NameNotFoundException

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Cannot Reproduce
    • Affects Version/s: 4.0
    • Fix Version/s: None
    • Component/s: naming
    • Labels:
      None

      Description

      ejb31/ejblite/javamodule fails with NameNotFoundException of a ManagedBean that was reprted by the naming mgr just a couple of lines before the exception below. The same test passes on glassfish.zip.

      (I also had async test under ejb32/ejblite failed at some point to inject a SFSB ref into a servlet, but that went away after I restarted the server, so I don't have a reproducible test case)

      The log fragment for ejb31/ejblite/javamodule of failed deployment on web profile:

      [#|2012-03-15T19:12:53.022-0700|INFO|44.0|com.sun.enterprise.naming.impl|_ThreadID=12;_ThreadName=Thread-2;|found cached proxy [com.sun.enterprise.container.common.impl.JavaModuleNamingProxy@7f6ff8] for [java:app/ejb-ejb31-ejblite-javamodule-web/foomanagedbean]|#]

      [#|2012-03-15T19:12:53.031-0700|INFO|44.0|com.sun.enterprise.naming.impl|_ThreadID=12;_ThreadName=Thread-2;|found a new proxy [org.glassfish.enterprise.iiop.api.ORBNamingProxy@1b800808] for [java:comp/ORB]|#]

      [#|2012-03-15T19:12:53.039-0700|INFO|44.0|javax.enterprise.system.container.web.com.sun.enterprise.web|_ThreadID=12;_ThreadName=Thread-2;|PWC1412: WebModule[null] ServletContext.log():PWC1409: Marking servlet com.acme.HelloServlet as unavailable|#]

      [#|2012-03-15T19:12:53.040-0700|SEVERE|44.0|javax.enterprise.system.container.web.com.sun.enterprise.web|_ThreadID=12;_ThreadName=Thread-2;|WebModule[/ejb-ejb31-ejblite-javamodule]PWC1396: Servlet /ejb-ejb31-ejblite-javamodule threw load() exception
      javax.naming.NameNotFoundException: No object bound to name java:app/ejb-ejb31-ejblite-javamodule-web/foomanagedbean
      at com.sun.enterprise.naming.impl.GlassfishNamingManagerImpl.lookup(GlassfishNamingManagerImpl.java:772)
      at com.sun.enterprise.naming.impl.GlassfishNamingManagerImpl.lookup(GlassfishNamingManagerImpl.java:744)
      at com.sun.enterprise.naming.impl.JavaURLContext.lookup(JavaURLContext.java:177)
      at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:500)
      at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:457)
      at javax.naming.InitialContext.lookup(InitialContext.java:392)
      at com.sun.enterprise.naming.util.JndiNamingObjectFactory.create(JndiNamingObjectFactory.java:90)
      at com.sun.enterprise.container.common.impl.ComponentEnvManagerImpl$1.create(ComponentEnvManagerImpl.java:646)
      at com.sun.enterprise.naming.impl.GlassfishNamingManagerImpl.lookup(GlassfishNamingManagerImpl.java:776)
      at com.sun.enterprise.naming.impl.GlassfishNamingManagerImpl.lookup(GlassfishNamingManagerImpl.java:744)
      at com.sun.enterprise.naming.impl.JavaURLContext.lookup(JavaURLContext.java:169)
      at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:500)
      at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:457)
      at javax.naming.InitialContext.lookup(InitialContext.java:392)
      at com.sun.enterprise.container.common.impl.util.InjectionManagerImpl._inject(InjectionManagerImpl.java:614)
      at com.sun.enterprise.container.common.impl.util.InjectionManagerImpl.inject(InjectionManagerImpl.java:485)
      at com.sun.enterprise.container.common.impl.util.InjectionManagerImpl.injectInstance(InjectionManagerImpl.java:142)
      at com.sun.enterprise.container.common.impl.util.InjectionManagerImpl.injectInstance(InjectionManagerImpl.java:128)
      at com.sun.enterprise.container.common.impl.util.InjectionManagerImpl.createManagedObject(InjectionManagerImpl.java:325)
      at com.sun.enterprise.web.WebContainer.createServletInstance(WebContainer.java:723)
      at com.sun.enterprise.web.WebModule.createServletInstance(WebModule.java:1958)

        Activity

        Hide
        Cheng Fang added a comment - - edited

        FooManagedBean and InterceptorA injects org.omg.CORBA.ORB with @Resource, which is not available in web profile. So the instantiation of FooManagedBean failed and its standard java:app jndi name is not available.

        After commenting out the @Resource injectio of ORB, the test passed.

        orb is used here just to test if we can inject it, and not used for any other purpose.

        Show
        Cheng Fang added a comment - - edited FooManagedBean and InterceptorA injects org.omg.CORBA.ORB with @Resource, which is not available in web profile. So the instantiation of FooManagedBean failed and its standard java:app jndi name is not available. After commenting out the @Resource injectio of ORB, the test passed. orb is used here just to test if we can inject it, and not used for any other purpose.
        Hide
        cistox added a comment -

        Hi think this naming exception is due to a NPE generated by the GlassfishNamingManagerImpl BindingsIterator inner class that is always invoking the lookup(String name) contructor with NULL SerialContext:

        public Object lookup(String name) throws NamingException

        { return lookup(name, (SerialContext)null); }

        public Object lookup(String name, SerialContext serialContext) throws NamingException {

        /**

        • Here is the NPE as serialContext is NULL when the basic lookup(String name) contructor is
        • involked.
          */

        _logger.fine("serialcontext in GlassfishNamingManager.." + serialContext);

        Show
        cistox added a comment - Hi think this naming exception is due to a NPE generated by the GlassfishNamingManagerImpl BindingsIterator inner class that is always invoking the lookup(String name) contructor with NULL SerialContext: public Object lookup(String name) throws NamingException { return lookup(name, (SerialContext)null); } public Object lookup(String name, SerialContext serialContext) throws NamingException { /** Here is the NPE as serialContext is NULL when the basic lookup(String name) contructor is involked. */ _logger.fine("serialcontext in GlassfishNamingManager.." + serialContext);
        Hide
        Tom Mueller added a comment -

        Reassigning to component lead as the assignee is no longer with the project.

        Show
        Tom Mueller added a comment - Reassigning to component lead as the assignee is no longer with the project.
        Hide
        guojun.shan added a comment -

        When I run ant all in folder ejb31/ejblite/javamodule,there are no failures.

        Show
        guojun.shan added a comment - When I run ant all in folder ejb31/ejblite/javamodule,there are no failures.
        Hide
        marina vatkina added a comment -

        I'm not sure why this bug is still open

        Show
        marina vatkina added a comment - I'm not sure why this bug is still open
        Hide
        guojun.shan added a comment -

        not re-produced now. close it.

        Show
        guojun.shan added a comment - not re-produced now. close it.

          People

          • Assignee:
            guojun.shan
            Reporter:
            marina vatkina
          • Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: