[EJB 3.0] - Re: Injection SessionContext to interceptor
by MirekSz
JBOSS 5.0.0 GA
full stack trace
| 08:59:55,451 ERROR [FieldBeanProperty] failed to set value org.jboss.ejb3.stateful.StatefulSessionContextImpl@11e9be0{containerGuid=jboss.j2ee:jar=TestEJB.jar,name=SimpleEjbImpl,service=EJB3,VMID=0c98273ef3885574:5c4a7667:122ca74914f:-7fa4,id=5c4o201w-23hi0e-fxr4xidy-1-fxr4yjlm-9r} on field javax.ejb.SessionContext test.InterceptorTest.sessionContext
| java.lang.IllegalArgumentException: Can not set javax.ejb.SessionContext field test.InterceptorTest.sessionContext to test.SimpleEjbImpl
| at sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(UnsafeFieldAccessorImpl.java:146)
| at sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(UnsafeFieldAccessorImpl.java:150)
| at sun.reflect.UnsafeFieldAccessorImpl.ensureObj(UnsafeFieldAccessorImpl.java:37)
| at sun.reflect.UnsafeObjectFieldAccessorImpl.set(UnsafeObjectFieldAccessorImpl.java:57)
| at java.lang.reflect.Field.set(Field.java:657)
| at org.jboss.injection.lang.reflect.FieldBeanProperty.set(FieldBeanProperty.java:74)
| at org.jboss.injection.EJBContextPropertyInjector.inject(EJBContextPropertyInjector.java:50)
| at org.jboss.injection.EJBContextPropertyInjector.inject(EJBContextPropertyInjector.java:45)
| at org.jboss.ejb3.injection.InjectionInvocation.invokeTarget(InjectionInvocation.java:89)
| at org.jboss.ejb3.injection.InjectionInvocation.invokeNext(InjectionInvocation.java:83)
| at org.jboss.aspects.currentinvocation.CurrentInvocationInterceptor.invoke(CurrentInvocationInterceptor.java:67)
| at org.jboss.ejb3.injection.InjectionInvocation.invokeNext(InjectionInvocation.java:74)
| at org.jboss.ejb3.EJBContainer.injectBeanContext(EJBContainer.java:1076)
| at org.jboss.ejb3.stateful.StatefulContainer.create(StatefulContainer.java:136)
| at org.jboss.ejb3.cache.simple.SimpleStatefulCache.create(SimpleStatefulCache.java:402)
| 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)
| 08:59:55,451 ERROR [STDERR] java.lang.IllegalArgumentException: failed to set value org.jboss.ejb3.stateful.StatefulSessionContextImpl@11e9be0{containerGuid=jboss.j2ee:jar=TestEJB.jar,name=SimpleEjbImpl,service=EJB3,VMID=0c98273ef3885574:5c4a7667:122ca74914f:-7fa4,id=5c4o201w-23hi0e-fxr4xidy-1-fxr4yjlm-9r} on field javax.ejb.SessionContext test.InterceptorTest.sessionContext
| 08:59:55,451 ERROR [STDERR] at org.jboss.injection.lang.reflect.FieldBeanProperty.set(FieldBeanProperty.java:99)
| 08:59:55,451 ERROR [STDERR] at org.jboss.injection.EJBContextPropertyInjector.inject(EJBContextPropertyInjector.java:50)
| 08:59:55,452 ERROR [STDERR] at org.jboss.injection.EJBContextPropertyInjector.inject(EJBContextPropertyInjector.java:45)
| 08:59:55,452 ERROR [STDERR] at org.jboss.ejb3.injection.InjectionInvocation.invokeTarget(InjectionInvocation.java:89)
| 08:59:55,452 ERROR [STDERR] at org.jboss.ejb3.injection.InjectionInvocation.invokeNext(InjectionInvocation.java:83)
| 08:59:55,452 ERROR [STDERR] at org.jboss.aspects.currentinvocation.CurrentInvocationInterceptor.invoke(CurrentInvocationInterceptor.java:67)
| 08:59:55,452 ERROR [STDERR] at org.jboss.ejb3.injection.InjectionInvocation.invokeNext(InjectionInvocation.java:74)
| 08:59:55,452 ERROR [STDERR] at org.jboss.ejb3.EJBContainer.injectBeanContext(EJBContainer.java:1076)
| 08:59:55,452 ERROR [STDERR] at org.jboss.ejb3.stateful.StatefulContainer.create(StatefulContainer.java:136)
| 08:59:55,452 ERROR [STDERR] at org.jboss.ejb3.cache.simple.SimpleStatefulCache.create(SimpleStatefulCache.java:402)
| 08:59:55,452 ERROR [STDERR] at org.jboss.ejb3.stateful.StatefulContainer.createSession(StatefulContainer.java:489)
| 08:59:55,452 ERROR [STDERR] at org.jboss.ejb3.session.SessionContainer.createSession(SessionContainer.java:637)
| 08:59:55,452 ERROR [STDERR] at org.jboss.ejb3.proxy.factory.session.stateful.StatefulSessionProxyFactoryBase.getNewSessionId(StatefulSessionProxyFactoryBase.java:296)
| 08:59:55,452 ERROR [STDERR] at org.jboss.ejb3.proxy.factory.session.stateful.StatefulSessionProxyFactoryBase.createProxyBusiness(StatefulSessionProxyFactoryBase.java:160)
| 08:59:55,452 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| 08:59:55,452 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| 08:59:55,452 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| 08:59:55,452 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:597)
| 08:59:55,452 ERROR [STDERR] at org.jboss.aop.Dispatcher.invoke(Dispatcher.java:121)
| 08:59:55,452 ERROR [STDERR] at org.jboss.aspects.remoting.AOPRemotingInvocationHandler.invoke(AOPRemotingInvocationHandler.java:82)
| 08:59:55,452 ERROR [STDERR] at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:908)
| 08:59:55,452 ERROR [STDERR] at org.jboss.remoting.transport.socket.ServerThread.completeInvocation(ServerThread.java:742)
| 08:59:55,453 ERROR [STDERR] at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:695)
| 08:59:55,453 ERROR [STDERR] at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:522)
| 08:59:55,453 ERROR [STDERR] at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:230)
| 08:59:55,453 ERROR [StatefulSessionProxyFactoryBase] Could not obtain new Session ID from SFSB Container
| javax.ejb.EJBException: java.lang.IllegalArgumentException: failed to set value org.jboss.ejb3.stateful.StatefulSessionContextImpl@11e9be0{containerGuid=jboss.j2ee:jar=TestEJB.jar,name=SimpleEjbImpl,service=EJB3,VMID=0c98273ef3885574:5c4a7667:122ca74914f:-7fa4,id=5c4o201w-23hi0e-fxr4xidy-1-fxr4yjlm-9r} 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)
| Caused by: java.lang.IllegalArgumentException: failed to set value org.jboss.ejb3.stateful.StatefulSessionContextImpl@11e9be0{containerGuid=jboss.j2ee:jar=TestEJB.jar,name=SimpleEjbImpl,service=EJB3,VMID=0c98273ef3885574:5c4a7667:122ca74914f:-7fa4,id=5c4o201w-23hi0e-fxr4xidy-1-fxr4yjlm-9r} on field javax.ejb.SessionContext test.InterceptorTest.sessionContext
| at org.jboss.injection.lang.reflect.FieldBeanProperty.set(FieldBeanProperty.java:99)
| at org.jboss.injection.EJBContextPropertyInjector.inject(EJBContextPropertyInjector.java:50)
| at org.jboss.injection.EJBContextPropertyInjector.inject(EJBContextPropertyInjector.java:45)
| at org.jboss.ejb3.injection.InjectionInvocation.invokeTarget(InjectionInvocation.java:89)
| at org.jboss.ejb3.injection.InjectionInvocation.invokeNext(InjectionInvocation.java:83)
| at org.jboss.aspects.currentinvocation.CurrentInvocationInterceptor.invoke(CurrentInvocationInterceptor.java:67)
| at org.jboss.ejb3.injection.InjectionInvocation.invokeNext(InjectionInvocation.java:74)
| at org.jboss.ejb3.EJBContainer.injectBeanContext(EJBContainer.java:1076)
| at org.jboss.ejb3.stateful.StatefulContainer.create(StatefulContainer.java:136)
| at org.jboss.ejb3.cache.simple.SimpleStatefulCache.create(SimpleStatefulCache.java:402)
| ... 15 more
|
|
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4246875#4246875
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4246875
16 years, 3 months
[EJB 3.0] - Injection SessionContext to interceptor
by MirekSz
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@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
16 years, 3 months
[JBoss Portal] - Re: Porting application from WebSphere to JBoss
by apemberton
I don't have experience specifically migrating websphere apps to jboss, but I do have extensive experience with both websphere and jboss portal.
The first place to start with this kind of task is to ensure you're not using any vendor proprietary APIs (IBM in this case). You'll want to use the relevant portlet specification-defined APIs for your environment.
I'm assuming your either migrating:
- from websphere portal 6.0.X or earlier to jboss portal 2.6.X
- from websphere portal 6.0.X to jboss portal 2.7.X
Assuming you wouldn't be migrating off websphere 6.1 or 7, because they're both fairly new, so - you'll want to make sure you're migrating only JSR168-specific code to jboss.
It may help if you:
- describe your environment(s) in detail
- PortletContext (in neither JSR168 nor JSR286) have a getService method - can you explain more about what API you're using here?
- explain what you mean by "get the delegating methods"
Hope this is helpful.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4246865#4246865
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4246865
16 years, 3 months