[jboss-user] [EJB 3.0] - Injection SessionContext to interceptor

MirekSz do-not-reply at jboss.com
Thu Jul 30 02:43:52 EDT 2009


Hello,
when I inject SessionContext by @Resource annotation everything works fine but when I inject it by ejb-jar.xml file I get following error


  | Caused by: javax.ejb.EJBException: java.lang.IllegalArgumentException: failed to set value org.jboss.ejb3.stateful.StatefulSessionContextImpl at 377d53{containerGuid=jboss.j2ee:jar=TestEJB.jar,name=SimpleEjbImpl,service=EJB3,VMID=0c98273ef3885574:-103e70a0:122ca5af195:-7f95,id=5c4o201w-31yh4q-fxr3xh3b-1-fxr408b5-9s} on field javax.ejb.SessionContext test.InterceptorTest.sessionContext
  | 	at org.jboss.ejb3.cache.simple.SimpleStatefulCache.create(SimpleStatefulCache.java:423)
  | 	at org.jboss.ejb3.stateful.StatefulContainer.createSession(StatefulContainer.java:489)
  | 	at org.jboss.ejb3.session.SessionContainer.createSession(SessionContainer.java:637)
  | 	at org.jboss.ejb3.proxy.factory.session.stateful.StatefulSessionProxyFactoryBase.getNewSessionId(StatefulSessionProxyFactoryBase.java:296)
  | 	at org.jboss.ejb3.proxy.factory.session.stateful.StatefulSessionProxyFactoryBase.createProxyBusiness(StatefulSessionProxyFactoryBase.java:160)
  | 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  | 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
  | 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  | 	at java.lang.reflect.Method.invoke(Method.java:597)
  | 	at org.jboss.aop.Dispatcher.invoke(Dispatcher.java:121)
  | 	at org.jboss.aspects.remoting.AOPRemotingInvocationHandler.invoke(AOPRemotingInvocationHandler.java:82)
  | 	at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:908)
  | 	at org.jboss.remoting.transport.socket.ServerThread.completeInvocation(ServerThread.java:742)
  | 	at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:695)
  | 	at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:522)
  | 	at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:230)
  | 

What could be a problem ?

Best Regards
Mirek

View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4246868#4246868

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4246868



More information about the jboss-user mailing list