[weld-issues] [JBoss JIRA] Commented: (WELD-761) Injection of session scoped bean in an EAR fails with NPE

Sivakumar Thyagarajan (JIRA) jira-events at lists.jboss.org
Tue Nov 30 09:44:09 EST 2010


    [ https://jira.jboss.org/browse/WELD-761?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12566221#comment-12566221 ] 

Sivakumar Thyagarajan commented on WELD-761:
--------------------------------------------

Pete: Yes, with the latest SNAPSHOT weld-core sources, I get the following in domain.log as expected. So your fix is working and can close this bug:

[#|2010-11-30T20:06:53.475+0530|SEVERE|glassfish3.1|javax.enterprise.system.tools.admin.org.glassfish.deployment.admin|_ThreadID=131;_ThreadName=admin-thread-pool-4848(2);|Exception while loading the app : WELD-001408 Unsatisfied dependencies for type [TestBean] with qualifiers [@Default] at injection point [[field] @Inject com.acme.NormalLookupInEARServlet.tw]
org.jboss.weld.exceptions.DeploymentException: WELD-001408 Unsatisfied dependencies for type [TestBean] with qualifiers [@Default] at injection point [[field] @Inject com.acme.NormalLookupInEARServlet.tw]
	at org.jboss.weld.bootstrap.Validator.validateInjectionPoint(Validator.java:285)
	at org.jboss.weld.manager.SimpleInjectionTarget.<init>(SimpleInjectionTarget.java:107)
	at org.jboss.weld.manager.BeanManagerImpl.createInjectionTarget(BeanManagerImpl.java:1025)
	at org.jboss.weld.manager.BeanManagerImpl.fireProcessInjectionTarget(BeanManagerImpl.java:1213)
	at org.glassfish.weld.WeldDeployer.fireProcessInjectionTargetEvents(WeldDeployer.java:237)
	at org.glassfish.weld.WeldDeployer.event(WeldDeployer.java:161)

The test sources are at http://java.net/projects/glassfish/sources/svn/show/trunk/v2/appserv-tests/devtests/cdi/javaee-integration/normal-bean-injection-ear?rev=43199
AFAICS, there is no user error in the test. The test case is now failing in Glassfish because of  a glassfish side issue http://java.net/jira/browse/GLASSFISH-14842. I am looking into it. For now, we can close this issue. Thanks for fixing the NPE.

> Injection of session scoped bean in an EAR fails with NPE
> ---------------------------------------------------------
>
>                 Key: WELD-761
>                 URL: https://jira.jboss.org/browse/WELD-761
>             Project: Weld
>          Issue Type: Bug
>          Components: GlassFish Integration, Resolution (Typesafe and by Name)
>    Affects Versions: 1.1.0.Beta2
>            Reporter: Sivakumar Thyagarajan
>             Fix For: 1.1.0.CR1
>
>         Attachments: cdi-full-earApp.ear, server-log-snippet.txt
>
>
> Injection of a session scoped Bean into a Servlet in an EAR fails with 1.1.0.BETA2. This used to pass earlier.
> Related GlassFish issue: https://glassfish.dev.java.net/issues/show_bug.cgi?id=14832
> It appears that resolvedBean is null at https://github.com/weld/core/blob/1.1.0.Beta2/impl/src/main/java/org/jboss/weld/manager/BeanManagerImpl.java#L729
> Caused by: java.lang.NullPointerException
> 	at org.jboss.weld.manager.BeanManagerImpl.getReference(BeanManagerImpl.java:729)
> 	at org.jboss.weld.injection.FieldInjectionPoint.inject(FieldInjectionPoint.java:137)
> 	at org.jboss.weld.util.Beans.injectBoundFields(Beans.java:869)
> 	at org.jboss.weld.util.Beans.injectFieldsAndInitializers(Beans.java:881)
> 	at org.jboss.weld.manager.SimpleInjectionTarget$1.proceed(SimpleInjectionTarget.java:122)
> 	at org.glassfish.weld.services.InjectionServicesImpl.aroundInject(InjectionServicesImpl.java:134)
> 	at org.jboss.weld.injection.InjectionContextImpl.run(InjectionContextImpl.java:50)
> 	at org.jboss.weld.manager.SimpleInjectionTarget.inject(SimpleInjectionTarget.java:116)

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the weld-issues mailing list