tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From prasad chaturvedula <popra...@yahoo.com>
Subject Connection pooling and Oracle connection in server.xml
Date Thu, 08 Apr 2004 14:44:44 GMT
Hi guys,

I have a problem with connecting to oracle db using
the commons dbcp connection pooling.  Here is teh
content of my server.xml file--


</ResourceParams>
          <Resource name="jdbc/myoracle"
auth="SERVLET" type="javax.sql.DataSource"/>
          <ResourceParams name="jdbc/myoracle">
          <parameter> <name>factory</name>
         
<value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
          </parameter>
          <parameter> <name>driverClassName</name>
         
<value>oracle.jdbc.driver.OracleDriver</value>
         </parameter>
           <parameter> <name>url</name>
         
<value>jdbc:oracle:thin:apthrdb@192.9.200.101:1521:apt</value>
          </parameter>
          <parameter> <name>username</name>
          <value>apthrdb</value>
          </parameter>
           <parameter> <name>password</name>
          <value>apthrdb</value>
         </parameter>
           <parameter> <name>maxActive</name>
          <value>20</value>
         </parameter>
         <parameter> <name>maxIdle</name>
         <value>10</value>
         </parameter>
         <parameter> <name>maxWait</name>
         <value>-1</value>
         </parameter>
         </ResourceParams>


and here is teh content of my web.xml--

<resource-ref>
    <description>Oracle Datasource
example</description>
    <res-ref-name>jdbc/myoracle</res-ref-name>
    <res-type>javax.sql.DataSource</res-type>
    <res-auth>Container</res-auth>
    </resource-ref>

This is in $MY_CONTEXT/WEB-INF/web.xml.

I am getting teh following error message while trying
to execute a db query from my jso page-

I am at1
I am at2
I am here
I am here
I am here
I am here
I am here
java.sql.SQLException: Cannot load JDBC driver class
'null'
        at
org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:529)
        at
org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:312)
        at
aptransco.hrd.Testdb.getTestdb(Testdb.java:32)
        at
org.apache.jsp.testdb_jsp._jspService(testdb_jsp.java:53)
        at
org.apache.jasper.runtime.HttpJspBase.service(Unknown
Source)
        at
javax.servlet.http.HttpServlet.service(HttpServlet.java)
        at
org.apache.jasper.servlet.JspServletWrapper.service(Unknown
Source)
        at
org.apache.jasper.servlet.JspServlet.serviceJspFile(Unknown
Source)
        at
org.apache.jasper.servlet.JspServlet.service(Unknown
Source)
        at
javax.servlet.http.HttpServlet.service(HttpServlet.java)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Unknown
Source)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(Unknown
Source)
        at
org.apache.catalina.core.StandardWrapperValve.invoke(Unknown
Source)
        at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(Unknown
Source)
        at
org.apache.catalina.core.StandardPipeline.invoke(Unknown
Source)
        at
org.apache.catalina.core.ContainerBase.invoke(Unknown
Source)
        at
org.apache.catalina.core.StandardContextValve.invoke(Unknown
Source)
        at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(Unknown
Source)
        at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(Unknown
Source)
        at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(Unknown
Source)
        at
org.apache.catalina.core.StandardPipeline.invoke(Unknown
Source)
        at
org.apache.catalina.core.ContainerBase.invoke(Unknown
Source)
        at
org.apache.catalina.core.StandardContext.invoke(Unknown
Source)
        at
org.apache.catalina.core.StandardHostValve.invoke(Unknown
Source)
        at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(Unknown
Source)
        at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(Unknown
Source)
        at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(Unknown
Source)
        at
org.apache.catalina.valves.ErrorReportValve.invoke(Unknown
Source)
        at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(Unknown
Source)
        at
org.apache.catalina.core.StandardPipeline.invoke(Unknown
Source)
        at
org.apache.catalina.core.ContainerBase.invoke(Unknown
Source)
        at
org.apache.catalina.core.StandardEngineValve.invoke(Unknown
Source)
        at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(Unknown
Source)
        at
org.apache.catalina.core.StandardPipeline.invoke(Unknown
Source)
        at
org.apache.catalina.core.ContainerBase.invoke(Unknown
Source)
        at
org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
        at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:594)
        at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:392)
        at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565)
        at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:619)
        at java.lang.Thread.run(Thread.java:534)

Thanks in advance.

Prasad



__________________________________
Do you Yahoo!?
Yahoo! Small Business $15K Web Design Giveaway 
http://promotions.yahoo.com/design_giveaway/

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message