-
Bug
-
Resolution: Done
-
Major
-
6.0.0.Final
-
None
If a resource injection target contains the following piece of code:
@Stateless public class BugResourceBean implements BugResourceLocal { @EJB private CreateLocal create; public String create() { return "ok"; } }
during injection, instead of injecting into the field, jboss-injection tries to incorrectly inject in the method leading to an exception:
Caused by: java.lang.IllegalArgumentException: failed to set value Proxy to jboss.j2ee:ear=alexandria-ear-0.3.4-SNAPSHOT.ear,jar=alexandria-ejb-0.3.4-SNAPSHOT.jar,name=CreateBean,service=EJB3 implementing [interface com.unifiedpost.alexandria.ejb.CreateLocal] with setter public java.lang.String com.unifiedpost.alexandria.rest.resource.service.BugResourceBean.create() at org.jboss.injection.injector.util.MethodInjectionPoint.set(MethodInjectionPoint.java:66) [:1.0.0-alpha-6] at org.jboss.injection.injector.EEInjector.inject(EEInjector.java:159) [:1.0.0-alpha-6] at org.jboss.injection.injector.EEInjector.inject(EEInjector.java:134) [:1.0.0-alpha-6] at org.jboss.injection.injector.EEInjector.inject(EEInjector.java:82) [:1.0.0-alpha-6]
Please see the referenced forum thread for the complete details.