Re: binding RMIDispatcher to client
Posted by pbwebguy on Aug 04, 2006; 11:01pm
URL: http://ofbiz.116.s1.nabble.com/binnding-RMIDispatcher-to-client-tp140489p140499.html
HELP!
I've been running into the same problem as what was reported in this thread
before. When attempting to run a RMI client I get the exception:
org.ofbiz.service.rmi.socket.ssl.SSLClientSocketFactory; local class
incompatible: stream classdesc serialVersionUID = -6771263703492769955, local
class serialVersionUID = 2417260480409974286
at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source)
Hopefully this has been resolved by someone?
Thanks!
John
Here's my steps:
1. clean build of the application server: ant build (command line)
codebase: ofbiz_opentaps_424208
WindowsXP
java 1.4.2
Eclipse 3.1
2. Copied the following jars into my classpath:
ofbiz-base.jar
ofbiz-entity.jar <--- There were some dependencies found in this jar
ofbiz-service-rmi.jar
commons-collections.jar
javolution.jar
jdbm.jar
log4j.jar
NOTE: I had to add a line to the ofbiz-service-rmi.jar (rmi-jar) build.xml
script because there were a bunch of references into the org.ofbiz.service
directories not getting pulled in.
<fileset dir="${build.dir}/classes" includes="org/ofbiz/service/**"/>
3. start application startofbiz.bat
4. In Eclipse, run the RMI Client Example.
When I attempt to execute this line:
rd = (RemoteDispatcher) Naming.lookup(RMI_URL);
I get the following exception:
java.rmi.UnmarshalException: error unmarshalling return; nested exception is:
java.io.InvalidClassException:
org.ofbiz.service.rmi.socket.ssl.SSLClientSocketFactory; local class
incompatible: stream classdesc serialVersionUID = -6771263703492769955, local
class serialVersionUID = 2417260480409974286
at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source)
at java.rmi.Naming.lookup(Unknown Source)
at org.ofbiz.service.rmi.ExampleRemoteClient.<init>(ExampleRemoteClient.java:55)
at org.ofbiz.service.rmi.ExampleRemoteClient.main(ExampleRemoteClient.java:76)
Caused by: java.io.InvalidClassException:
org.ofbiz.service.rmi.socket.ssl.SSLClientSocketFactory; local class
incompatible: stream classdesc serialVersionUID = -6771263703492769955, local
class serialVersionUID = 2417260480409974286
at java.io.ObjectStreamClass.initNonProxy(Unknown Source)
at java.io.ObjectInputStream.readNonProxyDesc(Unknown Source)
at java.io.ObjectInputStream.readClassDesc(Unknown Source)
at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
at java.io.ObjectInputStream.readObject0(Unknown Source)
at java.io.ObjectInputStream.readObject(Unknown Source)
at sun.rmi.transport.tcp.TCPEndpoint.read(Unknown Source)
at sun.rmi.transport.LiveRef.read(Unknown Source)
at sun.rmi.server.UnicastRef2.readExternal(Unknown Source)
at java.rmi.server.RemoteObject.readObject(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at java.io.ObjectStreamClass.invokeReadObject(Unknown Source)
at java.io.ObjectInputStream.readSerialData(Unknown Source)
at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
at java.io.ObjectInputStream.readObject0(Unknown Source)
at java.io.ObjectInputStream.readObject(Unknown Source)
... 4 more