12 Replies Latest reply on Dec 7, 2015 11:50 AM by rzvikas

    ArrayStoreException: sun.reflect.annotation.TypeNotPresentExceptionProxy

    ebross

      Using: Linux/JEE 5/GateIn-3.1.0-CR01/JSF 1.2


      Until yesterday, my EAR application was running without any problem, but I am now having the  problem below.   It seems to stem from my EJB project deployed inside an ear, which also includes a war file, EJB Client file  and other utility files. have used TRACE  to dig into it and also looked into the AnnotationParser class but still have no clue what exactly the problem is. It refers to annotations but which one and in which file – I have over 500 EJB files with annotations.  Any suggestions would be welcomed?


      Thanks.


      2010-06-05 11:18:01,075 ERROR [org.jboss.kernel.plugins.dependency.AbstractKernelController] (main) Error installing to PostClassLoader: name=vfszip:/home/dev/tools/GateIn-3.1.0-CR01/server/all/deploy/xxxxEAR.ear/ state=ClassLoader mode=Manual requiredState=PostClassLoader
      org.jboss.deployers.spi.DeploymentException: Cannot process metadata
      at org.jboss.deployers.spi.DeploymentException.rethrowAsDeploymentException(DeploymentException.java:49)
      at org.jboss.deployment.AnnotationMetaDataDeployer.deploy(AnnotationMetaDataDeployer.java:181)
      at org.jboss.deployment.AnnotationMetaDataDeployer.deploy(AnnotationMetaDataDeployer.java:93)
      at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:171)
      at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1439)
      at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1157)
      at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1210)
      at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1098)
      at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
      at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)
      at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
      at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)
      at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
      at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
      at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
      at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:781)
      at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:702)
      at org.jboss.system.server.profileservice.repository.MainDeployerAdapter.process(MainDeployerAdapter.java:117)
      at org.jboss.system.server.profileservice.repository.ProfileDeployAction.install(ProfileDeployAction.java:70)
      at org.jboss.system.server.profileservice.repository.AbstractProfileAction.install(AbstractProfileAction.java:53)
      at org.jboss.system.server.profileservice.repository.AbstractProfileService.install(AbstractProfileService.java:361)
      at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
      at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)
      at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
      at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)
      at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
      at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
      at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
      at org.jboss.system.server.profileservice.repository.AbstractProfileService.activateProfile(AbstractProfileService.java:306)
      at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:271)
      at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:461)
      at org.jboss.Main.boot(Main.java:221)
      at org.jboss.Main$1.run(Main.java:556)
      at java.lang.Thread.run(Thread.java:619)
      Caused by: java.lang.ArrayStoreException: sun.reflect.annotation.TypeNotPresentExceptionProxy
      at sun.reflect.annotation.AnnotationParser.parseClassArray(AnnotationParser.java:653)
      at sun.reflect.annotation.AnnotationParser.parseArray(AnnotationParser.java:460)
      at sun.reflect.annotation.AnnotationParser.parseMemberValue(AnnotationParser.java:286)
      at sun.reflect.annotation.AnnotationParser.parseAnnotation(AnnotationParser.java:222)
      at sun.reflect.annotation.AnnotationParser.parseAnnotations2(AnnotationParser.java:69)
      at sun.reflect.annotation.AnnotationParser.parseAnnotations(AnnotationParser.java:52)
      at java.lang.Class.initAnnotationsIfNecessary(Class.java:3070)
      at java.lang.Class.getAnnotation(Class.java:3029)
      at org.jboss.metadata.annotation.finder.DefaultAnnotationFinder.getAnnotation(DefaultAnnotationFinder.java:38)
      at org.jboss.metadata.annotation.creator.ejb.jboss.StatefulProcessor.create(StatefulProcessor.java:61)
      at org.jboss.metadata.annotation.creator.ejb.jboss.StatefulProcessor.create(StatefulProcessor.java:44)
      at org.jboss.metadata.annotation.creator.ejb.jboss.AbstractEnterpriseBeanProcessor.process(AbstractEnterpriseBeanProcessor.java:90)
      at org.jboss.metadata.annotation.creator.ejb.jboss.AbstractEnterpriseBeanProcessor.process(AbstractEnterpriseBeanProcessor.java:52)
      at org.jboss.metadata.annotation.creator.AbstractCreator.process(AbstractCreator.java:154)
      at org.jboss.metadata.annotation.creator.AbstractCreator.processMetaData(AbstractCreator.java:87)
      at org.jboss.metadata.annotation.creator.ejb.jboss.JBoss50Creator.create(JBoss50Creator.java:109)
      at org.jboss.deployment.OptAnnotationMetaDataDeployer.processJBossMetaData(OptAnnotationMetaDataDeployer.java:134)
      at org.jboss.deployment.OptAnnotationMetaDataDeployer.processMetaData(OptAnnotationMetaDataDeployer.java:84)
      at org.jboss.deployment.AnnotationMetaDataDeployer.deploy(AnnotationMetaDataDeployer.java:177)
      ... 32 more


       

        • 1. Re: ArrayStoreException: sun.reflect.annotation.TypeNotPresentExceptionProxy
          infped

          Hello

           

          Were you able to resolve this issue? I am facing the same problem when deploying an MDB in JBOSS 5.

          Please help me if you have any leads into this.

           

          Best Regards

          ss

          • 2. Re: ArrayStoreException: sun.reflect.annotation.TypeNotPresentExceptionProxy
            jaikiran

            Please post more details about your application, the exact JBoss AS server, the Java vendor and version and also the entire exception stacktrace. A bit more details about when this happens will also be useful.

            • 3. Re: ArrayStoreException: sun.reflect.annotation.TypeNotPresentExceptionProxy
              infped

              Hello

               

              I am trying to deploy a simple MDB (attached herewith), packaged as a jar into Jboss 5.1.0. I am running the server on Mac with Hotspot JVM. The Java version used is 1.6. I have created this MDB in eclipse and has run it directly from the server. Please find attached the complete server log.

               

              Best Regards

              SS

              • 4. Re: ArrayStoreException: sun.reflect.annotation.TypeNotPresentExceptionProxy
                jaikiran
                @Interceptors(SpringBeanAutowiringInterceptor.class)
                public class EventTrackerMDB implements MessageListener {

                 

                 

                Where is that org.springframework.ejb.interceptor.SpringBeanAutowiringInterceptor class located? Looks like it's missing from your application packaging.

                • 5. Re: ArrayStoreException: sun.reflect.annotation.TypeNotPresentExceptionProxy
                  elamotte

                  I've got exactly the same problem. Did you find a solution?...

                  • 6. Re: ArrayStoreException: sun.reflect.annotation.TypeNotPresentExceptionProxy
                    jaikiran

                    The real issue is, there's some annotation whose value uses a class which isn't in the classpath. For example:

                     

                    @SomeAnnotation (value = SomeClassNotInClasspath.class)
                    public class SomeClass
                    

                     

                    You'll have to make sure that the "SomeClassNotInClasspath" is made available in the classpath (for example, by packaging it in your app).

                    • 7. Re: ArrayStoreException: sun.reflect.annotation.TypeNotPresentExceptionProxy
                      elamotte

                      Thanks for the answer jaikiran.

                       

                      I use @Interceptors(SpringBeanAutowiringInterceptor.class) on my EJB3. But the problem that's i've got "SomeClassNotInClasspath" in my ear's librairies...

                      • 8. Re: ArrayStoreException: sun.reflect.annotation.TypeNotPresentExceptionProxy

                        Did you find the solution for this?

                         

                        I have the same problem. In my app there is a SLSB and my intention is to inject it some beans using Spring, so I added the interceptor line "@Interceptors(SpringBeanAutowiringInterceptor.class)".

                         

                        @Stateless(name="ejb/greeter")

                        @Interceptors(SpringBeanAutowiringInterceptor.class)

                        public class GreeterBean implements Greeter{

                         

                            public String sayHi() {

                                return "Hi!!! Hello World !!!";

                            }

                        ...

                         

                        It then started to throw java.lang.ArrayStoreException: sun.reflect.annotation.TypeNotPresentExceptionProxy.

                         

                        22:16:40,347 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-8) MSC00001: Failed to start service jboss.deployment.subunit."pi-ear.ear"."pi-ejb3-0.0.1-SNAPSHOT.jar".POST_MODULE: org.jboss.msc.service.StartException in service jboss.deployment.subunit."pi-ear.ear"."pi-ejb3-0.0.1-SNAPSHOT.jar".POST_MODULE: Failed to process phase POST_MODULE of subdeployment "pi-ejb3-0.0.1-SNAPSHOT.jar" of deployment "pi-ear.ear"
                            at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:119) [jboss-as-server-7.1.0.Final.jar:7.1.0.Final]
                            at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
                            at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
                            at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [rt.jar:1.6.0_31]
                            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [rt.jar:1.6.0_31]
                            at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_31]
                        Caused by: java.lang.ArrayStoreException: sun.reflect.annotation.TypeNotPresentExceptionProxy
                            at sun.reflect.annotation.AnnotationParser.parseClassArray(AnnotationParser.java:653) [rt.jar:1.6.0_31]
                            at sun.reflect.annotation.AnnotationParser.parseArray(AnnotationParser.java:460) [rt.jar:1.6.0_31]
                            at sun.reflect.annotation.AnnotationParser.parseMemberValue(AnnotationParser.java:286) [rt.jar:1.6.0_31]
                            at sun.reflect.annotation.AnnotationParser.parseAnnotation(AnnotationParser.java:222) [rt.jar:1.6.0_31]
                            at sun.reflect.annotation.AnnotationParser.parseAnnotations2(AnnotationParser.java:69) [rt.jar:1.6.0_31]
                            at sun.reflect.annotation.AnnotationParser.parseAnnotations(AnnotationParser.java:52) [rt.jar:1.6.0_31]
                            at java.lang.Class.initAnnotationsIfNecessary(Class.java:3070) [rt.jar:1.6.0_31]
                            at java.lang.Class.getAnnotation(Class.java:3029) [rt.jar:1.6.0_31]
                            at org.jboss.as.ejb3.deployment.processors.BusinessViewAnnotationProcessor.getRemoteBusinessInterfaces(BusinessViewAnnotationProcessor.java:150)
                            at org.jboss.as.ejb3.deployment.processors.BusinessViewAnnotationProcessor.processViewAnnotations(BusinessViewAnnotationProcessor.java:123)
                            at org.jboss.as.ejb3.deployment.processors.BusinessViewAnnotationProcessor.deploy(BusinessViewAnnotationProcessor.java:98)
                            at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:113) [jboss-as-server-7.1.0.Final.jar:7.1.0.Final]
                            ... 5 more

                         

                        I googled and saw answers as the one jaikiran gave you, but if I remove the '@interceptors...' line and add one line using SpringBeanAutowiringInterceptor only to see if the class is reached, the class is found.

                         

                        @Stateless(name="ejb/greeter")
                        public class GreeterBean implements Greeter{

                         

                            public String sayHi() {
                                SpringBeanAutowiringInterceptor sb = new SpringBeanAutowiringInterceptor();
                                return "Hi!!! Hello World !!!";
                            }

                        ...

                         

                         

                        Please, tell me if you resolved this.

                         

                        Best regards,
                        Fer

                         

                         

                         

                         

                         

                         

                         

                        • 9. Re: ArrayStoreException: sun.reflect.annotation.TypeNotPresentExceptionProxy

                          I think I got it: it was WTP/JBoss not deploying the application.xml file from the ear. The weird thing is that Maven generates it every time, but the file not always (sometimes yes, sometimes no) is deployed to JBoss. It doesn't even work copying the file by hand, I have to remove de app from the server and redeploy it.

                           

                          Any explanation?

                          • 10. Re: ArrayStoreException: sun.reflect.annotation.TypeNotPresentExceptionProxy
                            zenzei2k

                            I'm getting the same exception. In my case, the problem seems to be the SpringLifecycleInterceptor interceptor class. Only after adding the snowdrop-deployers.jar to my .ear the problem dissapear although I have already install snowdrop in the modules folder, and then added the extension org.jboss.snowdrop to my configuration.

                             

                            I suppose adding the snowdrop jar to my ear isn't the right solution, so I'l glad to hear to the right one!

                            • 11. Re: ArrayStoreException: sun.reflect.annotation.TypeNotPresentExceptionProxy
                              jrantav

                              Seeing the same exception with JBoss EAP 6.1.alpha (AS 7.2).

                               

                              Isn't this a bug as in it's not even telling which class is the problem? It just says

                               

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

                               

                              which doesn't really help much.

                              • 12. Re: ArrayStoreException: sun.reflect.annotation.TypeNotPresentExceptionProxy
                                rzvikas

                                Getting same exception with EAP 6.4

                                 

                                at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:166) [jboss-as-server-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21]

                                    at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1980) [jboss-msc-1.1.5.Final-redhat-1.jar:1.1.5.Final-redhat-1]

                                    at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1913) [jboss-msc-1.1.5.Final-redhat-1.jar:1.1.5.Final-redhat-1]

                                    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_75]

                                    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_75]

                                    at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_75]

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

                                    at sun.reflect.annotation.AnnotationParser.parseClassArray(AnnotationParser.java:715) [rt.jar:1.7.0_75]

                                    at sun.reflect.annotation.AnnotationParser.parseArray(AnnotationParser.java:522) [rt.jar:1.7.0_75]

                                    at sun.reflect.annotation.AnnotationParser.parseMemberValue(AnnotationParser.java:348) [rt.jar:1.7.0_75]

                                    at sun.reflect.annotation.AnnotationParser.parseAnnotation2(AnnotationParser.java:283) [rt.jar:1.7.0_75]

                                    at sun.reflect.annotation.AnnotationParser.parseAnnotations2(AnnotationParser.java:117) [rt.jar:1.7.0_75]

                                    at sun.reflect.annotation.AnnotationParser.parseAnnotations(AnnotationParser.java:70) [rt.jar:1.7.0_75]

                                    at java.lang.Class.initAnnotationsIfNecessary(Class.java:3271) [rt.jar:1.7.0_75]

                                    at java.lang.Class.getAnnotation(Class.java:3219) [rt.jar:1.7.0_75]

                                    at org.jboss.as.ejb3.deployment.processors.BusinessViewAnnotationProcessor.getRemoteBusinessInterfaces(BusinessViewAnnotationProcessor.java:140)

                                    at org.jboss.as.ejb3.deployment.processors.BusinessViewAnnotationProcessor.processViewAnnotations(BusinessViewAnnotationProcessor.java:113)

                                    at org.jboss.as.ejb3.deployment.processors.BusinessViewAnnotationProcessor.deploy(BusinessViewAnnotationProcessor.java:88)

                                    at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:159) [jboss-as-server-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21]

                                    ... 5 more