users@glassfish.java.net

Re: CDI Bean Injection not happening..(Only Service Injection)

From: <forums_at_java.net>
Date: Tue, 9 Jul 2013 04:38:29 -0500 (CDT)

Could you be more specific in your answer ? In my case, the injection of EJB
in my Struts action was doing fine until I needed to inject 2 EJB
(stateless). protected @Inject ABean a; protected @Inject BBean b; Throws :
[#|2013-07-09T11:31:17.590+0200|SEVERE|glassfish3.1.2|javax.enterprise.system.tools.admin.org.glassfish.deployment.admin|_ThreadID=36;_ThreadName=admin-thread-pool-9148(2);|Exception
while loading the app : Exception List with 3 exceptions: Exception 0 :
org.jboss.weld.exceptions.DeploymentException: WELD-001408 Unsatisfied
dependencies for type [ABean] with qualifiers [@Default] at injection point
[[field] @Inject protected my.ActionForwarder.a] at
org.jboss.weld.bootstrap.Validator.validateInjectionPoint(Validator.java:311)
at
org.jboss.weld.bootstrap.Validator.validateInjectionPoint(Validator.java:280)
at org.jboss.weld.bootstrap.Validator.validateBean(Validator.java:143) at
org.jboss.weld.bootstrap.Validator.validateRIBean ... If I swap the
declaration to protected @Inject BBean b; protected @Inject ABean a; I get
the inverse stack trace :
[#|2013-07-09T11:39:07.230+0200|SEVERE|glassfish3.1.2|javax.enterprise.system.tools.admin.org.glassfish.deployment.admin|_ThreadID=36;_ThreadName=admin-thread-pool-9148(2);|Exception
while loading the app : Exception List with 3 exceptions: Exception 0 :
org.jboss.weld.exceptions.DeploymentException: WELD-001408 Unsatisfied
dependencies for type [BBean] with qualifiers [@Default] at injection point
[[field] @Inject protected my.ActionForwarder.b] at
org.jboss.weld.bootstrap.Validator.validateInjectionPoint(Validator.java:311)
at
org.jboss.weld.bootstrap.Validator.validateInjectionPoint(Validator.java:280)
at org.jboss.weld.bootstrap.Validator.validateBean(Validator.java:143) at
org.jboss.weld.bootstrap.Validator.validateRIBean ... Any idea ... ? \T, pom
definition contains : javax.enterprise cdi-api ${cdi-api.version} provided
with 1.0-SP1 as recommended

--
[Message sent by forum member 'tsmets']
View Post: http://forums.java.net/node/895558