[weld-issues] [JBoss JIRA] (WELD-1145) Unsatisfied dependencies for generic type arrays

Marek Schmidt (JIRA) jira-events at lists.jboss.org
Mon Jun 11 08:32:05 EDT 2012


     [ https://issues.jboss.org/browse/WELD-1145?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Marek Schmidt updated WELD-1145:
--------------------------------

    Component/s: Bootstrap and Metamodel API

    
> Unsatisfied dependencies for generic type arrays
> ------------------------------------------------
>
>                 Key: WELD-1145
>                 URL: https://issues.jboss.org/browse/WELD-1145
>             Project: Weld
>          Issue Type: Bug
>          Components: Bootstrap and Metamodel API
>    Affects Versions: 1.1.8.Final
>         Environment: JBoss AS 7.1.2.Final
>            Reporter: Marek Schmidt
>            Assignee: Ales Justin
>
> The following set of beans fail to deploy with 
> {code}
> public class Bar<X>
> {
>    public Bar(X x) {
>       this.x = x;
>    }
>    
>    public X x;
> }
> {code}
> {code}
> public class BarsProducer
> {  
>    private static Bar<Integer>[] bars = new Bar[]{new Bar<Integer>(new Integer(1))};
>    
>    @Produces
>    public Bar<Integer>[] getBars() {
>       return bars;
>    }
> }
> {code}
> {code}
> public class Foo
> {
>    @Inject Bar<Integer>[] field;
> }
> {code}
> {noformat}
> 14:23:47,915 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-4) MSC000001: Failed to start service jboss.deployment.unit."jboss-as-helloworld.war".WeldService: org.jboss.msc.service.StartException in service jboss.deployment.unit."jboss-as-helloworld.war".WeldService: org.jboss.weld.exceptions.DeploymentException: WELD-001408 Unsatisfied dependencies for type [Bar[]] with qualifiers [@Default] at injection point [[field] @Inject org.jboss.as.quickstarts.helloworld.Foo.field]
>         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-redhat-1.jar:1.0.2.GA-redhat-1]
>         at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA-redhat-1.jar:1.0.2.GA-redhat-1]
>         at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [rt.jar:1.7.0]
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [rt.jar:1.7.0]
>         at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0]
> Caused by: org.jboss.weld.exceptions.DeploymentException: WELD-001408 Unsatisfied dependencies for type [Bar[]] with qualifiers [@Default] at injection point [[field] @Inject org.jboss.as.quickstarts.helloworld.Foo.field]
>         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:380)
>         at org.jboss.as.weld.WeldContainer.start(WeldContainer.java:83)
>         at org.jboss.as.weld.services.WeldService.start(WeldService.java:76)
>         ... 5 more
> {noformat}
> Also note that the src/test/java/org/jboss/weld/tests/arrays/ArrayInjectionTest.java will fail if @Inject is used to inject the arrays instead of the arquillian enrichment.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the weld-issues mailing list