You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openwebbeans.apache.org by "Mark Struberg (JIRA)" <ji...@apache.org> on 2011/03/21 21:32:05 UTC

[jira] [Updated] (OWB-497) Don't break deployment if java can't read all the annotations

     [ https://issues.apache.org/jira/browse/OWB-497?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mark Struberg updated OWB-497:
------------------------------

    Fix Version/s:     (was: 1.1.0)
                   1.2.0

moved to target 1.2.0

> Don't break deployment if java can't read all the annotations
> -------------------------------------------------------------
>
>                 Key: OWB-497
>                 URL: https://issues.apache.org/jira/browse/OWB-497
>             Project: OpenWebBeans
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.1.0
>            Reporter: David Jencks
>            Assignee: Gurkan Erdogdu
>             Fix For: 1.2.0
>
>
> Running the jsr303 tck with OWB installed in geronimo we run into a bunch of exceptions that I think must be a jdk bug: calling a method that causes the annotations on a class to be initialized (clazz.getAnnotations() for instance) throws and exception
> Caused by: java.lang.ArrayStoreException: sun.reflect.annotation.TypeNotPresentExceptionProxy
> 	at sun.reflect.annotation.AnnotationParser.parseClassArray(AnnotationParser.java:653)
> 	at sun.reflect.annotation.AnnotationParser.parseArray(AnnotationParser.java:460)
> 	at sun.reflect.annotation.AnnotationParser.parseMemberValue(AnnotationParser.java:286)
> 	at sun.reflect.annotation.AnnotationParser.parseAnnotation(AnnotationParser.java:222)
> 	at sun.reflect.annotation.AnnotationParser.parseAnnotations2(AnnotationParser.java:69)
> 	at sun.reflect.annotation.AnnotationParser.parseAnnotations(AnnotationParser.java:52)
> 	at java.lang.Class.initAnnotationsIfNecessary(Class.java:3070)
> 	at java.lang.Class.getAnnotation(Class.java:3029)
> 	at org.apache.webbeans.util.AnnotationUtil.hasClassAnnotation(AnnotationUtil.java:865)
> 	at org.apache.webbeans.config.BeansDeployer.checkSpecializations(BeansDeployer.java:620)
> Googling this is supposedly caused by an annotation (whose class is loadable) having a value whose class is missing.  In my particular case I can't verify this as the cause.
> In any case, OWB seems to have a policy that if a class can't have its annotations read (e.g. ClassNotFoundException or NoClassDefFoundError) we ignore it.  I think this policy should be extended to when this exception occurs.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira