java.lang.ArrayStoreException: sun.reflect.annotation.TypeNotPresentExceptionProxy in JBoss EAP 6.x

Solution Unverified - Updated

Environment

Red Hat JBoss Enterprise Application Platform (EAP) 6.2.x

Issue

  • We are trying to our application JBoss EAP 5.1.0 to JBoss EAP 6.2.0 and getting the error below:
ERROR [org.jboss.msc.service.fail] (MSC service thread 1-5) MSC000001: Failed to start service jboss.deployment.unit."example.war".INSTALL: org.jboss.msc.service.StartException in service jboss.deployment.unit."example.war".INSTALL: JBAS018733: Failed to process phase INSTALL of deployment "example.war"
       at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:127) [jboss-as-server-7.3.0.Final-redhat-14.jar:7.3.0.Final-redhat-14]
       at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.4.GA-redhat-1.jar:1.0.4.GA-redhat-1]
       at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.4.GA-redhat-1.jar:1.0.4.GA-redhat-1]
       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_40]
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_40]
       at java.lang.Thread.run(Thread.java:724) [rt.jar:1.7.0_40]
Caused by: java.lang.ArrayStoreException: sun.reflect.annotation.TypeNotPresentExceptionProxy
       at sun.reflect.annotation.AnnotationParser.parseClassArray(AnnotationParser.java:673) [rt.jar:1.7.0_40]
       at sun.reflect.annotation.AnnotationParser.parseArray(AnnotationParser.java:480) [rt.jar:1.7.0_40]
       at sun.reflect.annotation.AnnotationParser.parseMemberValue(AnnotationParser.java:306) [rt.jar:1.7.0_40]
       at sun.reflect.annotation.AnnotationParser.parseAnnotation(AnnotationParser.java:241) [rt.jar:1.7.0_40]
       at sun.reflect.annotation.AnnotationParser.parseAnnotations2(AnnotationParser.java:88) [rt.jar:1.7.0_40]
       at sun.reflect.annotation.AnnotationParser.parseAnnotations(AnnotationParser.java:70) [rt.jar:1.7.0_40]
       at java.lang.Class.initAnnotationsIfNecessary(Class.java:3168) [rt.jar:1.7.0_40]
       at java.lang.Class.getAnnotation(Class.java:3127) [rt.jar:1.7.0_40]
       at java.lang.Class.isAnnotationPresent(Class.java:3140) [rt.jar:1.7.0_40]
       at org.jboss.as.web.deployment.ServletContainerInitializerDeploymentProcessor.deploy(ServletContainerInitializerDeploymentProcessor.java:134)
       at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:120) [jboss-as-server-7.3.0.Final-redhat-14.jar:7.3.0.Final-redhat-14]
       ... 5 more

Resolution

Make sure all classes referenced are in the classpath

Diagnostic Steps

Look for annotations used in the application and verify any classes mentioned as arguments passed into the annotation exist in the classpath for the application.

@ExampleAnnotation({MyTest.class})
Components
Category

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.