Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Duplicate
-
6.7.0, 6.8.0
-
None
-
None
-
OSX 10.8, Glassfish 4.0, Java 7
Description
Wicket-cdi is violating the CDI spec by injecting every component. The spec is clear about this and non-static inner classes may not managed or injected.
Weld error is: WELD-000070 Simple bean [EnhancedAnnotatedTypeImpl] class nl.frozn.liuk.web.wizard.component.employment.EmploymentPanel$1 cannot be a non-static inner class
I made a workaround for ourself by using own INonContextualManager and check if the object that will be injected has no enclosing class.
My workaround is.
if (instance.getClass().getEnclosingClass() == null) {
NonContextual.of(instance.getClass(), beanManager).inject(instance);
}
Attachments
Issue Links
- duplicates
-
WICKET-5226 CDI integration fails in Glassfish 4.0 with WELD-000070
- Resolved