[jboss-jira] [JBoss JIRA] Resolved: (JBAS-9236) Resource injection ends up searching for wrong target method when a resource type is specified

jaikiran pai (JIRA) jira-events at lists.jboss.org
Mon Apr 18 12:38:33 EDT 2011


     [ https://issues.jboss.org/browse/JBAS-9236?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

jaikiran pai resolved JBAS-9236.
--------------------------------

    Resolution: Done


> Resource injection ends up searching for wrong target method when a resource type is specified
> ----------------------------------------------------------------------------------------------
>
>                 Key: JBAS-9236
>                 URL: https://issues.jboss.org/browse/JBAS-9236
>             Project: JBoss Application Server
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: EE
>    Affects Versions: 7.0.0.Beta2
>            Reporter: jaikiran pai
>            Assignee: jaikiran pai
>             Fix For: 7.0.0.Beta3
>
>
> Consider either of the following examples:
> {code}
> @Resource (type=ChildClass.class)
> public void setSomeValue(ParentClass b);
> {code}
> {code}
> @EJB (beanInterface=SpecificBeanClassImpl.class)
> public void setSomeEjb(ParentClass b);
> {code}
> The resource injection framework ends up searching for an (incorrect) method whose paramtype is ChildClass/SpecificBeanImplClass and doesn't find such a method. As a result, the deployment fails with exception like:
> {code}
> Caused by: java.lang.IllegalArgumentException: Invalid injection - Method void setSomeEjb(SpecificBeanImplClass) not found on class blah.blah.SomeClass
> 	at org.jboss.as.ee.component.ResourceInjection$Factory.create(ResourceInjection.java:88)
> 	at org.jboss.as.ee.component.JndiInjectionPointStore.applyInjections(JndiInjectionPointStore.java:98)
> 	at org.jboss.as.ee.component.ComponentInstallProcessor.deployComponent(ComponentInstallProcessor.java:206)
> 	at org.jboss.as.ee.component.ComponentInstallProcessor.deploy(ComponentInstallProcessor.java:67)
> 	... 5 more
> {code}

--
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