[GLASSFISH-20619] Integrate Weld 2.0.3.Final into trunk Created: 10/Jun/13  Updated: 14/Aug/13  Resolved: 12/Aug/13

Status: Closed
Project: glassfish
Component/s: cdi
Affects Version/s: future release
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: phil.zampino Assignee: phil.zampino
Resolution: Fixed Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Comment by buddypine [ 12/Jul/13 ]

Hopefully this can be bumped to a higher priority as the weld version shipped with 4.0 has a major bug which prevents injection into anonymous inner classes.
I came across this while developing an Apache Wicket project on Glassfish and the problems are best summed up by the latest Wicket release notes:

From Wicket 6.9.1 release notes

CDI injection issue

In the CDI releases of Weld 2.0.1 and prior, it was assumed that
injection in anonymous inner classes was not legal and when
attempted, it resulted in an exception:

Caused by: org.jboss.weld.exceptions.DefinitionException:
WELD-000070 Simple bean [EnhancedAnnotatedTypeImpl] private class
com.example.HomePage$AForm cannot be a non-static inner class

This was reported as
https://issues.apache.org/jira/browse/WICKET-5226, as it became an
issue in Glassfish 4, which ships with Weld 2.0.1 (or earlier). We
implemented a fix for this particular issue by not injecting into
anonymous inner classes.

Unfortunately this was not a bug that needed fixing on our part, but
rather in the Weld framework (see

Therefore we reverted the commits done for WICKET-5226 and hope that
Glassfish will upgrade their Weld implementation soon. For the whole
story read

Comment by phil.zampino [ 12/Aug/13 ]

Committed rev. 62497

Generated at Wed Mar 29 05:00:28 UTC 2017 using JIRA 6.2.3#6260-sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.