3 Replies Latest reply on Sep 3, 2015 2:27 AM by mkouba

    WELD-001408: Unsatisfied dependencies

    ruddy32

      Hi,

      I'm having trouble using dependency injection (with CDI/Weld) within libraries used in a war when deploying on Glassfish 4.1-b15. I have two libraries, say:

      WEB-INF/lib/library1.jar
      WEB
      -INF/lib/library2.jar

      library1 contains a public class, say "InjectMe". Library2 contains another public class, say "InjectionTarget" with an injection site like "@Inject public InjectMe injectMe;".

      Deployment fails with:

      WELD-001408 Unsatisfied dependencies for type InjectMe with qualifiers @Default
      at injection point [BackedAnnotatedParameter] Parameter 3 of [BackedAnnotatedConstructor]
      @Inject protected MyClass(MyProcessor, MyLocale, InjectMe).

      Both archives are valid CDI archives with a META-INF/beans.xml .

      The application is a war component running with WELD 2.2.13-Final.

      Is there a solution to solve it ?