Uploaded image for project: 'Spring Framework'
  1. Spring Framework
  2. SPR-12387

Improve diagnostics when AnnotationAttributesReadingVisitor triggers an ArrayStoreException from Class.getAnnotations()

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Complete
    • Affects Version/s: 4.0.7, 4.1.1
    • Fix Version/s: 4.0.8, 4.1.2
    • Component/s: Core
    • Labels:
      None
    • Last commented by a User:
      true

      Description

      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

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              juergen.hoeller Juergen Hoeller
              Reporter:
              awilkinson Andy Wilkinson
              Last updater:
              Spring Issues Spring Issues
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Days since last comment:
                3 years, 31 weeks, 2 days ago