]
jaikiran pai resolved JBAS-8868.
--------------------------------
Fix Version/s: 6.1.0
Resolution: Done
Incorrect setter picked up for resource injection
-------------------------------------------------
Key: JBAS-8868
URL:
https://issues.jboss.org/browse/JBAS-8868
Project: JBoss Application Server
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: Integration
Affects Versions: 6.0.0.Final
Reporter: jaikiran pai
Assignee: jaikiran pai
Fix For: 6.1.0
If a resource injection target contains the following piece of code:
{code}
@Stateless
public class BugResourceBean implements BugResourceLocal {
@EJB
private CreateLocal create;
public String create() {
return "ok";
}
}
{code}
during injection, instead of injecting into the field, jboss-injection tries to
incorrectly inject in the method leading to an exception:
{code}
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]
{code}
Please see the referenced forum thread for the complete details.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: