You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Peter Mutsaers <pe...@mutsaers.com> on 2001/09/21 16:46:52 UTC
WebappClassLoader ok in 4.0-B7, not in release
Hello,
Using 4.0-B7 I have been able to load oracle JDBC driver which
includes jdbc2-extention (javax.sql.*), by putting it in
$(CATALINA_HOME)/lib or $(CATALINA_HOME)/common/lib
Now with 4.0-release, I keep getting :
java.lang.LinkageError: Class javax/sql/PooledConnection violates loader constraints
at ctool.common.ConnectionCache.(ConnectionCache.java:93)
I've almost tried putting this driver everywhere (including
$(JAVA_HOME)/jre/lib/ext) but to no avail.
Is there any difference between 4.0-B7 and 4.0-release that might
cause this?
Looking at a source-diff, I see only the folliwing significant changes:
< clazz = defineClass(name, entry.binaryContent, 0,
< entry.binaryContent.length, codeSource);
---
> synchronized(entry) {
> ° Since all threads use the same ResourceEntry instance,
> it is
> ° the one which will contain the class
> if (entry.loadedClass == null) {
> clazz = defineClass(name, entry.binaryContent, 0,
> entry.binaryContent.length,
> codeSource);
> entry.loadedClass = clazz;
> } else {
> clazz = entry.loadedClass;
> }
> }
and
< synchronized (resourceEntries) {
< resourceEntries.put(name, entry);
---
> synchronized (this) {
> ° Ensures that all the threads which may be in a race to
> load
> ° a particular class all end up with the same
> ResourceEntry
> ° instance
> ResourceEntry entry2 = (ResourceEntry)
> resourceEntries.get(name);
> if (entry2 == null) {
> resourceEntries.put(name, entry);
> } else {
> entry = entry2;
> }
Could one of these changes have something to do with it?
Btw I already tried taking out javax.sql.* from the Oracle JDBC-driver
package and use jdbc2_0_ext.jar from SUN instead, it didn't make a
difference.
Thanks,
--
Peter Mutsaers | Dübendorf | UNIX - Live free or die
plm@gmx.li | Switzerland | Sent via FreeBSD 4.3-stable