I am trying out a simple RMI example given at: http://patriot.net/~tvalesky/easyrmi.html. I have modified anything in it. Now, the issue is that when I run the RMI Server , i get the class not found exception :
Now, I have searched on google, and it seems that normally it is supposed to happen when client doesnt have the STUB file. What I dont understand is, why is it happening at the server end?
Please point out what I am missing.
Thanks for replying. I am using seperate folders for source and class files. This is what I have in the bin folder of this project:
I know about the RMI tutorial from sun,but this example seems shorter.. the thing is that I had this same issue with my actual project also.. That is why i used this simple example as an experimental stuff, just to see what is possible wrong. And my java version is :
Do you have all the classes on both the client and the server side?
Then doing an RMI call, you do not actually send the class over to the other side, only the information about what and how to trigger it. If the receiver doesn't have the class that is supposed to be called in the classpath, then it is hard to find it.
actually in this folder I have everything related with this sample example, the client and the server code and the stub file.. I am trying to run this first and then I will move on to making it work remotely. But the error at server end is just confusing. The client side doesnt even come into the picture, unless the server runs perfectly( locally first).
Then doing an RMI call, you do not actually send the class over to the other side, only the information about what and how to trigger it
its either due registry issue or rmic compatibility.first try manually i.e by starting rmiregistry if it fails then try programatically. and while generating stub and skel files use
"rmic -vcompat" command
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com