[jboss-jira] [JBoss JIRA] (WFLY-1620) EJB in CDI enabled module gets registered twice leading to WELD-001409 Ambiguous dependencies...

RH Bugzilla Integration (JIRA) jira-events at lists.jboss.org
Wed Nov 6 17:25:02 EST 2013


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

RH Bugzilla Integration updated WFLY-1620:
------------------------------------------

    Bugzilla References: https://bugzilla.redhat.com/show_bug.cgi?id=980183, https://bugzilla.redhat.com/show_bug.cgi?id=1027472  (was: https://bugzilla.redhat.com/show_bug.cgi?id=980183)

    
> EJB in CDI enabled module gets registered twice leading to WELD-001409 Ambiguous dependencies...
> ------------------------------------------------------------------------------------------------
>
>                 Key: WFLY-1620
>                 URL: https://issues.jboss.org/browse/WFLY-1620
>             Project: WildFly
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: Server
>    Affects Versions: 8.0.0.Alpha2
>            Reporter: Brad Maxwell
>            Assignee: Stuart Douglas
>             Fix For: 8.0.0.Alpha3
>
>
> If you have this no-interface @Stateless EJB in the module and have a
> beans.xml inside the module jar as well and then have a deployment
> depends on & imports the annotations, and then uses @Inject TestEjb,
> Weld will complain that there are two options an EJB and a ManagedBean
> and it doesn't know which to inject. According to [1] it should only be
> considered a managed bean if "It is not annotated with an EJB
> component-defining annotation or declared as an EJB bean class in
> |ejb-jar.xml|." 
> The error:
> WELD-001409 Ambiguous dependencies for type [TestEjb] with qualifiers [@Default] at injection point [[field] @Inject test.webapp.TestService.testEjb].
> Possible dependencies [[Session bean [class test.TestEjb with qualifiers [@Any @Default]; local interfaces are [TestEjb], Managed Bean [class test.TestEjb] with qualifiers [@Any @Default]]] 
> @Stateless
> public class TestEjb
> {
> public String hello() {
> return "Hello";
> }
> }
> If I move all of the classes into the test war, then Weld doesn't have
> an issue, so it seems there is some difference when the code is put into
> the modules directory.
> [1] http://docs.jboss.org/weld/reference/1.0.1-Final/en-US/html_single/#d0e792 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the jboss-jira mailing list