new problem from unmarshalling

I have been encountering problem with unmarshalling when trying to run my RMI server. After reading many of the similar problem threads, I've changed the way running "rmiregistry". Now, I unset CLASSPATH before running rmiregistry before running my Server.

I still get the usual unmarshalling exception

C:\java\projects\rmi_ex2>myRMIServer

C:\java\projects\rmi_ex2>java -Djava.security.policy=wideopen.policy -Djava.rmi.

server.codebase=file:/c:/java/projects/rmi_ex2/ myRMIServer

Exception occurred: java.rmi.ServerException: Server RemoteException; nested exception is:

java.rmi.UnmarshalException: error unmarshalling arguments; nested excep

tion is: java.lang.ClassNotFoundException: myRMIImpl_Stub

But I also get this from the rmiregistry window

C:\java\projects\rmi_ex2>rmiregistry

security properties not found. using defaults.

Default cache directory c:\j2sdk1.4.1\jcache not found. JAR caching disabled.

MimeTable.load: file = c:\j2sdk1.4.1\lib\content-types.properties, java.io.FileN

otFoundException: c:\j2sdk1.4.1\lib\content-types.properties

java.io.FileNotFoundException: c:\j2sdk1.4.1\lib\content-types.properties

at java.io.FileInputStream.<init>(FileInputStream.java:56)

at java.io.FileInputStream.<init>(FileInputStream.java:75)

at sun.net.www.MimeTable.load(MimeTable.java:212)

at sun.net.www.MimeTable.<init>(MimeTable.java:43)

at sun.net.www.MimeTable.getDefaultTable(MimeTable.java:52)

at sun.net.www.protocol.file.FileURLConnection.connect(Compiled Code)

at sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLCon

nection.java:162)

at sun.net.www.protocol.http.HttpURLConnection.openConnectionCheckRedire

cts(Compiled Code)

at sun.applet.AppletClassLoader.loadClass(Compiled Code)

at sun.applet.AppletClassLoader.findClass(AppletClassLoader.java:630)

at sun.applet.AppletClassLoader.loadClass(AppletClassLoader.java:226)

at sun.rmi.server.RMIClassLoader.loadClass(RMIClassLoader.java:152)

at sun.rmi.server.MarshalInputStream.resolveClass(MarshalInputStream.jav

a:90)

at java.io.ObjectInputStream.inputClassDescriptor(ObjectInputStream.java

:711)

at java.io.ObjectInputStream.readObject(ObjectInputStream.java:328)

at java.io.ObjectInputStream.readObject(ObjectInputStream.java:225)

at java.io.ObjectInputStream.inputObject(Compiled Code)

at java.io.ObjectInputStream.readObject(ObjectInputStream.java:344)

at java.io.ObjectInputStream.readObject(ObjectInputStream.java:225)

at sun.rmi.registry.RegistryImpl_Skel.dispatch(RegistryImpl_Skel.java:98

)

at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:164)

at sun.rmi.transport.Transport.serviceCall(Transport.java:154)

at sun.rmi.transport.tcp.TCPTransport.handleMessages(Compiled Code)

at sun.rmi.transport.tcp.TCPTransport.run(Compiled Code)

at java.lang.Thread.run(Thread.java:466)

Any tips, ideas would be greatly appreciated as I have spend days on this problem!

Ku

[3183 byte] By [ku916] at [2007-9-27 19:43:20]
# 1

Hi,

you should try to use:

1) Server

java -Djava.security.policy=wideopen.policy

-Djava.rmi.server.codebase=file:c:\java\projects\rmi_ex2\

myRMIServer

2) Client

java -Djava.security.policy=wideopen.policy

-Djava.rmi.server.codebase=file:c:\java\project\rmi_ex2\

RMIClient

Bye

Filippo

pippomanga at 2007-7-6 23:02:51 > top of Java-index,Core,Core APIs...