Unsatisfied dependencies for type [PartitionManager] ?
sdnakhla Sep 22, 2013 9:21 PMI'm trying to create a simple enterprise application that makes use of PicketLink JPA IDM for user management. My structure is as follows:
Application EAR
-- Web app (WAR)
-- EJB (JAR)
The PicketLink libraries are available as modules on JBoss EAP 6.1.
I'm trying to simply @Inject the PartitionManager, but keep receiving errors. I've tried injecting it into EJBs and POJOs, both with the same results. In my WAR, I've got a simple action class that looks like this:
@Named
public class TestAction {
@Inject
private PartitionManager partitionManager = null;
public void runTest() {
if (partitionManager == null) {
System.err.println("NULL");
} else {
System.out.println("NOT NULL");
}
}
}
However, when I try to deploy this class I get the following error:
[0m[31m21:15:47,527 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-1) MSC000001: Failed to start service jboss.deployment.unit."MyTest.ear".WeldStartService: org.jboss.msc.service.StartException in service jboss.deployment.unit."MyTest.ear".WeldStartService: Failed to start service
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1767) [jboss-msc-1.0.4.GA-redhat-1.jar:1.0.4.GA-redhat-1]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [rt.jar:1.7.0_07]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [rt.jar:1.7.0_07]
at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_07]
Caused by: org.jboss.weld.exceptions.DeploymentException: WELD-001408 Unsatisfied dependencies for type [PartitionManager] with qualifiers [@Default] at injection point [[field] @Inject private net.test.web.servlets.TestAction.partitionManager]
at org.jboss.weld.bootstrap.Validator.validateInjectionPoint(Validator.java:311)
at org.jboss.weld.bootstrap.Validator.validateInjectionPoint(Validator.java:280)
at org.jboss.weld.bootstrap.Validator.validateBean(Validator.java:143)
at org.jboss.weld.bootstrap.Validator.validateRIBean(Validator.java:163)
at org.jboss.weld.bootstrap.Validator.validateBeans(Validator.java:382)
at org.jboss.weld.bootstrap.Validator.validateDeployment(Validator.java:367)
at org.jboss.weld.bootstrap.WeldBootstrap.validateBeans(WeldBootstrap.java:379)
at org.jboss.as.weld.WeldStartService.start(WeldStartService.java:64)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.4.GA-redhat-1.jar:1.0.4.GA-redhat-1]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.4.GA-redhat-1.jar:1.0.4.GA-redhat-1]
... 3 more
I've tried @Injecting both the PartitionManager and the IdentityManager, both leading to the same results. Can anyone explain why this error is occurring? Is there something else I need to do to create the PartitionManager or IdentityManager?