[jboss-jira] [JBoss JIRA] (EJBTHREE-2279) Injection target type mismatch

Arto Huusko (JIRA) jira-events at lists.jboss.org
Tue Apr 10 03:44:47 EDT 2012


Arto Huusko created EJBTHREE-2279:
-------------------------------------

             Summary: Injection target type mismatch
                 Key: EJBTHREE-2279
                 URL: https://issues.jboss.org/browse/EJBTHREE-2279
             Project: EJB 3.0
          Issue Type: Bug
         Environment: JBoss AS 7.1.1.Final
            Reporter: Arto Huusko


EJB 3 session deployment fails on AS 7.1.1 with error:

16:28:53,144 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-8) MSC00001: Failed to start service jboss.deployment.unit."example.jar".POST_MODULE: org.jboss.msc.service.StartException in service jboss.deployment.unit."example.jar".POST_MODULE: Failed to process phase POST_MODULE of deployment "example.jar"
	at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:119) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
	at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
	at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [rt.jar:1.6.0_31]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [rt.jar:1.6.0_31]
	at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_31]
Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: JBAS011068: Injection target session2 on class Session1Bean is not compatible with the type of injection: interface Session2Local
	at org.jboss.as.ee.component.deployers.AbstractDeploymentDescriptorBindingsProcessor.processInjectionTargets(AbstractDeploymentDescriptorBindingsProcessor.java:157)
	at org.jboss.as.ejb3.deployment.processors.EjbRefProcessor.processDescriptorEntries(EjbRefProcessor.java:173)
	at org.jboss.as.ee.component.deployers.AbstractDeploymentDescriptorBindingsProcessor.deploy(AbstractDeploymentDescriptorBindingsProcessor.java:105)
	at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:113) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
	... 5 more

Session2Local is the actual business interface of the injected bean. The field Session1Bean.session2 has type Session2 which is a superinteface of Session2Local. The injection is done using <ejb-local-ref> with <injection-target> in deployment descriptor.

The forum reference contains a failing example JAR with source code.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jboss-jira mailing list