This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes Distributed Java and the fly likes Client requries .clss file of Remote Interface. Why? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Distributed Java
Reply Bookmark "Client requries .clss file of Remote Interface. Why?" Watch "Client requries .clss file of Remote Interface. Why?" New topic
Author

Client requries .clss file of Remote Interface. Why?

Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
I have RMI application, in which my remote interface has some methods which are taking one serialised objects as argument while some are returning serialised objects.
Now after giving the codebase corectly my client can download the stub properly provided the .class files of remote interfaces and all the serialised object's .class are copied to the client appropriate directory. If I remove these files from client side it gives me exception saying NoClassDefFound.
Is client really needs the remote interface's and serialized object's .class flies? As per my knowledge it should download from from the server. Can anybody hel me?
Thanks in advance
Hemant
paul wheaton
Trailboss

Joined: Dec 14, 1998
Posts: 19672
    ∞

When the object is serialized, it sends only the data that makes each object unique. The methods are not sent. Instead, all the class definition stuff must be on both sides.


permaculture forums
Lucy C
Ranch Hand

Joined: Feb 09, 2000
Posts: 53
As far as I know, the client application needs the remote interface class because it's referenced directly in the client code and is used when casting the returned stub reference to the appropriate type.
Any classes that the application needs for unmarshalling, eg the stub and the classes for method parameters and return values, should be available from the codebase. I think...
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: Client requries .clss file of Remote Interface. Why?
 
Similar Threads
Arguments / Return values for a Remote Method
Question from a Mock test
Ch-5 Q No.5 Coffee Cram Mock Exam
Running a RMI Application
how to get Clients CPU information on Server using Java RMI