Originally posted by Avi Abrami:
Sachin,
This is just a guess, but you may need to assign a value to the java.rmi.server.codebase (RMI) property. You can find more details in the java.rmi Properties page of the java documentation.
Good Luck,
Avi.
Originally posted by Chris Shepherd:
Please make sure you search for UnmarshalException or "error unmarshalling return" or something else related to the problem in this forum. I know that some form of this question has been asked here about a buzillion times and I think at least some of them have suggestions and answers attatched. I'm not bashing your asking the question, I just want to make sure you searched for the answer as well. Usually its faster than waiting for a good reply to answer your question.
Chris
Originally posted by Chris Shepherd:
I think Avi's got it. For "normal" RMI, the client needs to have access to the _Stub file. I don't think the server actually needs it, but it does need the ProductImpl.class file itself. I think it generates the skeleton file itself on the fly by using reflection. You could try it and see. Of course if you provede the _Stub file to the server also, its not going to care I don't think.
Chris
Originally posted by Chris Shepherd:
Interesting Darryl. I think it must have been some sort of classpath error or something. By starting it within your code, it may have used the same classpath info as your code was using. There is actually an even easier way to start your registry without having to use an external .exec command. try this instead:
Sachin, I know that something like that is possible where you actually don't have to have the _stub on your client machine to start with, but I've never had to deal with that issue so I don't know exactly how to do it. It is NOT mandatory that your server be running a http/ftp server to operate that way, but your stub/file must be downloadable from somewhere. Even if its on a totally different host/site. All you care about is collecting the needed file so you know what interface you wil be using. You also have to make sure that it is kept current with the same one that your server is using or I think it might possibly fail.
As to the different implementations of the interface, it doesn't matter what you do on the server side of the interface. As long as it matches the interface stub the client is working with, your client/server interface should work fine.
HTH
Chris
I am Arthur, King of the Britons. And this is a tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
|