You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Nancy Crisostomo Martinez <na...@correo.uqroo.mx> on 2002/09/11 23:32:50 UTC

[DBCP]Help! I can get success with JOCL connection pool

Hi again!
I'm using Tomcat 3.3, Oracle 8

I'm getting some troubles when trying to implement the Connection Pool
thru a JOCL file using Tomcat.
I have one Java package where I have all the classes that get
communication with the DB, so, rigth there I wrote the follow:

        conn =
     DriverManager.getConnection("jdbc:apache:commons:dbcp:/poolname");

All the JSP files that need some data of the DB, need to instantiate one
of these classes, invoque their methods and these classes provide them
with the DB information.

The problem is that the following message is appearing in Tomcat:

     java.sql.SQLException: No suitable driver
             at
     java.sql.DriverManager.getConnection(DriverManager.java:537)
             at
     java.sql.DriverManager.getConnection(DriverManager.java:199)
             at
     clasessae.CL_Conexion.conectarConBaseDeDatos(CL_Conexion.java:27)

             at
     clasessae.CL_Seguridad.usuarioValido(CL_Seguridad.java:43)
             at ValidaAcceso_1._jspService(ValidaAcceso_1.java:94)
             at
     org.apache.jasper.runtime.HttpJspBase.service(Unknown Source)
             at
     javax.servlet.http.HttpServlet.service(HttpServlet.java)
             at
     org.apache.tomcat.facade.ServletHandler.doService(Unknown
     Source)
             at org.apache.tomcat.core.Handler.invoke(Unknown
     Source)
             at org.apache.tomcat.core.Handler.service(Unknown
     Source)
             at
     org.apache.tomcat.facade.ServletHandler.service(Unknown
     Source)
             at
     org.apache.tomcat.core.ContextManager.internalService(Unknown
     Source)
             at
     org.apache.tomcat.core.ContextManager.service(Unknown Source)
             at
     org.apache.tomcat.modules.server.Http10Interceptor.processConnection(Unknown
     Source)
             at
     org.apache.tomcat.util.net.TcpWorkerThread.runIt(Unknown
     Source)
             at
     org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(Unknown
     Source)
             at java.lang.Thread.run(Thread.java:484)

I did:

   * drop the JOCL file (poolname.jocl) in the lib directory and put it
     in the classpath variable.
   * Put all the common jar files needed in the lib/common directory.
   * Put the jar file that contents all the classes of the Java package
     under lib/common directory
   * Create the TOMCAT_OPTS (value:
     -Djdbc.drivers=oracle.jdbc.driver.OracleDriver:org.apache.commons.dbcp.PoolingDriver)
     variable to pass the parameter to the VM for register the driver.

Help me!
What  am I doing wrong?
What do I need to do?

Thanks,
Nancy.