aspose file tools*
The moose likes Distributed Java and the fly likes Java.rmi.server exception 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.server exception" Watch "Java.rmi.server exception" New topic
Author

Java.rmi.server exception

Ram Bhattaru
Greenhorn

Joined: Nov 23, 2008
Posts: 3
Hi Please check the below code, I am receiving an error when I try to add a new client to the server.

It is always getting into the catch block and giving the below error
"remote exception occurred in the server thread; nested exception is : java.rmi.unmarshalexception; error unmarshaling arguments; nested exception is: java.lang.classnotfoundexception: ServImp_Stub

Please help me.

Thanks,
Ram

[Nitesh: Added code tags. Please UseCodeTags]
[ November 24, 2008: Message edited by: Nitesh Kant ]
Nitesh Kant
Bartender

Joined: Feb 25, 2007
Posts: 1638

So, as known from the error message, class ServImp_Stub is not found!
Now, the next question would be "what the #$%^ is this class all about"

Stub classes are used by RMI to communicate between two JVMs.
JDK 1.5 onwards you do not need to generate these classes instead RMI uses dynamic proxies to generate stubs at runtime for you. There are some ifs and buts that you can find out either by searching this forum or google.

If you are before JDK 1.5, then you need to generate the stub classes using rmic.

I hope you have gone through Sun RMI Tutorial, if not, kindly do that.


apigee, a better way to API!
Ram Bhattaru
Greenhorn

Joined: Nov 23, 2008
Posts: 3
Hi Nitesh,

All I am trying to do in this class is to add the client details to the server. When I specify the name, password and the IP of the client and click on register, it is throwing the exception. I am using J2SDK1.4.2_18 version.

Please help me.. I am not an expert in Java.
Nitesh Kant
Bartender

Joined: Feb 25, 2007
Posts: 1638

Hi Ram,

I understand that you are a beginner in java but unfortunately only thing i can help you in is to point you to an appropriate documentation to make you learn what is to be done.
This is the tutorial for jdk 1.4 RMI and this section tells you how to use rmic to generate stubs for your server.
Kindly go through the above links and try to understand RMI a little, otherwise you would not be able to get this going.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Java.rmi.server exception