Dynamic Class Loading & AbstractMethodError
Miguel Correia Ricardo <[email protected]>
| Newsgroups | gmane.comp.java.sun.rmi |
|---|---|
| Message-ID | <LISTSERV%[email protected]> |
Hello to everyone! I'm a newbie when it matters to dynamic class loading. What's happening is this: 1- I start rmiregistry 2- I Launch a RMI server with one method only. And this RMI stub is dynamically downloaded thru a ClassServer(like the one in the O'Reilly Java RMI book). Let's say that the only remote method that exists is: "public Task getTask();" (And Task being a interface) 3- In the implementation of that method i do "return new TaskMessage();" (that implements Task interface) 4- I launch the client, and the client get's the stub and Task.class dynamically.(Only these one by the way). 5- And for some reason, that i don't understand, java throws the following error: AbstractMethodError " "StubFileName".getTask(); " In the following line of the client source code: "Task t = stub.getTask();" Does anyone has a sugestion? And another question, i've noticed that java was only interested in the interface and in the stub. But if i have various concrete classes that implements the Task Interface, how does he know which one to get? Or that is done automatically when i invoke a method of that class... In these case i didn't had the chance to see how it run's, because it gives the error in the line stated before. I hope anyone can help. Thank you, Miguel =========================================================================== To unsubscribe, send email to [email protected] and include in the body of the message "signoff RMI-USERS". For general help, send email to [email protected] and include in the body of the message "help". For a list of frequently asked RMI questions please refer to: http://java.sun.com/j2se/1.3/docs/guide/rmi/faq.html To view past RMI-USERS postings, please see: http://archives.java.sun.com/archives/rmi-users.html