[ 
https://issues.apache.org/jira/browse/OWB-497?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12934790#action_12934790
 ] 

Mark Struberg commented on OWB-497:
-----------------------------------

What about NoClassDefFoundErrors? 
Guess we get this pretty frequently with the standard way of handling 
'optional' functionality: checking for existence with class.forName and then 
invoking a helper class which invokes the classes directly. At the time we 
parse this helper class, we should end up with this exception.

> 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.1.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.
-
You can reply to this email to add a comment to the issue online.

Reply via email to