Details
-
Bug
-
Resolution: Done
-
Major
-
2.0.0.CR4
-
None
-
None
Description
This line of code throws a ClassCastException:
The problem is that neither DeploymentException or DefinitionException can be cast to a WeldException.
FYI: I get this issue when I try to use the following Interceptor binding annotation:
@Inherited @InterceptorBinding @Retention(java.lang.annotation.RetentionPolicy.RUNTIME) @Target({ElementType.TYPE, ElementType.METHOD}) public @interface Transactional { TxType value() default TxType.REQUIRED; public enum TxType { REQUIRED, REQUIRES_NEW, MANDATORY, SUPPORTS, NOT_SUPPORTED, NEVER } Class[] rollbackOn() default {}; Class[] dontRollbackOn() default {}; }
It fails for the following reason (which I am pursuing independently to this jira issue).
org.jboss.weld.exceptions.DefinitionException: WELD-001101 Member of array type or annotation type must be annotated @NonBinding: [EnhancedAnnotatedMethodImpl] public abstract javax.transaction.Transactional.rollbackOn()
Attachments
Issue Links
- is duplicated by
-
WELD-1424 Array-valued member of an interceptor binding not annotated @Nonbinding results in ClassCastException
- Resolved