I'm trying to remote access an EntityQuery subclass that I've converted to a SFSB.
It was generated by seam-gen as a non-EJB subclass. I'm trying to use the EJB in a
remote client app (Eclipse RCP). Currently, the lookup works but the bean won't cast
properly due to some kind of serialVersionUID problem. I've tried many different
workarounds related to assigning the serialVersionUID of the bean to either values in the
error message, but it still fails (class snippets and stack trace given below). I'm
wondering if this has something to do with Seam creating proxies for the bean.
And am I taking the wrong approach here? Is there an easier way to do this? I hear
rumors that RCP integration is in the plan, but I can't wait for that to happen
(although it would be awesome to be able to reference Seam components in RCP instead of
doing remote EJB lookup). Perhaps with some guidance, I could write some Seam code that
surface the remote components in RCP (but I don't know where to start--any pointers
welcome).
TIA, Clark
| @Name("demoStatesList")
| @Stateful
| public class DemoStatesList extends EntityQuery implements DemoStatesListIntface,
Serializable {
|
|
| private static final long serialVersionUID = -2164496320326661428L;
| ...
| <snip>
| --------------------------
| @Remote
| public interface DemoStatesListIntface {
|
| public abstract DemoStates getDemoStates();
|
| }
| --------------------------
| ######## doing lookup of: SeamGenTest2/DemoStatesList/remote
| 20:33:31,564 ERROR [SocketClientInvoker] Got marshalling exception, exiting
| java.io.InvalidClassException: org.jboss.ejb3.stateful.StatefulRemoteProxy; local
class incompatible: stream classdesc serialVersionUID = -2164496320326661428, local class
serialVersionUID = -8874087830926007682
| at java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:519)
| at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1546)
| at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1460)
| at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1693)
| at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299)
| at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1912)
| at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1836)
| at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1713)
| at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299)
| at java.io.ObjectInputStream.readObject(ObjectInputStream.java:339)
| at
org.jboss.aop.joinpoint.InvocationResponse.readExternal(InvocationResponse.java:107)
| at java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1753)
| at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1711)
| at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299)
| at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1912)
| at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1836)
| at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1713)
| at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299)
| at java.io.ObjectInputStream.readObject(ObjectInputStream.java:339)
| at
org.jboss.remoting.serialization.impl.java.JavaSerializationManager.receiveObject(JavaSerializationManager.java:128)
| at
org.jboss.remoting.marshal.serializable.SerializableUnMarshaller.read(SerializableUnMarshaller.java:66)
| at
org.jboss.remoting.transport.socket.SocketClientInvoker.transport(SocketClientInvoker.java:279)
| at org.jboss.remoting.RemoteClientInvoker.invoke(RemoteClientInvoker.java:143)
| at org.jboss.remoting.Client.invoke(Client.java:525)
| at org.jboss.remoting.Client.invoke(Client.java:488)
| at
org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:61)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
| at org.jboss.aspects.remoting.IsLocalInterceptor.invoke(IsLocalInterceptor.java:48)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
| at org.jboss.aspects.remoting.PojiProxy.invoke(PojiProxy.java:61)
| at $Proxy0.createProxy(Unknown Source)
| at org.jboss.ejb3.JndiProxyFactory.getObjectInstance(JndiProxyFactory.java:52)
| at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304)
| at org.jnp.interfaces.NamingContext.getObjectInstance(NamingContext.java:1131)
| at
org.jnp.interfaces.NamingContext.getObjectInstanceWrapFailure(NamingContext.java:1148)
| at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:706)
| at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:588)
| at javax.naming.InitialContext.lookup(InitialContext.java:351)
| at edu.jhuapl.ermp.ServiceFactory.buildALocalFacade(ServiceFactory.java:129)
| at edu.jhuapl.ermp.ServiceFactory.getDemoStatesList(ServiceFactory.java:115)
| at edu.jhuapl.ermp.ServiceFactory.main(ServiceFactory.java:153)
| javax.naming.NamingException: Could not dereference object [Root exception is
java.lang.reflect.UndeclaredThrowableException]
| at
org.jnp.interfaces.NamingContext.getObjectInstanceWrapFailure(NamingContext.java:1156)
| at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:706)
| at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:588)
| at javax.naming.InitialContext.lookup(InitialContext.java:351)
| at edu.jhuapl.ermp.ServiceFactory.buildALocalFacade(ServiceFactory.java:129)
| at edu.jhuapl.ermp.ServiceFactory.getDemoStatesList(ServiceFactory.java:115)
| at edu.jhuapl.ermp.ServiceFactory.main(ServiceFactory.java:153)DemoStatesList not
found
|
| Caused by: java.lang.reflect.UndeclaredThrowableException
| at $Proxy0.createProxy(Unknown Source)
| at org.jboss.ejb3.JndiProxyFactory.getObjectInstance(JndiProxyFactory.java:52)
| at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304)
| at org.jnp.interfaces.NamingContext.getObjectInstance(NamingContext.java:1131)
| at
org.jnp.interfaces.NamingContext.getObjectInstanceWrapFailure(NamingContext.java:1148)
| ... 6 more
| Caused by: java.rmi.MarshalException: Failed to communicate. Problem during
marshalling/unmarshalling; nested exception is:
| java.io.InvalidClassException: org.jboss.ejb3.stateful.StatefulRemoteProxy; local
class incompatible: stream classdesc serialVersionUID = -2164496320326661428, local class
serialVersionUID = -8874087830926007682
| at
org.jboss.remoting.transport.socket.SocketClientInvoker.transport(SocketClientInvoker.java:306)
| at org.jboss.remoting.RemoteClientInvoker.invoke(RemoteClientInvoker.java:143)
| at org.jboss.remoting.Client.invoke(Client.java:525)
| at org.jboss.remoting.Client.invoke(Client.java:488)
| at
org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:61)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
| at org.jboss.aspects.remoting.IsLocalInterceptor.invoke(IsLocalInterceptor.java:48)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
| at org.jboss.aspects.remoting.PojiProxy.invoke(PojiProxy.java:61)
| ... 11 more
| Caused by: java.io.InvalidClassException: org.jboss.ejb3.stateful.StatefulRemoteProxy;
local class incompatible: stream classdesc serialVersionUID = -2164496320326661428, local
class serialVersionUID = -8874087830926007682
| at java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:519)
| at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1546)
| at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1460)
| at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1693)
| at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299)
| at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1912)
| at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1836)
| at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1713)
| at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299)
| at java.io.ObjectInputStream.readObject(ObjectInputStream.java:339)
| at
org.jboss.aop.joinpoint.InvocationResponse.readExternal(InvocationResponse.java:107)
| at java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1753)
| at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1711)
| at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299)
| at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1912)
| at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1836)
| at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1713)
| at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299)
| at java.io.ObjectInputStream.readObject(ObjectInputStream.java:339)
| at
org.jboss.remoting.serialization.impl.java.JavaSerializationManager.receiveObject(JavaSerializationManager.java:128)
| at
org.jboss.remoting.marshal.serializable.SerializableUnMarshaller.read(SerializableUnMarshaller.java:66)
| at
org.jboss.remoting.transport.socket.SocketClientInvoker.transport(SocketClientInvoker.java:279)
| at org.jboss.remoting.RemoteClientInvoker.invoke(RemoteClientInvoker.java:143)
| at org.jboss.remoting.Client.invoke(Client.java:525)
| at org.jboss.remoting.Client.invoke(Client.java:488)
| at
org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:61)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
| at org.jboss.aspects.remoting.IsLocalInterceptor.invoke(IsLocalInterceptor.java:48)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
| at org.jboss.aspects.remoting.PojiProxy.invoke(PojiProxy.java:61)
| at $Proxy0.createProxy(Unknown Source)
| at org.jboss.ejb3.JndiProxyFactory.getObjectInstance(JndiProxyFactory.java:52)
| at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304)
| at org.jnp.interfaces.NamingContext.getObjectInstance(NamingContext.java:1131)
| at
org.jnp.interfaces.NamingContext.getObjectInstanceWrapFailure(NamingContext.java:1148)
| at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:706)
| at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:588)
| at javax.naming.InitialContext.lookup(InitialContext.java:351)
| at edu.jhuapl.ermp.ServiceFactory.buildALocalFacade(ServiceFactory.java:129)
| at edu.jhuapl.ermp.ServiceFactory.getDemoStatesList(ServiceFactory.java:115)
| at edu.jhuapl.ermp.ServiceFactory.main(ServiceFactory.java:153)
| at
org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:73)
| ... 15 more
| Exception in thread "main" java.lang.NullPointerException
| at edu.jhuapl.ermp.ServiceFactory.main(ServiceFactory.java:154)
|
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4047971#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...