Hello I'm trying to deploy an EAR to my Weblogic server 12c (12.1.3) without success.
My LdapService class is a Stateless
EJB with default no args constructor (This project is an ejb package)
I'm trying to inject it to another class like:
The bean annotated with @EJB it's recognized by the CDI, but the injection point throws me this error about the @Inject:
> Deployment failed. The message was: org.jboss.weld.exceptions.DeploymentException:
WELD-001409 Ambiguous dependencies for type [LdapService] with qualifiers
[@Default] at injection point [[field] @Inject net.ab4cus.project.business.TransactionService.registerService].
Possible dependencies [[Session bean [class net.ab4cus.project.auth.LdapService
with qualifiers [@Any @Default]; local interfaces are [LdapService]]
If in LdapService use @Named("LdapService") and then at the injection point use:
Then I got this error:
> Deployment failed. The message was: org.jboss.weld.exceptions.DeploymentException: WELD-001408 Unsatisfied
dependencies for type [LdapService] with qualifiers [@Named] at injection
point [[field] @Inject @Named net.ab4cus.project.business.UserService.registerService]
How do I can solve this error and remove the ambiguity? or what is the correct way to do @Inject to other beans?
Thank You.
PD. Already tried to remove the @Inject in LdapService constructor with the same result.