• Post Reply Bookmark Topic Watch Topic
  • New Topic

java. lang. NoClassDefFoundError  RSS feed

 
seetharaman jayaraman
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi all,
i am working with rmi. For accessing remote methods returning primitives, serializable objects from client i dont have any problems. its working fine.

but i want to access remote methods which returns my own type of objects (Student, EmpFrame, LoginFrame, etc). when i tried from rmi client (another system) it connects with rmi server, but then produces the above exception (in Subject box!!).
docs, tutorials confused me more, different technological rmi updations from Sun, XMLDecoder, Serializable, codebase, etc.,
please help
Thanks
 
Nitesh Kant
Bartender
Posts: 1638
IntelliJ IDE Java MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If your question is that the client, on calling a remote method that returns your custom class instance, throws a NoClassDefFoundError, then you have two options:
  • Make your custom class available to the client i.e. place the class definition in the client's classpath
  • Specify a java.rmi.server.codebase property in the jvm exporting the server, specifying the url from where the class can be downlaoded. More on codebase here
  •  
    Consider Paul's rocket mass heater.
    • Post Reply Bookmark Topic Watch Topic
    • New Topic
    Boost this thread!