• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Java.rmi.server exception

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 ]
 
Bartender
Posts: 1638
IntelliJ IDE MySQL Database Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Ram Bhattaru
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 1638
IntelliJ IDE MySQL Database Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic