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 AnnotationJmxAttributeSource triggers an ArrayStoreException from Class.getAnnotation [SPR-12572] #17173

Closed
spring-projects-issues opened this issue Dec 28, 2014 · 0 comments
Assignees
Labels
in: core Issues in core modules (aop, beans, core, context, expression) status: backported An issue that has been backported to maintenance branches type: enhancement A general enhancement
Milestone

Comments

@spring-projects-issues
Copy link
Collaborator

spring-projects-issues commented Dec 28, 2014

Andy Wilkinson opened SPR-12572 and commented

As with other issues like this, it'd be useful to know the name of the class that's being introspected when the failure occurs. Here's an example stacktrace for the failure:

Caused by: java.lang.ArrayStoreException: sun.reflect.annotation.TypeNotPresentExceptionProxy
    at sun.reflect.annotation.AnnotationParser.parseClassArray(AnnotationParser.java:724)
    at sun.reflect.annotation.AnnotationParser.parseArray(AnnotationParser.java:531)
    at sun.reflect.annotation.AnnotationParser.parseMemberValue(AnnotationParser.java:355)
    at sun.reflect.annotation.AnnotationParser.parseAnnotation2(AnnotationParser.java:286)
    at sun.reflect.annotation.AnnotationParser.parseAnnotations2(AnnotationParser.java:120)
    at sun.reflect.annotation.AnnotationParser.parseAnnotations(AnnotationParser.java:72)
    at java.lang.Class.createAnnotationData(Class.java:3513)
    at java.lang.Class.annotationData(Class.java:3502)
    at java.lang.Class.getAnnotation(Class.java:3407)
    at org.springframework.jmx.export.annotation.AnnotationJmxAttributeSource.getManagedResource(AnnotationJmxAttributeSource.java:73)
    at org.springframework.jmx.export.assembler.MetadataMBeanInfoAssembler.includeBean(MetadataMBeanInfoAssembler.java:121)
    at org.springframework.jmx.export.MBeanExporter$1.include(MBeanExporter.java:856)
    at org.springframework.jmx.export.MBeanExporter.autodetect(MBeanExporter.java:891)
    at org.springframework.jmx.export.MBeanExporter.autodetectBeans(MBeanExporter.java:853)
    at org.springframework.jmx.export.MBeanExporter.registerBeans(MBeanExporter.java:532)
    at org.springframework.jmx.export.MBeanExporter.afterSingletonsInstantiated(MBeanExporter.java:420)

Affects: 4.0.8, 4.1.3

Reference URL: spring-projects/spring-boot#2196

Issue Links:

Backported to: 4.0.9

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: core Issues in core modules (aop, beans, core, context, expression) status: backported An issue that has been backported to maintenance branches type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

2 participants