I am encountering an odd problem with Tomcat (6.0.18). When the Java
security manager is enabled, I get a ClassNotFoundException when I try
to load the Postgres database driver using Class.forName() and a URL
classloader pointed at a jar; its parent classloader is the Webapp
classloader.
But,
That blurb was already in the catalina.policy file.
-Original Message-
From: Martin Gainty [mailto:mgai...@hotmail.com]
Sent: Thursday, June 11, 2009 2:39 PM
To: Tomcat Users List
Subject: RE: Classloader Issues
inside TC you have to grant the container access to Jar
assuming
:21 PM
To: Tomcat Users List
Subject: RE: Classloader Issues
From: Jon Pearson [mailto:jon.pear...@sixnet.com]
Subject: Classloader Issues
When the Java security manager is enabled, I get a
ClassNotFoundException when I try to load the Postgres
database driver using Class.forName
...@unisys.com]
Sent: Thursday, June 11, 2009 3:20 PM
To: Tomcat Users List
Subject: RE: Classloader Issues
From: Jon Pearson [mailto:jon.pear...@sixnet.com]
Subject: RE: Classloader Issues
That blurb was already in the catalina.policy file.
I think Martin was just using
the database server.
Not sure why this manifested itself as a ClassNotFoundException instead
of a SecurityException telling me that I can't read the PostgreSQL
Driver JAR...
Thanks for your help, everyone!
-Original Message-
From: Jon Pearson
Sent: Thursday, June 11, 2009 1:14 PM
To: Tomcat
From: Jon Pearson [mailto:jon.pear...@sixnet.com]
Subject: RE: Classloaders
This is confounding because an ancestor classloader of my
URLClassLoader that made the classes in my plugin JAR
available should have access to org.postgresql.Driver.
In fact, one of them *must* because
2. The documentation on classloaders is here:
http://tomcat.apache.org/tomcat-6.0-doc/class-loader-howto.html
Thanks, but I've read through that a few times. It describes the
existing classloader layout but does not describe how to
avoid problems
when using your own within Tomcat.
I'm guessing that:
* sun.misc.Launcher$ExtClassLoader is the bootstrap class loader
Not quite - the bootstrap class loader is null; the
ExtClassLoader is the one that looks in the JRE's lib/ext directory.
* sun.misc.Launcher$AppClassLoader is the system class loader
*
PS I tried using a different URL
(file:/etc/BlueVueBatch/BVBDatabases/PostgreSQLDatabase.jar) instead of
the weirdly formed one below, but I get the same error message. I guess
it will load the classes in that JAR either way, but (as I expected),
the format of the URL does not make a difference
I'm having some trouble getting classes loaded by a new classloader to
be able to see classes which should have been loaded automatically from
WEB-INF/lib. All of the documentation that I've seen so far (FAQs,
mailing list searches, ...) describe problems that people have had using
the standard
-Original Message-
From: Konstantin Kolinko [mailto:knst.koli...@gmail.com]
Sent: Tuesday, May 26, 2009 4:44 PM
To: Tomcat Users List
Subject: Re: Classloaders
1. What tomcat version?
Tomcat v. 6.0.18, JVM 1.6.0_13, Ubuntu 9.04 on kernel 2.6.28-11
2. The documentation on
11 matches
Mail list logo