[jboss-user] [EJB3] - Issue in injecting Spring bean into EJB3
ashishmtiwari
do-not-reply at jboss.com
Tue Dec 18 06:09:25 EST 2012
ashishmtiwari [https://community.jboss.org/people/ashishmtiwari] created the discussion
"Issue in injecting Spring bean into EJB3"
To view the discussion, visit: https://community.jboss.org/message/783844#783844
--------------------------------------------------------------
Have created one Remote StatelessSession Bean and want to inject Spring bean into my UserServiceImpl EJB.
@Stateless
@Interceptors(SpringBeanAutowiringInterceptor.class)
public class UserServiceImpl implements IUserService{
@Autowired
IRegisterService registerService;
As per the docuemtation have added beanRefContext.xml into classpath which has entry for spring bean configuration.
My problem is when I am trying to deploy this EJB with out @Interceptors(SpringBeanAutowiringInterceptor.class) it gets deployed and run as expected without spring bean injection.
But when I am injecting bean into EJB deployemtn fails with following exception
| | at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:119) [jboss-as-server-7 |
.1.1.Final.jar:7.1.1.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_29] |
| | at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [rt.jar:1.6.0_29] |
| | at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_29] |
Caused by: java.lang.ArrayStoreException: sun.reflect.annotation.TypeNotPresentExceptionProxy
| | at sun.reflect.annotation.AnnotationParser.parseClassArray(AnnotationParser.java:653) [rt.jar:1.6.0_29] |
| | at sun.reflect.annotation.AnnotationParser.parseArray(AnnotationParser.java:460) [rt.jar:1.6.0_29] |
| | at sun.reflect.annotation.AnnotationParser.parseMemberValue(AnnotationParser.java:286) [rt.jar:1.6.0_29] |
| | at sun.reflect.annotation.AnnotationParser.parseAnnotation(AnnotationParser.java:222) [rt.jar:1.6.0_29] |
| | at sun.reflect.annotation.AnnotationParser.parseAnnotations2(AnnotationParser.java:69) [rt.jar:1.6.0_29] |
| | at sun.reflect.annotation.AnnotationParser.parseAnnotations(AnnotationParser.java:52) [rt.jar:1.6.0_29] |
| | at java.lang.Class.initAnnotationsIfNecessary(Class.java:3070) [rt.jar:1.6.0_29] |
| | at java.lang.Class.getAnnotation(Class.java:3029) [rt.jar:1.6.0_29] |
| | at org.jboss.as.ejb3.deployment.processors.BusinessViewAnnotationProcessor.getRemoteBusinessInterfaces(BusinessViewAnnotat |
ionProcessor.java:150)
| | at org.jboss.as.ejb3.deployment.processors.BusinessViewAnnotationProcessor.processViewAnnotations(BusinessViewAnnotationPr |
ocessor.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.1.Final.jar:7.1.1.Final]
| | ... 5 more |
Can anyone have experienced this issue and has solution for it?
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/783844#783844]
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/20121218/4d667019/attachment.html
More information about the jboss-user
mailing list