J2EE Exception:WELD-001408 Unsatisfied dependencies for type [SelectModelFactory] with qualifiers [@

来源:互联网 发布:多普达t5399软件 编辑:程序博客网 时间:2024/05/20 23:08

Issue:

When you inject some resources using @Inject, you may encounter following exception after app deployed.

Exception:

Caused by: org.jboss.weld.exceptions.DeploymentException:WELD-001408 Unsatisfied dependencies for type [SelectModelFactory] with qualifiers [@Default]at injection point [[field] @Inject private net.spirent.xye.ui.pages.bird.CreateBird.selectModelFactory]
 at org.jboss.weld.bootstrap.Validator.validateInjectionPoint(Validator.java:275)
 at org.jboss.weld.bootstrap.Validator.validateInjectionPoint(Validator.java:244)
 at org.jboss.weld.bootstrap.Validator.validateBean(Validator.java:107)
 at org.jboss.weld.bootstrap.Validator.validateRIBean(Validator.java:127)
 at org.jboss.weld.bootstrap.Validator.validateBeans(Validator.java:346)
 at org.jboss.weld.bootstrap.Validator.validateDeployment(Validator.java:331)
 at org.jboss.weld.bootstrap.WeldBootstrap.validateBeans(WeldBootstrap.java:366)
 at org.jboss.as.weld.WeldContainer.start(WeldContainer.java:83)
 at org.jboss.as.weld.services.WeldService.start(WeldService.java:76)
 ... 5 more

 

Solution:

You can replace your @inject annotation with @Produces to workaroun this issue.

原创粉丝点击