I got a stupid problem when deploying my Java Application on JBoss. Before I changed my source code using an interface class everything was fine. So here is my problem:
public interface FWInterface {
public FWResult process(FWRequest fwRequest, FWResult fwResult,
Integer commitRows) throws Exception;
}
...
@Stateless
public class FWHandlerSqrMind extends FWHandlerDefault implements FWInterface {
public FWResult process(FWRequest fwRequest, FWResult fwResult, Integer commitRows)
throws Exception {
... some JavaCode here
}
}
This ends up with the following Error at deployment on JBoss 7.1:
10:05:34,838 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-6) MSC00001: Failed to start service jboss.deployment.unit."mdk-exchange-1.1.0.war".WeldService: org.jboss.msc.service.StartException in service jboss.deployment.unit."mdk-exchange-1.1.0.war".WeldService: org.jboss.weld.exceptions.DeploymentException: WELD-001408 Unsatisfied dependencies for type [FWHandlerAufTracking] with qualifiers [@Default] at injection point [[field] @Inject de.mdkbw.exchange.filewatcher.FWMain.fwhAufTracking] at org.jboss.as.weld.services.WeldService.start(WeldService.java:83) at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA] at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA] at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [rt.jar:1.7.0_15] at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [rt.jar:1.7.0_15] at java.lang.Thread.run(Unknown Source) [rt.jar:1.7.0_15] Caused by: org.jboss.weld.exceptions.DeploymentException: WELD-001408 Unsatisfied dependencies for type [FWHandlerAufTracking] with qualifiers [@Default] at injection point [[field] @Inject de.mdkbw.exchange.filewatcher.FWMain.fwhAufTracking] 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.WeldContainer.start(WeldContainer.java:83) at org.jboss.as.weld.services.WeldService.start(WeldService.java:76)
If I remove the implementation everything is ok. Could anybody tell me what the problem is? Am I too stupid?? Thanks in advance!
How do you inject your bean? Like that?
@Inject
private FWHandlerSqrMind handler;
If so could you try to inject it like that:
@Inject
private FWInterface handler;