[GLASSFISH-20984] Unable to inject JMS resources in a bean defined in a dependency jar Created: 13/Feb/14  Updated: 20/Apr/15

Status: Open
Project: glassfish
Component/s: cdi, jms
Affects Version/s: 4.0
Fix Version/s: None

Type: Bug Priority: Major
Reporter: electricsam Assignee: jjsnyder83
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Linux, jdk 1.7.0_45



 Description   

I have an @ApplicationScoped bean defined in a common library which I add to my projects in a dependency jar.

Injection of the connection factory and queue results in null objects when using @Resource

Example code:

In this code, I have tried both @Resource(name = "... and @Resource(mappedName = "... with the same result.

@ApplicationScoped
public class PerformanceLoggingProducer {

    private static final Logger logger = Logger.getLogger(PerformanceLoggingProducer.class.getName());

    @Resource(mappedName = "jms/ConnectionFactory")
    private ConnectionFactory connectionFactory;
    @Resource(name = "jms/PerformanceLoggingQueue")
    private Queue queue;

    public void log(final PerformanceLogTracker tracker) {

        if (tracker != null) {
      
            Thread t = new Thread(new Runnable() {

                @Override
                public void run() {
                    try (Connection connection = connectionFactory.createConnection()) {
                        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
                        MessageProducer producer = session.createProducer(queue);
                        ObjectMessage message = session.createObjectMessage(tracker);
                        producer.send(message);
                    } catch (Exception ex) {
                        logger.log(Level.SEVERE, "An error occurred when logging message: " + tracker, ex);
                    }
                }
            });
            
            t.start();

        }
    }

}

Workaround:

Don't use @Resource for the lookup.

@ApplicationScoped
public class PerformanceLoggingProducer {

    private static final Logger logger = Logger.getLogger(PerformanceLoggingProducer.class.getName());

//    @Resource(mappedName = "jms/ConnectionFactory")
    private ConnectionFactory connectionFactory;
//    @Resource(name = "jms/PerformanceLoggingQueue")
    private Queue queue;

    public PerformanceLoggingProducer() {
        try {
            connectionFactory = (ConnectionFactory) new InitialContext().lookup("jms/ConnectionFactory");
            queue = (Queue) new InitialContext().lookup("jms/PerformanceLoggingQueue");
        } catch (NamingException ex) {
            logger.log(Level.SEVERE, null, ex);
        }
    }

    public void log(final PerformanceLogTracker tracker) {

        if (tracker != null) {
      
            Thread t = new Thread(new Runnable() {

                @Override
                public void run() {
                    try (Connection connection = connectionFactory.createConnection()) {
                        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
                        MessageProducer producer = session.createProducer(queue);
                        ObjectMessage message = session.createObjectMessage(tracker);
                        producer.send(message);
                    } catch (Exception ex) {
                        logger.log(Level.SEVERE, "An error occurred when logging message: " + tracker, ex);
                    }
                }
            });
            
            t.start();

        }
    }

}


 Comments   
Comment by jjsnyder83 [ 20/Apr/15 ]

Can you provide a test app? I'd like to see how it's packaged.





[GLASSFISH-21233] NPE when deploying app with method returning lambda Created: 10/Oct/14  Updated: 11/May/15

Status: Open
Project: glassfish
Component/s: cdi, deployment
Affects Version/s: 4.1
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Liiiii Assignee: jjsnyder83
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Windows 8 64 bit

java version "1.8.0_20"
Java(TM) SE Runtime Environment (build 1.8.0_20-b26)
Java HotSpot(TM) 64-Bit Server VM (build 25.20-b23, mixed mode)

Eclipse, Java EE distribution, 4.4



 Description   

When deploying a WAR application (using the Eclipse Java EE development tools) to GlassFish a DeploymentException is thrown and the deployment is aborted.

This happens when the project contains a method which returns a lambda expression:

public class Utils {
public static <K, V> Function<K, V> noSuchElementThrower() {
return k ->

{ throw new NoSuchElementException(); }

;
}
}

The method does not need to be invoke anywhere.

The following is the log that is produced during the incident:

2014-10-10T11:39:54.560+0200|Info: Running GlassFish Version: GlassFish Server Open Source Edition 4.1 (build 13)
2014-10-10T11:39:54.560+0200|Info: Server log file is using Formatter class: com.sun.enterprise.server.logging.ODLLogFormatter
2014-10-10T11:39:54.638+0200|Info: Realm [admin-realm] of classtype [com.sun.enterprise.security.auth.realm.file.FileRealm] successfully created.
2014-10-10T11:39:54.638+0200|Info: Realm [file] of classtype [com.sun.enterprise.security.auth.realm.file.FileRealm] successfully created.
2014-10-10T11:39:54.638+0200|Info: Realm [certificate] of classtype [com.sun.enterprise.security.auth.realm.certificate.CertificateRealm] successfully created.
2014-10-10T11:39:54.654+0200|Info: Realm [seshat-realm] of classtype [com.sun.enterprise.security.auth.realm.jdbc.JDBCRealm] successfully created.
2014-10-10T11:39:54.748+0200|Info: Authorization Service has successfully initialized.
2014-10-10T11:39:54.763+0200|Info: Registered org.glassfish.ha.store.adapter.cache.ShoalBackingStoreProxy for persistence-type = replicated in BackingStoreFactoryRegistry
2014-10-10T11:39:54.982+0200|Info: Grizzly Framework 2.3.15 started in: 140ms - bound to [/0.0.0.0:8080]
2014-10-10T11:39:55.107+0200|Info: Grizzly Framework 2.3.15 started in: 0ms - bound to [/0.0.0.0:8181]
2014-10-10T11:39:55.107+0200|Info: Grizzly Framework 2.3.15 started in: 0ms - bound to [/0.0.0.0:4848]
2014-10-10T11:39:55.138+0200|Info: Grizzly Framework 2.3.15 started in: 0ms - bound to [/0.0.0.0:3700]
2014-10-10T11:39:55.138+0200|Info: GlassFish Server Open Source Edition 4.1 (13) startup time : Felix (1,401ms), startup services(640ms), total(2,041ms)
2014-10-10T11:39:55.295+0200|Info: JMXStartupService has started JMXConnector on JMXService URL service:jmx:rmi://192.168.0.253:8686/jndi/rmi://192.168.0.253:8686/jmxrmi
2014-10-10T11:39:56.493+0200|Info: Initiating Jersey application, version Jersey: 2.10.4 2014-08-08 15:09:00...
2014-10-10T11:39:56.571+0200|Info: HV000001: Hibernate Validator 5.0.0.Final
2014-10-10T11:39:57.071+0200|Info: Listening to REST requests at context: /management/domain.
2014-10-10T11:39:57.149+0200|Info: Registered com.sun.enterprise.glassfish.bootstrap.osgi.EmbeddedOSGiGlassFishImpl@2d6aca33 as OSGi service registration: org.apache.felix.framework.ServiceRegistrationImpl@6edaa77a.
2014-10-10T11:39:57.383+0200|Info: visiting unvisited references
2014-10-10T11:39:57.680+0200|Info: Created HTTP listener http-listener-1 on host/port 0.0.0.0:8080
2014-10-10T11:39:57.680+0200|Info: Created HTTP listener http-listener-2 on host/port 0.0.0.0:8181
2014-10-10T11:39:57.696+0200|Info: Created HTTP listener admin-listener on host/port 0.0.0.0:4848
2014-10-10T11:39:57.711+0200|Info: Created virtual server server
2014-10-10T11:39:57.711+0200|Info: Created virtual server __asadmin
2014-10-10T11:39:57.836+0200|Info: Setting JAAS app name glassfish-web
2014-10-10T11:39:57.852+0200|Info: Virtual server server loaded default web module
2014-10-10T11:39:58.039+0200|Info: Java security manager is disabled.
2014-10-10T11:39:58.039+0200|Info: Entering Security Startup Service.
2014-10-10T11:39:58.039+0200|Info: Loading policy provider com.sun.enterprise.security.provider.PolicyWrapper.
2014-10-10T11:39:58.071+0200|Info: Security Service(s) started successfully.
2014-10-10T11:39:58.258+0200|Info: visiting unvisited references
2014-10-10T11:39:58.274+0200|Info: visiting unvisited references
2014-10-10T11:39:58.274+0200|Info: visiting unvisited references
2014-10-10T11:39:59.102+0200|Info: Initializing Mojarra 2.2.7 ( 20140610-1547 https://svn.java.net/svn/mojarra~svn/tags/2.2.7@13362) for context ''
2014-10-10T11:40:00.336+0200|Info: Loading application [__admingui] at [/]
2014-10-10T11:40:00.336+0200|Info: Loading application __admingui done in 3,187 ms
2014-10-10T11:40:00.727+0200|Info: visiting unvisited references
2014-10-10T11:40:00.961+0200|Info: visiting unvisited references
2014-10-10T11:40:01.071+0200|Info: visiting unvisited references
2014-10-10T11:40:01.086+0200|Info: visiting unvisited references
2014-10-10T11:40:01.086+0200|Info: visiting unvisited references
2014-10-10T11:40:01.086+0200|Info: visiting unvisited references
2014-10-10T11:40:01.086+0200|Info: visiting unvisited references
2014-10-10T11:40:01.086+0200|Info: visiting unvisited references
2014-10-10T11:40:01.086+0200|Info: visiting unvisited references
2014-10-10T11:40:01.196+0200|Info: visiting unvisited references
2014-10-10T11:40:01.352+0200|Info: visiting unvisited references
2014-10-10T11:40:02.023+0200|Info: EclipseLink, version: Eclipse Persistence Services - 2.5.2.v20140319-9ad6abd
2014-10-10T11:40:02.314+0200|Info: file:/C:/Users/Jens/Programs/Glassfish/glassfish_4.1/glassfish/domains/domain1/eclipseApps/SeshatWAR/WEB-INF/classes/_seshat_pu login successful
2014-10-10T11:40:02.376+0200|Info: Portable JNDI names for EJB TestManager: [java:global/SeshatWAR/TestManager!com.codemint.seshat.test.TestManager, java:global/SeshatWAR/TestManager]
2014-10-10T11:40:02.407+0200|Info: Portable JNDI names for EJB UserStore: [java:global/SeshatWAR/UserStore!com.codemint.seshat.service.UserStore, java:global/SeshatWAR/UserStore]
2014-10-10T11:40:02.423+0200|Info: Portable JNDI names for EJB TimeStoreImpl: [java:global/SeshatWAR/TimeStoreImpl!com.codemint.seshat.service.TimeStore, java:global/SeshatWAR/TimeStoreImpl!com.codemint.seshat.service.TimeStoreImpl]
2014-10-10T11:40:02.423+0200|Info: Portable JNDI names for EJB ProjectFacade: [java:global/SeshatWAR/ProjectFacade!com.codemint.seshat.service.ProjectFacade, java:global/SeshatWAR/ProjectFacade]
2014-10-10T11:40:02.439+0200|Info: WELD-000900: 2.2.2 (Final)
2014-10-10T11:40:02.657+0200|WARN: WELD-001700: Interceptor annotation class javax.ejb.PostActivate not found, interception based on it is not enabled
2014-10-10T11:40:02.657+0200|WARN: WELD-001700: Interceptor annotation class javax.ejb.PrePassivate not found, interception based on it is not enabled
2014-10-10T11:40:02.736+0200|WARN: WELD-000411: Observer method [BackedAnnotatedMethod] org.glassfish.sse.impl.ServerSentEventCdiExtension.processAnnotatedType(@Observes ProcessAnnotatedType<Object>, BeanManager) receives events for all annotated types. Consider restricting events using @WithAnnotations or a generic type with bounds.
2014-10-10T11:40:02.751+0200|WARN: WELD-000411: Observer method [BackedAnnotatedMethod] private org.glassfish.jersey.gf.cdi.internal.CdiComponentProvider.processAnnotatedType(@Observes ProcessAnnotatedType<Object>) receives events for all annotated types. Consider restricting events using @WithAnnotations or a generic type with bounds.
2014-10-10T11:40:02.845+0200|Info: WELD-000119: Not generating any bean definitions from com.codemint.seshat.backing.TimeTable because of underlying class loading error: Type [unknown] not found. If this is unexpected, enable DEBUG logging to see the full error.
2014-10-10T11:40:02.861+0200|Info: WELD-000119: Not generating any bean definitions from com.codemint.seshat.test.TestData because of underlying class loading error: Type [unknown] not found. If this is unexpected, enable DEBUG logging to see the full error.
2014-10-10T11:40:02.876+0200|Severe: Exception during lifecycle processing
org.glassfish.deployment.common.DeploymentException: CDI deployment failure:null
at org.glassfish.weld.WeldDeployer.event(WeldDeployer.java:234)
at org.glassfish.kernel.event.EventsImpl.send(EventsImpl.java:131)
at org.glassfish.internal.data.ApplicationInfo.load(ApplicationInfo.java:328)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:496)
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$1.run(CommandRunnerImpl.java:539)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:535)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:360)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$2.execute(CommandRunnerImpl.java:534)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$3.run(CommandRunnerImpl.java:565)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$3.run(CommandRunnerImpl.java:557)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:360)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:556)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1464)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1300(CommandRunnerImpl.java:109)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1846)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1722)
at com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:534)
at com.sun.enterprise.v3.admin.AdminAdapter.onMissingResource(AdminAdapter.java:224)
at org.glassfish.grizzly.http.server.StaticHttpHandlerBase.service(StaticHttpHandlerBase.java:189)
at com.sun.enterprise.v3.services.impl.ContainerMapper$HttpHandlerCallable.call(ContainerMapper.java:459)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:167)
at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:201)
at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:175)
at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:235)
at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:284)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:201)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:133)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:112)
at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:561)
at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:112)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:117)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:56)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:137)
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:565)
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:545)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.NullPointerException
at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:191)
at com.google.common.cache.LocalCache.get(LocalCache.java:3989)
at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:3994)
at com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:4878)
at org.jboss.weld.util.cache.LoadingCacheUtils.getCacheValue(LoadingCacheUtils.java:49)
at org.jboss.weld.resources.SharedObjectCache.getTypeClosureHolder(SharedObjectCache.java:80)
at org.jboss.weld.annotated.slim.backed.BackedAnnotatedMember.initTypeClosure(BackedAnnotatedMember.java:29)
at org.jboss.weld.annotated.slim.backed.BackedAnnotated.<init>(BackedAnnotated.java:19)
at org.jboss.weld.annotated.slim.backed.BackedAnnotatedMember.<init>(BackedAnnotatedMember.java:23)
at org.jboss.weld.annotated.slim.backed.BackedAnnotatedCallable.<init>(BackedAnnotatedCallable.java:33)
at org.jboss.weld.annotated.slim.backed.BackedAnnotatedMethod.<init>(BackedAnnotatedMethod.java:38)
at org.jboss.weld.annotated.slim.backed.BackedAnnotatedMethod.of(BackedAnnotatedMethod.java:32)
at org.jboss.weld.annotated.slim.backed.BackedAnnotatedType$BackedAnnotatedMethods.computeValue(BackedAnnotatedType.java:193)
at org.jboss.weld.annotated.slim.backed.BackedAnnotatedType$BackedAnnotatedMethods.computeValue(BackedAnnotatedType.java:186)
at org.jboss.weld.util.LazyValueHolder.get(LazyValueHolder.java:35)
at org.jboss.weld.annotated.slim.backed.BackedAnnotatedType$EagerlyInitializedLazyValueHolder.<init>(BackedAnnotatedType.java:154)
at org.jboss.weld.annotated.slim.backed.BackedAnnotatedType$BackedAnnotatedMethods.<init>(BackedAnnotatedType.java:186)
at org.jboss.weld.annotated.slim.backed.BackedAnnotatedType$BackedAnnotatedMethods.<init>(BackedAnnotatedType.java:186)
at org.jboss.weld.annotated.slim.backed.BackedAnnotatedType.<init>(BackedAnnotatedType.java:66)
at org.jboss.weld.annotated.slim.backed.BackedAnnotatedType.of(BackedAnnotatedType.java:47)
at org.jboss.weld.resources.ClassTransformer$TransformClassToBackedAnnotatedType.load(ClassTransformer.java:83)
at org.jboss.weld.resources.ClassTransformer$TransformClassToBackedAnnotatedType.load(ClassTransformer.java:80)
at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3589)
at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2374)
at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2337)
at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2252)
at com.google.common.cache.LocalCache.get(LocalCache.java:3990)
at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:3994)
at com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:4878)
at org.jboss.weld.util.cache.LoadingCacheUtils.getCacheValue(LoadingCacheUtils.java:49)
at org.jboss.weld.util.cache.LoadingCacheUtils.getCastCacheValue(LoadingCacheUtils.java:74)
at org.jboss.weld.resources.ClassTransformer.getBackedAnnotatedType(ClassTransformer.java:175)
at org.jboss.weld.resources.ClassTransformer.getBackedAnnotatedType(ClassTransformer.java:194)
at org.jboss.weld.bootstrap.AnnotatedTypeLoader.loadAnnotatedType(AnnotatedTypeLoader.java:78)
at org.jboss.weld.bootstrap.AnnotatedTypeLoader.loadAnnotatedType(AnnotatedTypeLoader.java:60)
at org.jboss.weld.bootstrap.BeanDeployer.addClass(BeanDeployer.java:97)
at org.jboss.weld.bootstrap.BeanDeployer.addClasses(BeanDeployer.java:135)
at org.jboss.weld.bootstrap.BeanDeployment.createClasses(BeanDeployment.java:209)
at org.jboss.weld.bootstrap.WeldStartup.startInitialization(WeldStartup.java:351)
at org.jboss.weld.bootstrap.WeldBootstrap.startInitialization(WeldBootstrap.java:76)
at org.glassfish.weld.WeldDeployer.event(WeldDeployer.java:220)
... 41 more

2014-10-10T11:40:02.876+0200|Severe: Exception while loading the app
2014-10-10T11:40:02.876+0200|Severe: Undeployment failed for context /SeshatWAR
2014-10-10T11:40:02.876+0200|Info: file:/C:/Users/Jens/Programs/Glassfish/glassfish_4.1/glassfish/domains/domain1/eclipseApps/SeshatWAR/WEB-INF/classes/_seshat_pu logout successful
2014-10-10T11:40:02.876+0200|Severe: Exception while loading the app : CDI deployment failure:null
java.lang.NullPointerException
at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:191)
at com.google.common.cache.LocalCache.get(LocalCache.java:3989)
at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:3994)
at com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:4878)
at org.jboss.weld.util.cache.LoadingCacheUtils.getCacheValue(LoadingCacheUtils.java:49)
at org.jboss.weld.resources.SharedObjectCache.getTypeClosureHolder(SharedObjectCache.java:80)
at org.jboss.weld.annotated.slim.backed.BackedAnnotatedMember.initTypeClosure(BackedAnnotatedMember.java:29)
at org.jboss.weld.annotated.slim.backed.BackedAnnotated.<init>(BackedAnnotated.java:19)
at org.jboss.weld.annotated.slim.backed.BackedAnnotatedMember.<init>(BackedAnnotatedMember.java:23)
at org.jboss.weld.annotated.slim.backed.BackedAnnotatedCallable.<init>(BackedAnnotatedCallable.java:33)
at org.jboss.weld.annotated.slim.backed.BackedAnnotatedMethod.<init>(BackedAnnotatedMethod.java:38)
at org.jboss.weld.annotated.slim.backed.BackedAnnotatedMethod.of(BackedAnnotatedMethod.java:32)
at org.jboss.weld.annotated.slim.backed.BackedAnnotatedType$BackedAnnotatedMethods.computeValue(BackedAnnotatedType.java:193)
at org.jboss.weld.annotated.slim.backed.BackedAnnotatedType$BackedAnnotatedMethods.computeValue(BackedAnnotatedType.java:186)
at org.jboss.weld.util.LazyValueHolder.get(LazyValueHolder.java:35)
at org.jboss.weld.annotated.slim.backed.BackedAnnotatedType$EagerlyInitializedLazyValueHolder.<init>(BackedAnnotatedType.java:154)
at org.jboss.weld.annotated.slim.backed.BackedAnnotatedType$BackedAnnotatedMethods.<init>(BackedAnnotatedType.java:186)
at org.jboss.weld.annotated.slim.backed.BackedAnnotatedType$BackedAnnotatedMethods.<init>(BackedAnnotatedType.java:186)
at org.jboss.weld.annotated.slim.backed.BackedAnnotatedType.<init>(BackedAnnotatedType.java:66)
at org.jboss.weld.annotated.slim.backed.BackedAnnotatedType.of(BackedAnnotatedType.java:47)
at org.jboss.weld.resources.ClassTransformer$TransformClassToBackedAnnotatedType.load(ClassTransformer.java:83)
at org.jboss.weld.resources.ClassTransformer$TransformClassToBackedAnnotatedType.load(ClassTransformer.java:80)
at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3589)
at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2374)
at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2337)
at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2252)
at com.google.common.cache.LocalCache.get(LocalCache.java:3990)
at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:3994)
at com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:4878)
at org.jboss.weld.util.cache.LoadingCacheUtils.getCacheValue(LoadingCacheUtils.java:49)
at org.jboss.weld.util.cache.LoadingCacheUtils.getCastCacheValue(LoadingCacheUtils.java:74)
at org.jboss.weld.resources.ClassTransformer.getBackedAnnotatedType(ClassTransformer.java:175)
at org.jboss.weld.resources.ClassTransformer.getBackedAnnotatedType(ClassTransformer.java:194)
at org.jboss.weld.bootstrap.AnnotatedTypeLoader.loadAnnotatedType(AnnotatedTypeLoader.java:78)
at org.jboss.weld.bootstrap.AnnotatedTypeLoader.loadAnnotatedType(AnnotatedTypeLoader.java:60)
at org.jboss.weld.bootstrap.BeanDeployer.addClass(BeanDeployer.java:97)
at org.jboss.weld.bootstrap.BeanDeployer.addClasses(BeanDeployer.java:135)
at org.jboss.weld.bootstrap.BeanDeployment.createClasses(BeanDeployment.java:209)
at org.jboss.weld.bootstrap.WeldStartup.startInitialization(WeldStartup.java:351)
at org.jboss.weld.bootstrap.WeldBootstrap.startInitialization(WeldBootstrap.java:76)
at org.glassfish.weld.WeldDeployer.event(WeldDeployer.java:220)
at org.glassfish.kernel.event.EventsImpl.send(EventsImpl.java:131)
at org.glassfish.internal.data.ApplicationInfo.load(ApplicationInfo.java:328)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:496)
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$1.run(CommandRunnerImpl.java:539)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:535)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:360)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$2.execute(CommandRunnerImpl.java:534)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$3.run(CommandRunnerImpl.java:565)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$3.run(CommandRunnerImpl.java:557)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:360)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:556)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1464)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1300(CommandRunnerImpl.java:109)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1846)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1722)
at com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:534)
at com.sun.enterprise.v3.admin.AdminAdapter.onMissingResource(AdminAdapter.java:224)
at org.glassfish.grizzly.http.server.StaticHttpHandlerBase.service(StaticHttpHandlerBase.java:189)
at com.sun.enterprise.v3.services.impl.ContainerMapper$HttpHandlerCallable.call(ContainerMapper.java:459)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:167)
at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:201)
at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:175)
at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:235)
at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:284)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:201)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:133)
at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:112)
at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:561)
at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:112)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:117)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:56)
at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:137)
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:565)
at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:545)
at java.lang.Thread.run(Thread.java:745)



 Comments   
Comment by jjsnyder83 [ 11/May/15 ]

Can you please retry this on the latest GlassFish trunk? We recently updated the version of Weld to 2.2.10.SP1 and I'm hoping it's fixed there.





[GLASSFISH-20928] Cache the created InjectionTarget objects Created: 16/Dec/13  Updated: 16/Dec/13

Status: Open
Project: glassfish
Component/s: cdi
Affects Version/s: 4.0
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: jjsnyder83 Assignee: jjsnyder83
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

In JDCIServiceImpl#injectManagedObject cache the created InjectionTarget objects.






Generated at Fri Jul 03 03:44:35 UTC 2015 using JIRA 6.2.3#6260-sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.