I don't think Tomcat will recognize classes12.zip no matter where you put
it.  Rename it to classes12.jar and place it under
<tomcat-home>webapps/<project>/web-inf/lib, <tomcat-home>/lib, or
<tomcat-home>/common/lib.  If Tomcat can't find the driver class, I'd expect
a ClassNotFoundException in your localhost_log file.  Look in
<tomcat-home>/logs.  Try using a debugger or putting a try/catch around your
code.

Also, if you're happy with hard-coding which db driver to use in your
application, don't bother with Class.forName(...).  It's purpose is to allow
your application to be unaware of the particular driver.  In that case you'd
do this:

String driverName = System.getProperty("driverName");
Class clazz = Class.forName(driverName);
DriverManager.registerDriver(clazz.newInstance());

Of course you'd give up the ability to use driver-specific extensions but
you could swap drivers and databases more easily.

john

-----Original Message-----
From:
[EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED].
org]On Behalf Of Vikramjit Singh
Sent: Wednesday, June 12, 2002 2:39 AM
To: '[EMAIL PROTECTED]'; JSP-INTEREST (E-mail)
Subject: driver manager does not work neither giving error


Hi,

I am deploying my application from tomcat 3.2.1 to tomcat 4.0.3. I have
installed tomcat 4.0.3 and its working fine. I have a servlet which is
loaded on start up. The servlet is for connection pooling which opens the
connections. I am using oracle driver classes12.zip for connection pooling.

In my OracleConnectionPool.java these lines are not being reached:

DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
Class.forName("oracle.jdbc.driver.OracleDriver");

and after these  lines the connection pooling methods of Oracle driver is
called.

neither is it throwing any error.

Since before these lines which ever code is there its working as the
system.out.println statements are being printed on the console. I know
Tomcat 4.0.3 has in built ConnectionPooling mechanism, hope thats not the
source of the problem. I am pretty much confused. Atleast it should throw an
error.

Thanking in advance.

Regards,
Vikramjit Singh,
Systems Engineer,
GTL Ltd.
Ph. 7612929-1031


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to