JBoss Community

Re: ArrayStoreException: sun.reflect.annotation.TypeNotPresentExceptionProxy

created by Fernando de Diego in EJB3 - View the full discussion

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 "@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 I 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

 

 

 

 

 

 

 

Reply to this message by going to Community

Start a new discussion in EJB3 at Community