Stub classes generation in rmi
843793Nov 10 2009 — edited Nov 16 2009i want to know how the class loading of stubs classes works in actual versions of java (1.5 and later)?
i had read a lot of documentation of rmi, and generally it says that the stubs classes and implemented interfaces classes of a remote object must be set on the client classpath (or codebase), but java 1.6 not generates stub classes on compilation.
This question is related with a error that i have now, I (and 5 people, but i'm the only one that knows RMI) have build a system with one server and many clients, when it run on my lan it works great, but when i install it on the production servers it fail to call server methods. There are not closed ports in PCs, and i have set hostname and codebase properties on server, and codebase property on the client.
The server publish his object (on opened ports) and bind it in a rmiRegistry previously launched. The problem occurs in the client, it don't have troubles to lookup and get the stub server, but when it try to call a remote method it throws a NoRouteToHostException (to the public ip of the server).
I have saw the whole [rmi faq|http://java.sun.com/j2se/1.4.2/docs/guide/rmi/faq.html] and the jguru rmi faq, even i have read the half of a OReilly's book of rmi, but still i don't know why this happen.
I was thinking if the stub class (that there isn't in the client classpath or codebase) have some relation?
If i create a registry inside the server, could it works?
I don't have installed any securityManager on server or client because i think is not necessary if i don't download classes, can this have an influence in the problem?
This is really frustrating to me.
I hope than someone have some idea that can help me.
Thanks!
sorry about my english.
Edited by: rhodan1 on Nov 10, 2009 7:37 PM