Issue Type: Bug Bug
Affects Versions: 2.0.0.CR4
Assignee: Jozef Hartinger
Created: 02/May/13 9:47 AM
Description:

This line of code throws a ClassCastException:

https://github.com/weld/core/blob/2.0/impl/src/main/java/org/jboss/weld/metadata/cache/MetaAnnotationStore.java#L200

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()
Project: Weld
Priority: Major Major
Reporter: Paul Robinson
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira