java.lang.ArrayStoreException: sun.reflect.annotation.TypeNotPresentExceptionProxy

GitHub | johnpoth | 2 years ago
tip
Do you find the tips below useful? Click on the to mark them and say thanks to rafael . Or join the community to write better ones.
  1. 0

    GitHub comment 48#88113879

    GitHub | 2 years ago | johnpoth
    java.lang.ArrayStoreException: sun.reflect.annotation.TypeNotPresentExceptionProxy
  2. 0
    samebug tip
    This might be a conflict between different annotation methods. Try not using more than one to avoid conflicts.
    via GitHub by jvalkeal
  3. 0

    It happened for me when I used Spring Configuration annotation like this: {code} @Configuration @Import({ Config.class }) public class WebConfig extends WebMvcConfigurerAdapter { ... } {code} When I renamed Config.class to CoreConfig.class the error occurred when starting jetty. this happened because the CoreConfig.class was in a different sub module of my maven project, so jetty couldn't see it (as it resolves dependencies through mvn local repository). After calling 'mvn install' everything was fine again. This is a packaging problem on user's part. Some class is not on the classpath. as described in http://stackoverflow.com/questions/11823288/java-lang-arraystoreexception-sun-reflect-annotation-typenotpresentexceptionpro However the exception stacktrace does not mention what class cannot be found by Spring. So locating the culprit in a large project is very difficult and time consuming. Spring should pinpoint the affected class, who loads that class, so app developer can fix it. {noformat} Exception in thread "main" 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.annotation.AnnotatedElementUtils.doProcess(AnnotatedElementUtils.java:159) at org.springframework.core.annotation.AnnotatedElementUtils.process(AnnotatedElementUtils.java:152) at org.springframework.core.annotation.AnnotatedElementUtils.isAnnotated(AnnotatedElementUtils.java:72) at org.springframework.core.type.StandardAnnotationMetadata.isAnnotated(StandardAnnotationMetadata.java:102) at org.springframework.context.annotation.ConditionEvaluator.shouldSkip(ConditionEvaluator.java:72) at org.springframework.context.annotation.ConditionEvaluator.shouldSkip(ConditionEvaluator.java:62) at org.springframework.context.annotation.AnnotatedBeanDefinitionReader.registerBean(AnnotatedBeanDefinitionReader.java:140) at org.springframework.context.annotation.AnnotatedBeanDefinitionReader.registerBean(AnnotatedBeanDefinitionReader.java:127) at org.springframework.context.annotation.AnnotatedBeanDefinitionReader.register(AnnotatedBeanDefinitionReader.java:122) at org.springframework.context.annotation.AnnotationConfigApplicationContext.register(AnnotationConfigApplicationContext.java:151) at org.springframework.context.annotation.AnnotationConfigApplicationContext.<init>(AnnotationConfigApplicationContext.java:83) at org.springframework.issues.SampleApp.main(SampleApp.java:12) {noformat}

    Spring JIRA | 4 years ago | Hendy Irawan
    java.lang.ArrayStoreException: sun.reflect.annotation.TypeNotPresentExceptionProxy
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Using Spring Boot without the parent POM doesn't work

    xluat.com | 1 year ago
    java.lang.IllegalStateException: Failed to introspect annotations: class com.imetrik.oaas.tool.application.springboottest.SampleController.SampleController
  6. 0

    Cannot deploy simple project on Glassfish 3.1.2 and 4.0.0+

    GitHub | 3 years ago | vemod
    java.lang.ArrayStoreException: sun.reflect.annotation.TypeNotPresentExceptionProxy
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.lang.ArrayStoreException

    sun.reflect.annotation.TypeNotPresentExceptionProxy

    at sun.reflect.annotation.AnnotationParser.parseClassArray()
  2. Java RT
    Class.getAnnotations
    1. sun.reflect.annotation.AnnotationParser.parseClassArray(AnnotationParser.java:673)
    2. sun.reflect.annotation.AnnotationParser.parseArray(AnnotationParser.java:480)
    3. sun.reflect.annotation.AnnotationParser.parseMemberValue(AnnotationParser.java:306)
    4. sun.reflect.annotation.AnnotationParser.parseAnnotation(AnnotationParser.java:241)
    5. sun.reflect.annotation.AnnotationParser.parseAnnotations2(AnnotationParser.java:88)
    6. sun.reflect.annotation.AnnotationParser.parseAnnotations(AnnotationParser.java:70)
    7. java.lang.Class.initAnnotationsIfNecessary(Class.java:3178)
    8. java.lang.Class.getAnnotations(Class.java:3158)
    8 frames
  3. JUnit
    JUnitCore.run
    1. org.junit.runner.Description.createSuiteDescription(Description.java:123)
    2. org.junit.internal.runners.ErrorReportingRunner.getDescription(ErrorReportingRunner.java:25)
    3. org.junit.runner.JUnitCore.run(JUnitCore.java:159)
    4. org.junit.runner.JUnitCore.run(JUnitCore.java:138)
    4 frames
  4. Arquillian TestRunner JUnit Container
    JUnitTestRunner.execute
    1. org.jboss.arquillian.junit.container.JUnitTestRunner.execute(JUnitTestRunner.java:66)
    1 frame
  5. Arquillian Protocol JMX
    JMXTestRunner.runTestMethod
    1. org.jboss.arquillian.protocol.jmx.JMXTestRunner.runTestMethodInternal(JMXTestRunner.java:135)
    2. org.jboss.arquillian.protocol.jmx.JMXTestRunner.runTestMethod(JMXTestRunner.java:114)
    2 frames
  6. murex.connectivity.arquillian
    ManagementExtension$ContextClassLoaderJMXTestRunner.runTestMethod
    1. murex.connectivity.arquillian.core.protocol.jmx.ManagementExtension$ContextClassLoaderJMXTestRunner.runTestMethod(ManagementExtension.java:123)
    1 frame
  7. Java RT
    Thread.run
    1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    4. java.lang.reflect.Method.invoke(Method.java:606)
    5. sun.reflect.misc.Trampoline.invoke(MethodUtil.java:75)
    6. sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
    7. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    8. java.lang.reflect.Method.invoke(Method.java:606)
    9. sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:279)
    10. com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:112)
    11. com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:46)
    12. com.sun.jmx.mbeanserver.MBeanIntrospector.invokeM(MBeanIntrospector.java:237)
    13. com.sun.jmx.mbeanserver.PerInterface.invoke(PerInterface.java:138)
    14. com.sun.jmx.mbeanserver.MBeanSupport.invoke(MBeanSupport.java:252)
    15. com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)
    16. com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)
    17. javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1487)
    18. javax.management.remote.rmi.RMIConnectionImpl.access$300(RMIConnectionImpl.java:97)
    19. javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1328)
    20. javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1420)
    21. javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:848)
    22. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    23. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    24. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    25. java.lang.reflect.Method.invoke(Method.java:606)
    26. sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:322)
    27. sun.rmi.transport.Transport$1.run(Transport.java:177)
    28. sun.rmi.transport.Transport$1.run(Transport.java:174)
    29. java.security.AccessController.doPrivileged(Native Method)
    30. sun.rmi.transport.Transport.serviceCall(Transport.java:173)
    31. sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:556)
    32. sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:811)
    33. sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:670)
    34. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    35. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    36. java.lang.Thread.run(Thread.java:744)
    36 frames