File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Distributed Java and the fly likes java.rmi.ServerException:  java .rmi.UnmarshallException Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Distributed Java
Bookmark "java.rmi.ServerException:  java .rmi.UnmarshallException " Watch "java.rmi.ServerException:  java .rmi.UnmarshallException " New topic

java.rmi.ServerException: java .rmi.UnmarshallException

carox kaur
Ranch Hand

Joined: Mar 19, 2009
Posts: 52
After compiling all the java files and generating the stub and skeleton for the remote class when I execute class that registers and starts the server I get teh error:
java.rmi.ServerException: remote Exception occurred in server thread; nested Exception is :
java .rmi.UnmarshallException :error unmarshallingarguments ; nested exception is:
java.lang.ClassNotFoundException: MyServer_Stub

MyServer_Stub and MyServer_Skel.class files are there.....I am trying to pass the object of a class A that implements Serializable interface, I have tried passing the primitive data types which was successful but this is not working..... Codes are given below if anyone wants to have a look. //Class MyServer implements the Remote interface //java file which registers the remote server to directory service //client class that sends the remote method invocation
Nitesh Kant

Joined: Feb 25, 2007
Posts: 1638

How are you starting the rmi registry?
The registry should have your stub class in it's classpath or the server should enable dynamic class downloading.

By the way, if you are on JDK 5 or above you do not need stubs (skeletons are not used since 1.3 i guess). RMI uses dynamic proxies to generate stubs for the remote objects.

apigee, a better way to API!
I agree. Here's the link:
subject: java.rmi.ServerException: java .rmi.UnmarshallException
jQuery in Action, 3rd edition