Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve diagnostics when AnnotationAttributesReadingVisitor triggers an ArrayStoreException from Class.getAnnotations() [SPR-12387] #16995

spring-projects-issues opened this issue Oct 28, 2014 · 0 comments
in: core status: backported type: enhancement


Copy link

@spring-projects-issues spring-projects-issues commented Oct 28, 2014

Andy Wilkinson opened SPR-12387 and commented

Here's an example of the failure:

Caused by: java.lang.ArrayStoreException: sun.reflect.annotation.TypeNotPresentExceptionProxy
at sun.reflect.annotation.AnnotationParser.parseClassArray(
at sun.reflect.annotation.AnnotationParser.parseArray(
at sun.reflect.annotation.AnnotationParser.parseMemberValue(
at sun.reflect.annotation.AnnotationParser.parseAnnotation(
at sun.reflect.annotation.AnnotationParser.parseAnnotations2(
at sun.reflect.annotation.AnnotationParser.parseAnnotations(
at java.lang.Class.initAnnotationsIfNecessary(
at java.lang.Class.getAnnotations(
at org.springframework.core.type.classreading.AnnotationAttributesReadingVisitor.doVisitEnd(
at org.springframework.core.type.classreading.RecursiveAnnotationAttributesVisitor.visitEnd(

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:

  • #15074 java.lang.ArrayStoreException: sun.reflect.annotation.TypeNotPresentExceptionProxy exception when annotation config not found needs to specify what class is not found
  • #16930 AnnotationUtils provides poor diagnostics if getDeclaredAnnotations throws an exception
  • #17112 Useless exception message when annotations can't be parsed
  • #17173 Improve diagnostics when AnnotationJmxAttributeSource triggers an ArrayStoreException from Class.getAnnotation

Referenced from: commits 91940f2, b70c5d1

Backported to: 4.0.8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
in: core status: backported type: enhancement
None yet

No branches or pull requests

2 participants