I'm working on an application using EJB3, JPA and JSF and I'd like to inject my DAO into the EJB using CDI :
Here's my DAO's code :
public class ZoneDao {
@PersistenceContext(unitName = "wabApp3PU")
private EntityManager em;
/* Functions */
}
and here's my EJB code :
@Stateless
public class ZoneFacade{
@Inject
private ZoneDao zoneDao;
/* Functions*/
}
Here's the error I get :
org.jboss.weld.exceptions.DeploymentException: WELD-001408 Unsatisfied dependencies for type [ZoneDao] with qualifiers [@Default] at injection point [[BackedAnnotatedField] @Inject private fr.si.metier.ZoneFacade.zoneDao]
NB: I'm using the glassfish 4 application server