[jboss-jira] [JBoss JIRA] Created: (JBAS-8868) Incorrect setter picked up for resource injection
jaikiran pai (JIRA)
jira-events at lists.jboss.org
Mon Feb 14 02:32:13 EST 2011
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
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: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list