I
Ike
Ive got a major problem with Tomcat unable to find directories or a major
FUBAR on CLASSPATH. For example, since my servlet, which needs to access a
particular jar file (a MySQL Driver), and cannot find it in WEB-INF/lib, I
have unpacked it and put the corresponding class files into the proper
directories under WEB-INF/classes. Yes, I still get tyhe following
exception:
java.lang.NullPointerException
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:164)
at ConnectionPool.makeNewConnection(ConnectionPool.java:133)
The code to do this is simply:
private Connection makeNewConnection()
throws SQLException {
try {
// Load database driver if not already loaded
Class.forName("org.gjt.mm.mysql.Driver");
How can this NOT be found ? It SHOULD be looking for it in
WEB-INF/classes/org/gjt/mm/mysql/Driver.class
and that file IS there with all the appropriate read permissions.
FUBAR on CLASSPATH. For example, since my servlet, which needs to access a
particular jar file (a MySQL Driver), and cannot find it in WEB-INF/lib, I
have unpacked it and put the corresponding class files into the proper
directories under WEB-INF/classes. Yes, I still get tyhe following
exception:
java.lang.NullPointerException
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:164)
at ConnectionPool.makeNewConnection(ConnectionPool.java:133)
The code to do this is simply:
private Connection makeNewConnection()
throws SQLException {
try {
// Load database driver if not already loaded
Class.forName("org.gjt.mm.mysql.Driver");
How can this NOT be found ? It SHOULD be looking for it in
WEB-INF/classes/org/gjt/mm/mysql/Driver.class
and that file IS there with all the appropriate read permissions.