Monday, February 9, 2015

WELD-001408 Unsatisfied dependencies ...

Problem

Can not deploy web application, web server raise error: WELD-001408: Unsatisfied dependencies for type SessionBean with qualifiers @Default ....

Cause

Lack of file beans.xml (I cannot why that file must exist for resolving issue). This is one of popular purposes to resolve.

Solution

Create file beans.xml and put it same location of web.xml

The content of beans.xml is:
<?xml version="1.0" encoding="UTF-8"?>
<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">
   
</beans>
That's all.

Reference

http://docs.jboss.org/weld/reference/latest/en-US/html/injection.html