• Post Reply Bookmark Topic Watch Topic
  • New Topic

WELD-001408 Unsatisfied dependencies for type [LdapService] with qualifiers [@Named] at injection

 
Chori Pan
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
a sarkar
Ranch Hand
Posts: 93
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Next time, if you post to 3 forums, mention it.

http://stackoverflow.com/questions/26998356/weld-001408-unsatisfied-dependencies-for-type-ldapservice-with-qualifiers-na
https://community.oracle.com/thread/3631899
 
Rob Spoor
Sheriff
Posts: 20816
68
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You should BeForthrightWhenCrossPostingToOtherSites.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!