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

Java.net JIRA | philwebb | 2 years ago
  1. 0

    When trying to deploy a Spring Boot application to GlassFish 4.1 the following error occurs: {noformat} [2014-12-06T23:18:14.803-0800] [glassfish 4.1] [SEVERE] [NCLS-CORE-00026] [javax.enterprise.system.core] [tid: _ThreadID=59 _ThreadName=AutoDeployer] [timeMillis: 1417936694803] [levelValue: 1000] [[ Exception during lifecycle processing 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.glassfish.apf.impl.AnnotationProcessorImpl.processAnnotations(AnnotationProcessorImpl.java:285) at org.glassfish.apf.impl.AnnotationProcessorImpl.process(AnnotationProcessorImpl.java:195) at org.glassfish.apf.impl.AnnotationProcessorImpl.process(AnnotationProcessorImpl.java:134) at com.sun.enterprise.deployment.archivist.Archivist.processAnnotations(Archivist.java:626) at com.sun.enterprise.deployment.archivist.Archivist.readAnnotations(Archivist.java:462) at com.sun.enterprise.deployment.archivist.Archivist.readAnnotations(Archivist.java:446) at org.glassfish.web.deployment.archivist.WebArchivist.postAnnotationProcess(WebArchivist.java:338) at org.glassfish.web.deployment.archivist.WebArchivist.postAnnotationProcess(WebArchivist.java:91) at com.sun.enterprise.deployment.archivist.Archivist.readRestDeploymentDescriptors(Archivist.java:420) at com.sun.enterprise.deployment.archivist.Archivist.readDeploymentDescriptors(Archivist.java:396) at com.sun.enterprise.deployment.archivist.Archivist.open(Archivist.java:271) at com.sun.enterprise.deployment.archivist.Archivist.open(Archivist.java:280) at com.sun.enterprise.deployment.archivist.Archivist.open(Archivist.java:241) at com.sun.enterprise.deployment.archivist.ApplicationFactory.openArchive(ApplicationFactory.java:161) at org.glassfish.javaee.core.deployment.DolProvider.processDOL(DolProvider.java:203) at org.glassfish.javaee.core.deployment.DolProvider.load(DolProvider.java:227) at org.glassfish.javaee.core.deployment.DolProvider.load(DolProvider.java:96) at com.sun.enterprise.v3.server.ApplicationLifecycle.loadDeployer(ApplicationLifecycle.java:881) at com.sun.enterprise.v3.server.ApplicationLifecycle.setupContainerInfos(ApplicationLifecycle.java:821) at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:377) at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:219) at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:491) at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:539) at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:535) at java.security.AccessController.doPrivileged(Native Method) at javax.security.auth.Subject.doAs(Subject.java:356) at com.sun.enterprise.v3.admin.CommandRunnerImpl$2.execute(CommandRunnerImpl.java:534) at com.sun.enterprise.v3.admin.CommandRunnerImpl$3.run(CommandRunnerImpl.java:565) at com.sun.enterprise.v3.admin.CommandRunnerImpl$3.run(CommandRunnerImpl.java:557) at java.security.AccessController.doPrivileged(Native Method) at javax.security.auth.Subject.doAs(Subject.java:356) at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:556) at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1464) at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1300(CommandRunnerImpl.java:109) at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1846) at org.glassfish.deployment.autodeploy.AutoOperation.run(AutoOperation.java:164) at org.glassfish.deployment.autodeploy.AutoDeployer.deploy(AutoDeployer.java:597) at org.glassfish.deployment.autodeploy.AutoDeployer.deployAll(AutoDeployer.java:484) at org.glassfish.deployment.autodeploy.AutoDeployer.run(AutoDeployer.java:412) at org.glassfish.deployment.autodeploy.AutoDeployer.run(AutoDeployer.java:403) at org.glassfish.deployment.autodeploy.AutoDeployService$1.run(AutoDeployService.java:233) at java.util.TimerThread.mainLoop(Timer.java:555) at java.util.TimerThread.run(Timer.java:505) {noformat} I believe that this is because GlassFish is reading a class that has an annotation that refers to another class not available at deployment time. There are many such classes with Spring Boot due to the way that auto-configuration works (e.g. {{@ConditionalOnClass\(\[SomeClass.class\]\)}} where {{SomeClass}} may not be on the classpath). I'm unsure why GlassFish is attempting to read the annotation and why it doesn't silently ignore such errors. You can find an example deployment test application [here|https://github.com/philwebb/spring-boot/tree/glassfish/spring-boot-deployment-tests/spring-boot-deployment-test-glassfish]. Equivalent tests for TomEE and WildFly deploy fine.

    Java.net JIRA | 2 years ago | philwebb
    java.lang.ArrayStoreException: sun.reflect.annotation.TypeNotPresentExceptionProxy
  2. 0

    When trying to deploy a Spring Boot application to GlassFish 4.1 the following error occurs: {noformat} [2014-12-06T23:18:14.803-0800] [glassfish 4.1] [SEVERE] [NCLS-CORE-00026] [javax.enterprise.system.core] [tid: _ThreadID=59 _ThreadName=AutoDeployer] [timeMillis: 1417936694803] [levelValue: 1000] [[ Exception during lifecycle processing 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.glassfish.apf.impl.AnnotationProcessorImpl.processAnnotations(AnnotationProcessorImpl.java:285) at org.glassfish.apf.impl.AnnotationProcessorImpl.process(AnnotationProcessorImpl.java:195) at org.glassfish.apf.impl.AnnotationProcessorImpl.process(AnnotationProcessorImpl.java:134) at com.sun.enterprise.deployment.archivist.Archivist.processAnnotations(Archivist.java:626) at com.sun.enterprise.deployment.archivist.Archivist.readAnnotations(Archivist.java:462) at com.sun.enterprise.deployment.archivist.Archivist.readAnnotations(Archivist.java:446) at org.glassfish.web.deployment.archivist.WebArchivist.postAnnotationProcess(WebArchivist.java:338) at org.glassfish.web.deployment.archivist.WebArchivist.postAnnotationProcess(WebArchivist.java:91) at com.sun.enterprise.deployment.archivist.Archivist.readRestDeploymentDescriptors(Archivist.java:420) at com.sun.enterprise.deployment.archivist.Archivist.readDeploymentDescriptors(Archivist.java:396) at com.sun.enterprise.deployment.archivist.Archivist.open(Archivist.java:271) at com.sun.enterprise.deployment.archivist.Archivist.open(Archivist.java:280) at com.sun.enterprise.deployment.archivist.Archivist.open(Archivist.java:241) at com.sun.enterprise.deployment.archivist.ApplicationFactory.openArchive(ApplicationFactory.java:161) at org.glassfish.javaee.core.deployment.DolProvider.processDOL(DolProvider.java:203) at org.glassfish.javaee.core.deployment.DolProvider.load(DolProvider.java:227) at org.glassfish.javaee.core.deployment.DolProvider.load(DolProvider.java:96) at com.sun.enterprise.v3.server.ApplicationLifecycle.loadDeployer(ApplicationLifecycle.java:881) at com.sun.enterprise.v3.server.ApplicationLifecycle.setupContainerInfos(ApplicationLifecycle.java:821) at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:377) at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:219) at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:491) at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:539) at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:535) at java.security.AccessController.doPrivileged(Native Method) at javax.security.auth.Subject.doAs(Subject.java:356) at com.sun.enterprise.v3.admin.CommandRunnerImpl$2.execute(CommandRunnerImpl.java:534) at com.sun.enterprise.v3.admin.CommandRunnerImpl$3.run(CommandRunnerImpl.java:565) at com.sun.enterprise.v3.admin.CommandRunnerImpl$3.run(CommandRunnerImpl.java:557) at java.security.AccessController.doPrivileged(Native Method) at javax.security.auth.Subject.doAs(Subject.java:356) at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:556) at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1464) at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1300(CommandRunnerImpl.java:109) at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1846) at org.glassfish.deployment.autodeploy.AutoOperation.run(AutoOperation.java:164) at org.glassfish.deployment.autodeploy.AutoDeployer.deploy(AutoDeployer.java:597) at org.glassfish.deployment.autodeploy.AutoDeployer.deployAll(AutoDeployer.java:484) at org.glassfish.deployment.autodeploy.AutoDeployer.run(AutoDeployer.java:412) at org.glassfish.deployment.autodeploy.AutoDeployer.run(AutoDeployer.java:403) at org.glassfish.deployment.autodeploy.AutoDeployService$1.run(AutoDeployService.java:233) at java.util.TimerThread.mainLoop(Timer.java:555) at java.util.TimerThread.run(Timer.java:505) {noformat} I believe that this is because GlassFish is reading a class that has an annotation that refers to another class not available at deployment time. There are many such classes with Spring Boot due to the way that auto-configuration works (e.g. {{@ConditionalOnClass\(\[SomeClass.class\]\)}} where {{SomeClass}} may not be on the classpath). I'm unsure why GlassFish is attempting to read the annotation and why it doesn't silently ignore such errors. You can find an example deployment test application [here|https://github.com/philwebb/spring-boot/tree/glassfish/spring-boot-deployment-tests/spring-boot-deployment-test-glassfish]. Equivalent tests for TomEE and WildFly deploy fine.

    Java.net JIRA | 2 years ago | philwebb
    java.lang.ArrayStoreException: sun.reflect.annotation.TypeNotPresentExceptionProxy
  3. Speed up your debug routine!

    Automated exception search integrated into your IDE

  4. 0

    GitHub comment 9294#144032217

    GitHub | 1 year ago | danielsun1106
    java.lang.ArrayStoreException: sun.reflect.annotation.TypeNotPresentExceptionProxy
  5. 0

    Failed to deploy Grails3.0.8 app to GlassFish4.1

    GitHub | 1 year ago | danielsun1106
    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. GlassFish Annotation
    AnnotationProcessorImpl.process
    1. org.glassfish.apf.impl.AnnotationProcessorImpl.processAnnotations(AnnotationProcessorImpl.java:285)
    2. org.glassfish.apf.impl.AnnotationProcessorImpl.process(AnnotationProcessorImpl.java:195)
    3. org.glassfish.apf.impl.AnnotationProcessorImpl.process(AnnotationProcessorImpl.java:134)
    3 frames
  4. Deployment Object Library
    Archivist.readAnnotations
    1. com.sun.enterprise.deployment.archivist.Archivist.processAnnotations(Archivist.java:626)
    2. com.sun.enterprise.deployment.archivist.Archivist.readAnnotations(Archivist.java:462)
    3. com.sun.enterprise.deployment.archivist.Archivist.readAnnotations(Archivist.java:446)
    3 frames
  5. Glassfish
    WebArchivist.postAnnotationProcess
    1. org.glassfish.web.deployment.archivist.WebArchivist.postAnnotationProcess(WebArchivist.java:338)
    2. org.glassfish.web.deployment.archivist.WebArchivist.postAnnotationProcess(WebArchivist.java:91)
    2 frames
  6. Deployment Object Library
    ApplicationFactory.openArchive
    1. com.sun.enterprise.deployment.archivist.Archivist.readRestDeploymentDescriptors(Archivist.java:420)
    2. com.sun.enterprise.deployment.archivist.Archivist.readDeploymentDescriptors(Archivist.java:396)
    3. com.sun.enterprise.deployment.archivist.Archivist.open(Archivist.java:271)
    4. com.sun.enterprise.deployment.archivist.Archivist.open(Archivist.java:280)
    5. com.sun.enterprise.deployment.archivist.Archivist.open(Archivist.java:241)
    6. com.sun.enterprise.deployment.archivist.ApplicationFactory.openArchive(ApplicationFactory.java:161)
    6 frames
  7. Deployment Related JavaEE Core Classes
    DolProvider.load
    1. org.glassfish.javaee.core.deployment.DolProvider.processDOL(DolProvider.java:203)
    2. org.glassfish.javaee.core.deployment.DolProvider.load(DolProvider.java:227)
    3. org.glassfish.javaee.core.deployment.DolProvider.load(DolProvider.java:96)
    3 frames
  8. Kernel Classes
    ApplicationLifecycle.deploy
    1. com.sun.enterprise.v3.server.ApplicationLifecycle.loadDeployer(ApplicationLifecycle.java:881)
    2. com.sun.enterprise.v3.server.ApplicationLifecycle.setupContainerInfos(ApplicationLifecycle.java:821)
    3. com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:377)
    4. com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:219)
    4 frames
  9. Embedded GlassFish Web
    DeployCommand.execute
    1. org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:491)
    1 frame
  10. Kernel Classes
    CommandRunnerImpl$2$1.run
    1. com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:539)
    2. com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:535)
    2 frames
  11. Java RT
    Subject.doAs
    1. java.security.AccessController.doPrivileged(Native Method)
    2. javax.security.auth.Subject.doAs(Subject.java:356)
    2 frames
  12. Kernel Classes
    CommandRunnerImpl$3.run
    1. com.sun.enterprise.v3.admin.CommandRunnerImpl$2.execute(CommandRunnerImpl.java:534)
    2. com.sun.enterprise.v3.admin.CommandRunnerImpl$3.run(CommandRunnerImpl.java:565)
    3. com.sun.enterprise.v3.admin.CommandRunnerImpl$3.run(CommandRunnerImpl.java:557)
    3 frames
  13. Java RT
    Subject.doAs
    1. java.security.AccessController.doPrivileged(Native Method)
    2. javax.security.auth.Subject.doAs(Subject.java:356)
    2 frames
  14. Kernel Classes
    CommandRunnerImpl$ExecutionContext.execute
    1. com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:556)
    2. com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1464)
    3. com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1300(CommandRunnerImpl.java:109)
    4. com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1846)
    4 frames
  15. Embedded GlassFish Web
    AutoDeployService$1.run
    1. org.glassfish.deployment.autodeploy.AutoOperation.run(AutoOperation.java:164)
    2. org.glassfish.deployment.autodeploy.AutoDeployer.deploy(AutoDeployer.java:597)
    3. org.glassfish.deployment.autodeploy.AutoDeployer.deployAll(AutoDeployer.java:484)
    4. org.glassfish.deployment.autodeploy.AutoDeployer.run(AutoDeployer.java:412)
    5. org.glassfish.deployment.autodeploy.AutoDeployer.run(AutoDeployer.java:403)
    6. org.glassfish.deployment.autodeploy.AutoDeployService$1.run(AutoDeployService.java:233)
    6 frames
  16. Java RT
    TimerThread.run
    1. java.util.TimerThread.mainLoop(Timer.java:555)
    2. java.util.TimerThread.run(Timer.java:505)
    2 frames