Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: future release
    • Fix Version/s: None
    • Component/s: cdi
    • Labels:
      None

      Activity

      Hide
      buddypine added a comment -

      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
      https://issues.jboss.org/browse/WELD-1441)

      Therefore we reverted the commits done for WICKET-5226 and hope that
      Glassfish will upgrade their Weld implementation soon. For the whole
      story read
      https://issues.apache.org/jira/browse/WICKET-5264

      Show
      buddypine added a comment - 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 https://issues.jboss.org/browse/WELD-1441 ) Therefore we reverted the commits done for WICKET-5226 and hope that Glassfish will upgrade their Weld implementation soon. For the whole story read https://issues.apache.org/jira/browse/WICKET-5264
      Hide
      phil.zampino added a comment -

      Committed rev. 62497

      Show
      phil.zampino added a comment - Committed rev. 62497

        People

        • Assignee:
          phil.zampino
          Reporter:
          phil.zampino
        • Votes:
          1 Vote for this issue
          Watchers:
          1 Start watching this issue

          Dates

          • Created:
            Updated:
            Resolved: