2 Replies Latest reply on Oct 12, 2011 11:09 AM by guidbona.guidbona.yahoo.com

    WELD-001408 Unsatisfied dependencies for type

    stevemaring

      I am deploying a war to JBoss AS 6.1.0.Final.  I have a simple JSF managed bean with a property annotated with @Inject, to bind an instance of a DAO in the classpath.


      The managed bean is failing with:


      Caused by: com.sun.faces.spi.InjectionProviderException: unable to process injections.
              at org.jboss.web.jsf.integration.injection.JBossDelegatingInjectionProvider.inject(JBossDelegatingInjectionProvider.java:81) [:1.0.3]
              at com.sun.faces.mgbean.BeanBuilder.injectResources(BeanBuilder.java:205) [:2.0.4-b09]
              ... 115 more
      Caused by: org.jboss.weld.exceptions.DeploymentException: WELD-001408 Unsatisfied dependencies for type [WorkerNameDAO] with qualifiers [@Default] at injection point [[field] @Inject com.gentiva.lst.ela.assist.presentation.WorkerBean.workerNameDAO]




      I have Seam in the war:


      \- org.jboss.seam.faces:seam-faces:jar:3.0.2.Final:runtime
         +- org.jboss.seam.international:seam-international:jar:3.0.0.Final:runtime
         \- org.jboss.seam.solder:seam-solder:jar:3.0.0.Final:runtime



      I thought the required CDI stuff was already in 6.1.0.Final.


      What is going on here?  Do I need to add the Weld jars to my war?


      Thanks,
      Steve Maring
      Tampa, FL

        • 1. Re: WELD-001408 Unsatisfied dependencies for type
          stevemaring

          I just tried dropping Weld into the war, via:



          <dependency>
             <groupId>org.jboss.weld</groupId>
             <artifactId>weld-core</artifactId>
             <version>1.1.2.Final</version>
             <scope>runtime</scope>
          </dependency>




          but that resulted in a deployment error of:



          12:22:35,488 INFO  [Version] WELD-000900 1.1.2 (Final)
          12:22:35,504 ERROR [AbstractKernelController] Error installing to Instantiated: name=vfs:///C:/app/jboss-6.1.0.Final/server/default/deploy/gentiva-lifesmart-ela-assist-web-0.0.1-SNAPSHOT.war_WeldBootstrapBean state=Described: java.lang.IllegalArgumentException
          : Wrong arguments. new for target java.lang.reflect.Constructor expected=[org.jboss.weld.bootstrap.api.Bootstrap, org.jboss.weld.integration.deployer.env.bda.DeploymentImpl] actual=[org.jboss.weld.bootstrap.WeldBootstrap, org.jboss.weld.integration.deployer.env.bda.DeploymentImpl]



          • 2. Re: WELD-001408 Unsatisfied dependencies for type
            guidbona.guidbona.yahoo.com

            Hi Steve. First of all, do not add weld, cdi-api, etc to the deployment if you are deploying to JBoss: this will cause problems, instead of solving them.


            You say that WorkerNameDAO is in the classpath, but is it in CDI module?
            If it is inside a jar in WEB-INF/lib, make sure that that jar is a CDI module, that is, that beans.xml is present in META-INF. This is a common mistake.