• 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
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Tim Cooke
Sheriffs:
  • Rob Spoor
  • Liutauras Vilda
  • paul wheaton
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Mikalai Zaikin
  • Carey Brown
  • Piet Souris
Bartenders:
  • Stephan van Hulst

java.rmi.ServerException: java .rmi.UnmarshallException

 
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
After compiling all the java files and generating the stub and skeleton for the remote class when I execute Register.java 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.

RemoteInterface.java



MyServer.java //Class MyServer implements the Remote interface




RegisterServer.java //java file which registers the remote server to directory service

MyClient.java //client class that sends the remote method invocation

A.java
 
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
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.
 
It sure was nice of your sister to lend us her car. Let's show our appreciation by sharing this tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic