Description
Andy Wilkinson opened SPR-12387 and commented
Here's an example of the failure:
code
Caused by: java.lang.ArrayStoreException: sun.reflect.annotation.TypeNotPresentExceptionProxy
at sun.reflect.annotation.AnnotationParser.parseClassArray(AnnotationParser.java:673)
at sun.reflect.annotation.AnnotationParser.parseArray(AnnotationParser.java:480)
at sun.reflect.annotation.AnnotationParser.parseMemberValue(AnnotationParser.java:306)
at sun.reflect.annotation.AnnotationParser.parseAnnotation(AnnotationParser.java:241)
at sun.reflect.annotation.AnnotationParser.parseAnnotations2(AnnotationParser.java:88)
at sun.reflect.annotation.AnnotationParser.parseAnnotations(AnnotationParser.java:70)
at java.lang.Class.initAnnotationsIfNecessary(Class.java:3178)
at java.lang.Class.getAnnotations(Class.java:3158)
at org.springframework.core.type.classreading.AnnotationAttributesReadingVisitor.doVisitEnd(AnnotationAttributesReadingVisitor.java:269)
at org.springframework.core.type.classreading.RecursiveAnnotationAttributesVisitor.visitEnd(AnnotationAttributesReadingVisitor.java:182)
code
As with similar issues, it'd be great to know which class was being introspected when the failure occurred
Affects: 4.0.7, 4.1.1
Issue Links:
- java.lang.ArrayStoreException: sun.reflect.annotation.TypeNotPresentExceptionProxy exception when annotation config not found needs to specify what class is not found [SPR-10441] #15074 java.lang.ArrayStoreException: sun.reflect.annotation.TypeNotPresentExceptionProxy exception when annotation config not found needs to specify what class is not found
- AnnotationUtils provides poor diagnostics if getDeclaredAnnotations throws an exception [SPR-12325] #16930 AnnotationUtils provides poor diagnostics if getDeclaredAnnotations throws an exception
- Useless exception message when annotations can't be parsed [SPR-12507] #17112 Useless exception message when annotations can't be parsed
- Improve diagnostics when AnnotationJmxAttributeSource triggers an ArrayStoreException from Class.getAnnotation [SPR-12572] #17173 Improve diagnostics when AnnotationJmxAttributeSource triggers an ArrayStoreException from Class.getAnnotation
Referenced from: commits 91940f2, b70c5d1
Backported to: 4.0.8