Win a copy of The Way of the Web Tester: A Beginner's Guide to Automating Tests this week in the Testing forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

java.rmi.ServerError !

xuen daan
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am new to java rmi. I am looking for help to explain a wired case I ran into. Here was what I was doing:
I have a public class "Book.class" stored at "c:\book\Book.class". Also I create a remote object at "c:\rmi\" in which a reference of Book class is used. (The Remote interface is under c:\rmi.). I compile the remote object in the following steps:
1. c:\rmi\>javac -classpath "c:\book;."
2. c:\rmi\>rmic -classpath "c:\book;." Rmitest
(Compiling seems works fine. All class and stub, skel are created.)
Then I start the rmiregistry, and try to run the Rmitest.class as "c:\rmi\>java -classpath "c:\book;." Rmitest". At the here, I can run the class, and always get error "java.rmi.ServerError: Error occurred in server thread; nested exception is: java.lang.NoClassDefFoundError: Book".
I think I have included "c:\book" in classpath. Book class should be found by program.
Did I miss something here? Thanks for any help.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic