Re: ClassCastException after retrieving an Entry
Christian Hager <[email protected]> Fri, 5 Jan 2007 10:28:25 +0100
| Newsgroups | gmane.comp.java.sun.javaspaces |
|---|---|
| Organization | Analytic Company GmbH |
| Message-ID | <00d201c730ab$d9c621d0$0b00a8c0@acwschristian> |
Ok I've put the code in. It now looks like the following. Entry entry = javaSpace.take (taskTmpl, txn, 30000); ClassLoaderUtil.displayClassLoaderTree(entry.getClass ().getClassLoader()); ClassLoaderUtil.displayClassLoaderTree(TaskEntry.class.getClassLoader()); ... and that is what I get. ClassLoader Tree has 5 levels cl0 -- Boot ClassLoader | cl1 -- ClassLoader sun.misc.Launcher$ExtClassLoader@92e78c: file:/F:/Java/jre/lib/ext/dnsns.jar, file:/F:/Java/jre/lib/ext/localedata.jar, file:/F:/Java/jre/lib/ext/sunjce_provider.jar, file:/F:/Java/jre/lib/ext/sunpkcs11.jar | cl2 -- ClassLoader sun.misc.Launcher$AppClassLoader@a39137: file:/F:/Java/eclipse/startup.jar | cl3 -- ClassLoader org.eclipse.core.runtime.internal.adaptor.ContextFinder@6dbdc9: is unknown ClassLoader type | cl4 -- ClassLoader sun.rmi.server.LoaderHandler$Loader@f7ce53["ahttp://computegrid:[email protected]/codebase/codebase.jar"]: ahttp://computegrid:[email protected]/codebase/codebase.jar ClassLoader Tree has 3 levels cl0 -- Boot ClassLoader | cl1 -- ClassLoader org.eclipse.osgi.baseadaptor.BaseAdaptor$ParentClassLoader@23f1bb: is unknown ClassLoader type | cl2 -- ClassLoader org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader@1794494: is unknown ClassLoader type Does that help? > > And there's the answer - yes that's very important because eclipse has > it's way of doing classloading and Blitz and other Jini bits have > another way of structuring it all. > > I think it's time to insert some usages of: > > com.sun.jini.start.ClassLoaderUtil.displayClassLoaderTree() > > For each of these classloaders... > > e.g. > > ClassLoaderUtil.displayClassLoaderTree(TaskEntry.class.getClassLoader()); > =========================================================================== 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