WELD-001408: Unsatisfied dependencies for type OrientDB with qualifiers @Default
hr.stoyanov Feb 17, 2014 2:16 PMHi I am trying to deploy two modules in Wildfly 8 Final. The first module, called server-1.0.war contains a singleton implementation class (called OrientDBImpl) along with tons of jars i do not want to include in my other modules :
===============================
@Singleton
public class OrientDBImpl implements OrientDB{
private OServer server;
@PostConstruct
private void postConstruct() throws Exception{
server = OServerMain.create();
try(InputStream i = Thread.currentThread().getContextClassLoader().getResourceAsStream("orientdb-server-config.xml");){
server.startup(i);
}
server.activate();
}
@PreDestroy
private void preDestroy(){
if(server!=null)
server.shutdown();
}
@Override
public void getDatabaseConnection(){
return ;//TODO
}
}
===============================
The second module, called web-client-1.0.war contain the interface OriendDB and is using CDI to obtain reference to the server singleton across from the first module like this:
==========================================
@WebServlet("/TestServlet")
public class TestServlet extends HttpServlet {
private static final long serialVersionUID = 1L;
@Inject OrientDB odb;
@Override
public void service(ServletRequest req, ServletResponse res){
return;
}
}
==========================================
I have also included in web-client-1.0.war this jboss-deployment-structure.xml:
<?xml version="1.0" encoding="UTF-8"?>
<jboss-deployment-structure>
<deployment>
<dependencies>
<module name="deployment.server-1.0.war" />
</dependencies>
</deployment>
</jboss-deployment-structure>
I still get the below error:
11:03:57,729 ERROR [org.jboss.as.server] (management-handler-thread - 27) JBAS015870: Deploy of deployment "web-client-1.0.war" was rolled back with the following failure message:
{"JBAS014671: Failed services" => {"jboss.deployment.unit.\"web-client-1.0.war\".WeldStartService" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"web-client-1.0.war\".WeldStartService: Failed to start service
Caused by: org.jboss.weld.exceptions.DeploymentException: WELD-001408: Unsatisfied dependencies for type OrientDB with qualifiers @Default
Any clue?