Details

    • Type: Sub-task Sub-task
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.0_dev
    • Component/s: naming
    • Labels:
      None

      Description

      currently, if the BeanManager is not available, a lookup of java:comp/Validator will fail with an IllegalStateException. This is due to the proxying of java:comp namespace. Instead of throwing an IllegalStateException, the registry in JavaURLContext should be consulted:

      [2013-04-24T11:50:49.637-0400] [glassfish 4.0] [SEVERE] [] [javax.enterprise.web] [tid: _ThreadID=68 _ThreadName=AutoDeployer] [timeMillis: 1366818649637] [levelValue: 1000] [[
      WebModule[/ejb3_assembly_appres_warejb_web]Servlet /ejb3_assembly_appres_warejb_web threw load() exception
      java.lang.IllegalStateException: Cannot resolve bean manager
      at org.glassfish.weld.BeanManagerNamingProxy.handle(BeanManagerNamingProxy.java:121)
      at org.glassfish.weld.ValidationNamingProxy.obtainBeanManager(ValidationNamingProxy.java:191)
      at org.glassfish.weld.ValidationNamingProxy.handle(ValidationNamingProxy.java:103)
      at com.sun.enterprise.naming.impl.NamedNamingObjectManager.tryNamedProxies(NamedNamingObjectManager.java:134)
      at com.sun.enterprise.naming.impl.JavaURLContext.lookup(JavaURLContext.java:166)
      at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:471)
      at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:438)
      at javax.naming.InitialContext.lookup(Unknown Source)
      at javax.naming.InitialContext.lookup(Unknown Source)
      at com.sun.ts.tests.ejb30.common.helper.ServiceLocator.lookup(ServiceLocator.java:72)
      at com.sun.ts.tests.ejb30.common.helper.ServiceLocator.lookupNoTry(ServiceLocator.java:28)
      at com.sun.ts.tests.ejb30.assembly.appres.common.AppResTest.verifyValidatorAndFactory(AppResTest.java:79)
      at com.sun.ts.tests.ejb30.assembly.appres.common.AppResTest.beanPostConstruct(AppResTest.java:118)
      at com.sun.ts.tests.ejb30.assembly.appres.common.TestServletBase2.postConstruct(TestServletBase2.java:42)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      at java.lang.reflect.Method.invoke(Unknown Source)
      at com.sun.enterprise.container.common.impl.util.InjectionManagerImpl$3.run(InjectionManagerImpl.java:743)
      at java.security.AccessController.doPrivileged(Native Method)
      at com.sun.enterprise.container.common.impl.util.InjectionManagerImpl.invokeLifecycleMethod(InjectionManagerImpl.java:737)
      at com.sun.enterprise.container.common.impl.util.InjectionManagerImpl.inject(InjectionManagerImpl.java:508)
      at com.sun.enterprise.container.common.impl.util.InjectionManagerImpl.injectInstance(InjectionManagerImpl.java:141)
      at com.sun.enterprise.container.common.impl.util.InjectionManagerImpl.injectInstance(InjectionManagerImpl.java:127)
      at com.sun.enterprise.container.common.impl.util.InjectionManagerImpl.createManagedObject(InjectionManagerImpl.java:324)
      at com.sun.enterprise.web.WebContainer.createServletInstance(WebContainer.java:983)
      at com.sun.enterprise.web.WebModule.createServletInstance(WebModule.java:2130)
      at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1404)
      at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1381)
      at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5670)
      at org.apache.catalina.core.StandardContext.start(StandardContext.java:5912)
      at com.sun.enterprise.web.WebModule.start(WebModule.java:691)
      at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:1041)
      at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:1024)
      at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:747)
      at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:2278)
      at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1924)
      at com.sun.enterprise.web.WebApplication.start(WebApplication.java:139)
      at org.glassfish.internal.data.EngineRef.start(EngineRef.java:122)
      at org.glassfish.internal.data.ModuleInfo.start(ModuleInfo.java:291)
      at org.glassfish.internal.data.ApplicationInfo.start(ApplicationInfo.java:352)
      at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:497)
      at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:219)
      at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:491)
      at com.sun.enterprise.v3.admin.CommandRunnerImpl$2.execute(CommandRunnerImpl.java:537)
      at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:546)
      at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1423)
      at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1500(CommandRunnerImpl.java:108)
      at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1762)
      at org.glassfish.deployment.autodeploy.AutoOperation.run(AutoOperation.java:164)
      at org.glassfish.deployment.autodeploy.AutoDeployer.deploy(AutoDeployer.java:595)
      at org.glassfish.deployment.autodeploy.AutoDeployer.deployAll(AutoDeployer.java:482)
      at org.glassfish.deployment.autodeploy.AutoDeployer.run(AutoDeployer.java:410)
      at org.glassfish.deployment.autodeploy.AutoDeployer.run(AutoDeployer.java:401)
      at org.glassfish.deployment.autodeploy.AutoDeployService$1.run(AutoDeployService.java:233)
      at java.util.TimerThread.mainLoop(Unknown Source)
      at java.util.TimerThread.run(Unknown Source)
      ]]

        Activity

        Hide
        mtaube added a comment -

        What is the impact on the customer of the bug?
        While investigating GLASSFISH-20401 we found the weld integration code was masking an underlying problem by attempting to obtain the BeanManager (in some cases, when CDI is not available, the BeanManager is not available and an IllegalStateException is thrown)

        How likely is it that a customer will see the bug and how serious is the bug?
        Is it a regression? Does it meet other bug fix criteria (security, performance, etc.)?
        What CTS failures are caused by this bug?
        javaeetck/src/com/sun/ts/tests/ejb30/assembly/appres/warejb

        What is the cost/risk of fixing the bug?
        How risky is the fix? How much work is the fix? Is the fix complicated?
        Low risk

        Is there an impact on documentation or message strings?
        No

        Which tests should QA (re)run to verify the fix did not destabilize GlassFish?
        EJB, Quicklook, EJB cts, Bean Validation cts

        I have also verified that the following tests pass :
        QL, bv-tck

        Which is the targeted build of 4.0 for this fix?
        Build-86

        If this an integration of a new version of a component from another project,
        what are the changes that are being brought in? This might be list of
        Jira issues from that project or a list of revision messages.
        No.

        Show
        mtaube added a comment - What is the impact on the customer of the bug? While investigating GLASSFISH-20401 we found the weld integration code was masking an underlying problem by attempting to obtain the BeanManager (in some cases, when CDI is not available, the BeanManager is not available and an IllegalStateException is thrown) How likely is it that a customer will see the bug and how serious is the bug? Is it a regression? Does it meet other bug fix criteria (security, performance, etc.)? What CTS failures are caused by this bug? javaeetck/src/com/sun/ts/tests/ejb30/assembly/appres/warejb What is the cost/risk of fixing the bug? How risky is the fix? How much work is the fix? Is the fix complicated? Low risk Is there an impact on documentation or message strings? No Which tests should QA (re)run to verify the fix did not destabilize GlassFish? EJB, Quicklook, EJB cts, Bean Validation cts I have also verified that the following tests pass : QL, bv-tck Which is the targeted build of 4.0 for this fix? Build-86 If this an integration of a new version of a component from another project, what are the changes that are being brought in? This might be list of Jira issues from that project or a list of revision messages. No.
        Hide
        mtaube added a comment -

        Committed revision 61643.

        Show
        mtaube added a comment - Committed revision 61643.

          People

          • Assignee:
            mtaube
            Reporter:
            mtaube
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: