[jboss-user] [EJB3] - Re: ArrayStoreException: sun.reflect.annotation.TypeNotPresentExceptionProxy

Fernando de Diego do-not-reply at jboss.com
Fri May 18 16:18:38 EDT 2012


Fernando de Diego [https://community.jboss.org/people/fdediego.jboss] created the discussion

"Re: ArrayStoreException: sun.reflect.annotation.TypeNotPresentExceptionProxy"

To view the discussion, visit: https://community.jboss.org/message/736584#736584

--------------------------------------------------------------
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







@Stateless(name="ejb/greeter")
//@Interceptors(SpringBeanAutowiringInterceptor.class)
public class GreeterBean implements Greeter{
    public String sayHi() {
        SpringBeanAutowiringInterceptor sb = new SpringBeanAutowiringInterceptor();
        return "Hi!!! Hello World !!!";
    }
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/736584#736584]

Start a new discussion in EJB3 at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2029]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20120518/6167b2ba/attachment.html 


More information about the jboss-user mailing list