Search the archives!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
revisiting ClassCastExceptions
- From: jay.baker@xxxxxxxxxxxxxx (Jay Baker)
- Subject: revisiting ClassCastExceptions
- Date: Fri, 29 Sep 2000 15:09:27 -0500
I did review the recent discussion on the 'dreaded' ClassCastException and it was helpful. I've crossed my first bridge. Now the second ... I have an object in the JNDI that implements (my own interface) IMonitor. It has a method addObject(IMonitoredObjectobj). My implementation of these two classes are no where near my servlet classpath, or the java classpath. They are in my weblogic classpath. Also, there are no other places where these classes might be hiding. I have a servlet that gets my object out of the JNDI. This works now, yea! However, I am getting a ClassCastException when trying to call Monitor.addObject() with a new IMonitoredObject created within my servlet. I see the following : error inserting into monitor java.lang.ClassCastException: jndistuff.Monitored this object = jndistuff.MakeState this class loader = weblogic.utils.classloaders.RecursiveReloadOnModifyClassLoader$Slave monitor class = ...Monitor monitor class loader = weblogic.boot.ServerClassLoader inserted class = jndistuff.Monitored inserted object class loader = weblogic.boot.ServerClassLoader Monitor implements IMonitor and jndistuff.Monitored implements IMonitoredObject. It seems they have the same ClassLoader and they implement the correct interfaces. What else am I missing? Thanks for any input. -- Jay --- To unsubscribe, mail advanced-java-unsubscribe@xxxxxxxxxxxxxxxx To get help, mail advanced-java-help@xxxxxxxxxxxxxxxx
- Prev by Date: These classes are not compiling .. Can somebody help ?
- Next by Date: Problems with JavaIDL on Solaris
- Previous by thread: These classes are not compiling .. Can somebody help ?
- Next by thread: Problems with JavaIDL on Solaris
- Index(es):