Wendy S said:
What version of Tomcat, what version of the JDK (and whose) are you using?
List the contents of the .jar file, are the classes properly arranged in
directories matching their package structure? (They _are_ packaged,
right?) What exact error message are you seeing?
Can you write a simple Java class with a main method that does basically the
same thing you're trying to do from a Servlet? (IOW, have your classes
already been tested thoroughly before you add Tomcat to the mix?)
Check the common directories and make sure there's nothing in there that
conflicts with the classes you're trying to load. (Did you maybe drop a
mysql driver in common/lib previously?)
I'm using tomcat 4.1.24 and Sun's jdk version 1.3.1-p8 built for a FreeBSD
4.8 system. The classes are listed and arranged properly. I moved the
mysql driver and DbConnectionBroker class to common/lib/mysql.jar and the
application finds these two classes but, I am using util.MySqlConnection a
class that I wrote and is jar'd up at
$CATALINA_HOME/webapps/myapp/WEB-INF/classes/lib/util.jar
$ jar tvf util.jar
0 Sun Jul 13 11:50:52 CDT 2003 META-INF/
71 Sun Jul 13 11:50:52 CDT 2003 META-INF/MANIFEST.MF
0 Sun Jul 13 11:50:40 CDT 2003 util/
1161 Sun Jul 13 11:43:18 CDT 2003 util/MySqlConnection.class
If I move util.jar to common/lib and restart tomcat, the application
works fine. But when I put the util.jar where I want it with the application
at myapp/WEB-INF/classes/lib/util.jar, I run into the problem.
The docmentation I'm reading says that the class loader should load the util.jar
from this location but its not. Do you know what I should check with the
tomcat configuration?
thanks