Re: ClassCastException after retrieving an Entry
Christian Hager <[email protected]> Thu, 4 Jan 2007 16:55:20 +0100
| Newsgroups | gmane.comp.java.sun.javaspaces |
|---|---|
| Organization | Analytic Company GmbH |
| Message-ID | <004001c73018$bca9a010$0b00a8c0@acwschristian> |
Hello, As for the PREFFERED.LIST file I don't really know. I didn't create on so I asume there is none. I'm using the Standard Installation of Jini 2.1 and Blitz 1.29 on Win XP. I tried the thing with the classloader and it gives me My Entry Loader: sun.rmi.server.LoaderHandler$Loader@1930ebb["ahttp://computegrid:[email protected]/codebase/codebase.jar"] My TaskEntry Loader: org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader@1079781 for the following code Entry entry = javaSpace.take (taskTmpl, txn, 30000); System.out.println("My Entry Loader: "+ entry.getClass().getClassLoader()); System.out.println("My TaskEntry Loader: "+ TaskEntry.class.getClassLoader()); TaskEntry task = (TaskEntry) javaSpace.take (taskTmpl, txn, 30000); the Exception then occurs in the 4th line of the code and is as follows java.lang.ClassCastException: org.ac.computegrid.TaskEntry at org.ac.computegrid.worker.GenericWorker.loop(GenericWorker.java:123) at org.ac.mvc.ExtThread.run(ExtThread.java:399) at java.lang.Thread.run(Unknown Source) The TaskEntry class is in the codebase and as seen above and seems to be taken from there. Since it seems to be a classloading problem it might also be important that my worker is an eclipse rcp plugin. Thanks again for any help Christian Hager =========================================================================== To unsubscribe, send email to [email protected] and include in the body of the message "signoff JAVASPACES-USERS". For general help, send email to [email protected] and include in the body of the message "help". To view past JAVASPACES-USERS postings, please see: http://archives.java.sun.com/archives/javaspaces-users.html