WildFly 8.2 WELD-001408 Unsatisfied Dependencies error

If you see an error like this:

WELD-001408: Unsatisfied dependencies for type [typename] with qualifiers @Default
at injection point [BackedAnnotatedField] @Inject [propertyname]

… then you’re probably missing a default beans.xml file to initialize CDI in the container. The file doesn’t need to contain anything else than this:

<?xml version="1.0"?>
<beans xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://jboss.org/schema/cdi/beans_1_0.xsd" />

and drop it in /META-INF/ or /WEB-INF/

More info here and here.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.