0 Replies Latest reply on Feb 19, 2014 9:03 AM by maol

    org.jboss.weld.exceptions.DeploymentException: WELD-001408 Unsatisfied dependencies for type...

    maol Newbie

      Hi all,

      I'm trying to get a simple example (cut down from my real app) under JBoss AS 7.1.1.Final by inject my EJB bean to my JAX-RS service. Below follows the exception:


      Caused by: org.jboss.weld.exceptions.DeploymentException: WELD-001408 Unsatisfied dependencies for type [StatisticServiceRemote] with qualifiers [@Default] at injection point [[field] @Inject private com.ericpol.stat.web.services.rest.resources.StatResourceService.ejb3]
          at org.jboss.weld.bootstrap.Validator.validateInjectionPoint(Validator.java:275)
          at org.jboss.weld.bootstrap.Validator.validateInjectionPoint(Validator.java:244)
          at org.jboss.weld.bootstrap.Validator.validateBean(Validator.java:107)
          at org.jboss.weld.bootstrap.Validator.validateRIBean(Validator.java:127)
          at org.jboss.weld.bootstrap.Validator.validateBeans(Validator.java:346)
          at org.jboss.weld.bootstrap.Validator.validateDeployment(Validator.java:331)
          at org.jboss.weld.bootstrap.WeldBootstrap.validateBeans(WeldBootstrap.java:366)
          at org.jboss.as.weld.WeldContainer.start(WeldContainer.java:83)
          at org.jboss.as.weld.services.WeldService.start(WeldService.java:76)
          ... 5 more


      I have one .ear which contains two components:

           - .jar - Definition of EJB component:

                * META-INF/beans,xml

           - .war - Definition of JAX-RS component:

                * WEB-INF/beans.xml

                * WEB-INF/web.xml



      .jar component defines one EJB bean:

      @Remote(value = StatisticServiceRemote.class)
      public class StatisticServiceBean implements StatisticServiceRemote


      .war component defines JAX-RS resource:

      public class StatResourceService implements StatResourceRest
          private StatisticServiceRemote ejb3;
      public interface StatResourceRest


      The error "org.jboss.weld.exceptions.DeploymentException: WELD-001408 Unsatisfied dependencies for type..." occurs during deployment of ear application. I searched a lot of posts, but without success.

      What am I doing wrong?

      Is it possible to inject (by use CDI) EJB bean to JAX-RS bean contained in separated .jar and war files, but in the same .ear on Java EE 6?