see intermixed > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] > Sent: Friday, August 09, 2002 8:15 AM > To: [EMAIL PROTECTED] > Subject: Problems with class loader > > > Hello, > > we have problems with the tomcat class loaders. > > scenario: > Tomcat 4.0.4, jdk1.3 > 2 Applications > > App1:webapps/App1/WEB-INF/lib/x.jar > App2:webapps/App2/WEB-INF/lib/x.jar (the same .jar-file) > > x.jar: a.class, b.class, c.class > > b.class has a Hashtable (com.sun.java.util.collections.Hashtable) as > member-variable. (Hashtable is in the directory $CATALINA_HOME/lib/).
why is hashtable defined in $CATALINA_HOME/lib ? Is there a reason why allowing the JVM to provide the java classes is a problem? This shouldn't really matter in this case, but could cause problems keeping in sync with the current JVM version. > In the Hastable are Objects of the c.class. > > class a in App1 serialize class b and save it in persistence > (poet-)classes > in directory ($CATALINA_HOME/lib/). so, this poet(I'm not familiar with it) is located in $CATALINA_HOME/lib ? Is this the class that tries to create an instance of b.class? If so this is your problem. Classes in the /tomcat/lib or /common/lib can *NOT* see classes in the /web-inf/lib directories. Try moving x.jar to /tomcat/lib and see if it fixes your problem. Alternatively you could move poet to each web-inf/lib with x.jar, but they need to stay together. Charlie > In App2 class a load the serialized class from the > persistence classes and > deserialize it (--> class b). > Then, a ClassNotFoundException (class c) is thrown (see lower). Why??? > > class b and the Hashtable are loaded, but not class c. > > It is as follows: ? > The applicationClassLoader finds the class b and then the > StandardClassLoader finds the Hashtable and then (however??) the > StandardClassLoader try to load class c. And of course the > class loader > can't find the class c! > > > thanks > j�rgen > > > at > org.apache.catalina.loader.StandardClassLoader.loadClass(Stand > ardClassLoade > r.java:1127) > at > org.apache.catalina.loader.StandardClassLoader.loadClass(Stand > ardClassLoade > r.java:992) > at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:313) > at java.lang.Class.forName0(Native Method) > at java.lang.Class.forName(Class.java:195) > at java.io.ObjectInputStream.resolveClass(ObjectInputStream.java:654) > at > java.io.ObjectInputStream.inputClassDescriptor(ObjectInputStre > am.java:918) > at java.io.ObjectInputStream.readObject(ObjectInputStream.java:366) > at java.io.ObjectInputStream.readObject(ObjectInputStream.java:236) > at java.io.ObjectInputStream.inputObject(ObjectInputStream.java:1186) > at java.io.ObjectInputStream.readObject(ObjectInputStream.java:386) > at java.io.ObjectInputStream.readObject(ObjectInputStream.java:236) > at > com.sun.java.util.collections.Hashtable.readObject(Hashtable.java:773) > at java.lang.reflect.Method.invoke(Native Method) > at > java.io.ObjectInputStream.invokeObjectReader(ObjectInputStream > .java:2213) > at java.io.ObjectInputStream.inputObject(ObjectInputStream.java:1410) > at java.io.ObjectInputStream.readObject(ObjectInputStream.java:386) > at > java.io.ObjectInputStream.inputClassFields(ObjectInputStream.j > ava:2262) > at > java.io.ObjectInputStream.defaultReadObject(ObjectInputStream. > java:519) > at java.io.ObjectInputStream.inputObject(ObjectInputStream.java:1411) > at java.io.ObjectInputStream.readObject(ObjectInputStream.java:386) > at java.io.ObjectInputStream.readObject(ObjectInputStream.java:236) > > -- > GMX - Die Kommunikationsplattform im Internet. > http://www.gmx.net > > > -- > To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
