[weld-issues] [JBoss JIRA] Commented: (WELDSE-24) RunnableDecorator incorrectly assumes >0 Runnable beans

Morten Christensen (JIRA) jira-events at lists.jboss.org
Tue May 11 11:38:27 EDT 2010


    [ https://jira.jboss.org/jira/browse/WELDSE-24?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12530173#action_12530173 ] 

Morten Christensen commented on WELDSE-24:
------------------------------------------

I did not have the decorator enabled in my beans.xml and I do use RunnableDecorator at all  but I am using a lot of 3rd party jars and one of them  might do something that causes this (see the recently logged bug about performance that I created - it lists the jars I use under java SE and it is mostly the same I use under java EE). Note also, that this bug only happens under glassfish in a WAR - it does not happen when I use Weld in a Java SE app.

So I am sorry, I have no more idea then you why this happen but I am sure that you DO need to use Instance<Runnable> because even if you have the decorator enabled in beans.xml you should be able to handle the case where there are 0 Runnables.

> RunnableDecorator incorrectly assumes >0 Runnable beans
> -------------------------------------------------------
>
>                 Key: WELDSE-24
>                 URL: https://jira.jboss.org/jira/browse/WELDSE-24
>             Project: Weld support for Java SE
>          Issue Type: Bug
>    Affects Versions: 1.0.1.Final
>         Environment: Java 6 + WeldSE
>            Reporter: Morten Christensen
>         Attachments: TestRunnableDecorator.zip
>
>
> The class org.jboss.weld.environment.se.threading.RunnableDecorator incorrectly assumes that there will be at least one bean that implements Runnable.
> If there are no beans that implements Runnable then an error like this will happen:
> org.jboss.weld.DeploymentException: Injection point has unstatisfied dependencies. Injection point: field org.jboss.weld.environment.se.threading.RunnableDecorator.runnable; Qualifiers: [@javax.enterprise.inject.Default()]
> 	at org.jboss.weld.Validator.validateInjectionPoint(Validator.java:232)
> 	at org.jboss.weld.Validator.validateBean(Validator.java:80)
> 	at org.jboss.weld.Validator.validateRIBean(Validator.java:100)
> 	at org.jboss.weld.Validator.validateBeans(Validator.java:282)
> 	at org.jboss.weld.Validator.validateDeployment(Validator.java:267)
> 	at org.jboss.weld.bootstrap.WeldBootstrap.validateBeans(WeldBootstrap.java:389)
> 	at org.jboss.weld.environment.se.Weld.initialize(Weld.java:81)
> 	at org.jboss.weld.environment.se.StartMain.go(StartMain.java:45)
> 	at org.jboss.weld.environment.se.StartMain.main(StartMain.java:57)
> I guess the field "runnable" inside this class should be changed to use Instance<Runnable> instead.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the weld-issues mailing list