java.rmi.Unmarshalexception error unmarshaling arguements; nested exception

Hi,

My code throws following exception during running time.

java.rmi.Unmarshalexception error unmarshaling arguements; nested exception is; java.lang.ClassNotFoundExcpetion server_stub.class

But, the folder contains all the classes like interface class, implementation class and stub class also.. I am using jdk1.5 version.

I am also setting the classpath to the current folder..

set classpath=%classpath%;.;

What is the pbm actually..

Please anyone send reply..

Thanks..

[526 byte] By [bronze-starDukes] at [2007-11-26 12:15:31]
# 1

It all depends when you are getting the problem, which is in the part of the stack trace you haven't shown us:

1. in UnicastRemoteObject.exportObject(): the JVM containing the server can't find the stub.

2. In Registry.bind()//rebind(): the Registry can't find the stub.

3. In Registry.lookup(): the client can't find the stub.

platinumsta at 2007-7-7 14:19:29 > top of Java-index,Archived Forums,Socket Programming...
# 2
how to solve this problem
bronzestar at 2007-7-7 14:19:29 > top of Java-index,Archived Forums,Socket Programming...
# 3
Identify which of the situations in reply #1 applies, for a start.
platinumsta at 2007-7-7 14:19:29 > top of Java-index,Archived Forums,Socket Programming...
# 4
Hi dear,You should run rmiregistry from directory that contain .class files.
bronzestar at 2007-7-7 14:19:29 > top of Java-index,Archived Forums,Socket Programming...
# 5
Or add that directory or a common JAR file to its classpath.Or use the codebase feature.
platinumsta at 2007-7-7 14:19:29 > top of Java-index,Archived Forums,Socket Programming...
# 6

HI,

I am new to Java 1.6 , i used to do Rmi in jdk 1.4 and it was fine because I used to use rmic to create the STUB .

Now in 1.6 we use the "UnicastRemoteObject.exportObject" function to create dynamically the stub at run time and i am getting the same error when trying to run the serverApp telling me that it can't find my interface that extends Remote.

PLS , can you give me a detailed solution for the problem.

Thank u in advance.

bronzestar at 2007-7-7 14:19:29 > top of Java-index,Archived Forums,Socket Programming...
# 7
> PLS , can you give me a detailed solution for the> problem.PLS can you read the thread instead of just hijacking it.
platinumsta at 2007-7-7 14:19:29 > top of Java-index,Archived Forums,Socket Programming...
# 8

Sorry if I offended the great"ejp".

But my Problem is the same as the The title of the THREAD , and i explicitly explained the cause.

Yet , the solution is not in the code but in the rmiregistry.exe finding the remote class needed.

PLS , ejp try to reply when u actually have a solution!!!! Because i am not doing this for fun.

Thanks.

bronzestar at 2007-7-7 14:19:29 > top of Java-index,Archived Forums,Socket Programming...
# 9
If your problem is the same, the possible solutions are the same, and they have all been posted in the thread already.If you had read it you would have seen them, and you would have saved yourself a day too.
platinumsta at 2007-7-7 14:19:29 > top of Java-index,Archived Forums,Socket Programming...