glassfish
  1. glassfish
  2. GLASSFISH-19764

Regression: CDI support in ACC fails to inject a reference into ACC client

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 4.0_b78
    • Fix Version/s: 4.0_b80_EE7MS6
    • Component/s: standalone_client
    • Labels:
      None

      Description

      ACCJCDIServiceImpl class results in the following failure in the ejb/ejb31/security/simple test case:

      run_bob:
      [exec] Mar 01, 2013 4:51:36 PM org.glassfish.appclient.client.acc.AppclientCommandArguments warnAboutPasswordUsage
      [exec] WARNING: ACC013: The -password option is deprecated and will likely be removed in a future release. Please use -passwordfile or let the app client container prompt for the username and/or password if they are needed to access a remote resource.
      [exec] com.sun.enterprise.container.common.spi.util.InjectionException: Exception attempting to inject Env-Prop: com.acme.Client/fooMb3@Field-Injectable Resource. Class name = com.acme.Client Field name=fooMb3@java.lang.String@java:comp/env/com.acme.Client/fooMb2@@ into class com.acme.Client: Lookup failed for 'java:comp/env/com.acme.Client/fooMb3' in SerialContext[myEnv=

      {java.naming.factory.initial=com.sun.enterprise.naming.impl.SerialInitContextFactory, java.naming.factory.url.pkgs=com.sun.enterprise.naming, java.naming.factory.state=com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl}

      [exec] at com.sun.enterprise.container.common.impl.util.InjectionManagerImpl._inject(InjectionManagerImpl.java:717)
      [exec] at com.sun.enterprise.container.common.impl.util.InjectionManagerImpl.inject(InjectionManagerImpl.java:484)
      [exec] at com.sun.enterprise.container.common.impl.util.InjectionManagerImpl.injectClass(InjectionManagerImpl.java:212)
      [exec] at com.sun.enterprise.container.common.impl.util.InjectionManagerImpl.injectClass(InjectionManagerImpl.java:204)
      [exec] at org.glassfish.appclient.client.acc.AppClientContainer$ClientMainClassSetting.getClientMainClass(AppClientContainer.java:629)
      [exec] at org.glassfish.appclient.client.acc.AppClientContainer.getMainMethod(AppClientContainer.java:518)
      [exec] at org.glassfish.appclient.client.acc.AppClientContainer.completePreparation(AppClientContainer.java:412)
      [exec] at org.glassfish.appclient.client.acc.AppClientContainer.prepare(AppClientContainer.java:320)
      [exec] at org.glassfish.appclient.client.AppClientFacade.prepareACC(AppClientFacade.java:279)
      [exec] at org.glassfish.appclient.client.acc.agent.AppClientContainerAgent.premain(AppClientContainerAgent.java:83)
      [exec] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      [exec] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      [exec] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      [exec] at java.lang.reflect.Method.invoke(Method.java:601)
      [exec] at sun.instrument.InstrumentationImpl.loadClassAndStartAgent(InstrumentationImpl.java:382)
      [exec] at sun.instrument.InstrumentationImpl.loadClassAndCallPremain(InstrumentationImpl.java:397)
      ...
      [exec] Caused by: javax.naming.NamingException: Lookup failed for '_internal_java_app_for_app_clientejb-ejb31-security-simpleAppjava:app/ejb-ejb31-security-simple-client/__internal_managed_bean_com.acme.FooManagedBean2' in SerialContext[myEnv=

      {java.naming.factory.initial=com.sun.enterprise.naming.impl.SerialInitContextFactory, java.naming.factory.url.pkgs=com.sun.enterprise.naming, java.naming.factory.state=com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl, com.sun.enterprise.naming.logicalName=java:comp/env/com.acme.Client/fooMb2}

      [Root exception is javax.naming.NameNotFoundException: ejb-ejb31-security-simple-client]
      [exec] at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:491)
      [exec] at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:438)
      [exec] at javax.naming.InitialContext.lookup(InitialContext.java:411)
      [exec] at com.sun.enterprise.naming.impl.JavaURLContext.lookup(JavaURLContext.java:217)
      [exec] at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:471)
      [exec] ... 34 more
      [exec] Caused by: javax.naming.NameNotFoundException: ejb-ejb31-security-simple-client
      [exec] at com.sun.enterprise.naming.impl.TransientContext.resolveContext(TransientContext.java:299)
      [exec] at com.sun.enterprise.naming.impl.TransientContext.lookup(TransientContext.java:207)
      [exec] at com.sun.enterprise.naming.impl.TransientContext.lookup(TransientContext.java:208)
      [exec] at com.sun.enterprise.naming.impl.SerialContextProviderImpl.lookup(SerialContextProviderImpl.java:66)
      [exec] at com.sun.enterprise.naming.impl.RemoteSerialContextProviderImpl.lookup(RemoteSerialContextProviderImpl.java:109)
      [exec] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      [exec] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      [exec] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      [exec] at java.lang.reflect.Method.invoke(Method.java:601)
      [exec] at com.sun.corba.ee.impl.presentation.rmi.ReflectiveTie.dispatchToMethod(ReflectiveTie.java:143)
      [exec] at com.sun.corba.ee.impl.presentation.rmi.ReflectiveTie._invoke(ReflectiveTie.java:173)
      [exec] at com.sun.corba.ee.impl.protocol.ServerRequestDispatcherImpl.dispatchToServant(ServerRequestDispatcherImpl.java:528)
      [exec] at com.sun.corba.ee.impl.protocol.ServerRequestDispatcherImpl.dispatch(ServerRequestDispatcherImpl.java:199)
      [exec] at com.sun.corba.ee.impl.protocol.MessageMediatorImpl.handleRequestRequest(MessageMediatorImpl.java:1549)
      [exec] at com.sun.corba.ee.impl.protocol.MessageMediatorImpl.handleRequest(MessageMediatorImpl.java:1425)
      [exec] at com.sun.corba.ee.impl.protocol.MessageMediatorImpl.handleInput(MessageMediatorImpl.java:930)
      [exec] at com.sun.corba.ee.impl.protocol.giopmsgheaders.RequestMessage_1_2.callback(RequestMessage_1_2.java:213)
      [exec] at com.sun.corba.ee.impl.protocol.MessageMediatorImpl.handleRequest(MessageMediatorImpl.java:694)
      [exec] at com.sun.corba.ee.impl.protocol.MessageMediatorImpl.dispatch(MessageMediatorImpl.java:496)
      [exec] at com.sun.corba.ee.impl.protocol.MessageMediatorImpl.doWork(MessageMediatorImpl.java:2222)
      [exec] at com.sun.corba.ee.impl.threadpool.ThreadPoolImpl$WorkerThread.performWork(ThreadPoolImpl.java:497)
      [exec] at com.sun.corba.ee.impl.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:540)
      [exec] Result: 1

        Activity

        Hide
        Tim Quinn added a comment -

        Fix checked in.

        Project: glassfish
        Repository: svn
        Revision: 60160
        Author: tjquinn
        Date: 2013-03-07 16:46:06 UTC
        Link:

        Log Message:
        ------------
        Fix for 19764

        Introducing weld-se.jar into the ACC indirectly caused weld-se.jar to be on the embedded server class path, which caused problems since the EE Weld library is what's needed in that environment.

        These changes

        1. Update the embedded bootstrap class to exclude the gf-client-module.jar (in the modules directory) from being on the embedded class path.
        2. Revise the way the server retrieves the class from gf-client-module.jar that becomes the main class in the generated app client JAR so that the JAR does not have to be on the server (or embedded) class path.

        Tests: QL, full EJB devtests

        Revisions:
        ----------
        60160

        Modified Paths:
        ---------------
        trunk/main/appserver/appclient/server/core/src/main/java/org/glassfish/appclient/server/core/AppClientDeployerHelper.java
        trunk/main/nucleus/core/bootstrap/src/main/java/com/sun/enterprise/glassfish/bootstrap/StaticGlassFishRuntimeBuilder.java
        trunk/main/appserver/appclient/server/core/src/main/java/org/glassfish/appclient/server/core/AppClientGroupFacadeGenerator.java

        Show
        Tim Quinn added a comment - Fix checked in. Project: glassfish Repository: svn Revision: 60160 Author: tjquinn Date: 2013-03-07 16:46:06 UTC Link: Log Message: ------------ Fix for 19764 Introducing weld-se.jar into the ACC indirectly caused weld-se.jar to be on the embedded server class path, which caused problems since the EE Weld library is what's needed in that environment. These changes 1. Update the embedded bootstrap class to exclude the gf-client-module.jar (in the modules directory) from being on the embedded class path. 2. Revise the way the server retrieves the class from gf-client-module.jar that becomes the main class in the generated app client JAR so that the JAR does not have to be on the server (or embedded) class path. Tests: QL, full EJB devtests Revisions: ---------- 60160 Modified Paths: --------------- trunk/main/appserver/appclient/server/core/src/main/java/org/glassfish/appclient/server/core/AppClientDeployerHelper.java trunk/main/nucleus/core/bootstrap/src/main/java/com/sun/enterprise/glassfish/bootstrap/StaticGlassFishRuntimeBuilder.java trunk/main/appserver/appclient/server/core/src/main/java/org/glassfish/appclient/server/core/AppClientGroupFacadeGenerator.java

          People

          • Assignee:
            Tim Quinn
            Reporter:
            marina vatkina
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: