tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shapira, Yoav" <Yoav.Shap...@mpi.com>
Subject RE: Connection pooling and Oracle connection in server.xml
Date Thu, 08 Apr 2004 15:06:30 GMT

Hi,
Why auth="SERVLET" and not "CONTAINER" if you're supplying the
username/password in server.xml?

Did you search the list archives about this topic before posting?

Yoav Shapira
Millennium Research Informatics


>-----Original Message-----
>From: prasad chaturvedula [mailto:popra_31@yahoo.com]
>Sent: Thursday, April 08, 2004 10:45 AM
>To: tomcat-user@jakarta.apache.org
>Subject: Connection pooling and Oracle connection in server.xml
>
>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(BasicDataSourc
e.ja
>va:529)
>        at
>org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.j
ava:
>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(Unknow
n
>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.
invo
>keNext(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.
invo
>keNext(Unknown
>Source)
>        at
>org.apache.catalina.authenticator.AuthenticatorBase.invoke(Unknown
>Source)
>        at
>org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.
invo
>keNext(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.
invo
>keNext(Unknown
>Source)
>        at
>org.apache.catalina.valves.ErrorDispatcherValve.invoke(Unknown
>Source)
>        at
>org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.
invo
>keNext(Unknown
>Source)
>        at
>org.apache.catalina.valves.ErrorReportValve.invoke(Unknown
>Source)
>        at
>org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.
invo
>keNext(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.
invo
>keNext(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:5
94)
>        at
>org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process
Conn
>ection(Http11Protocol.java:392)
>        at
>org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:5
65)
>        at
>org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPoo
l.ja
>va: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




This e-mail, including any attachments, is a confidential business communication, and may
contain information that is confidential, proprietary and/or privileged.  This e-mail is intended
only for the individual(s) to whom it is addressed, and may not be saved, copied, printed,
disclosed or used by anyone else.  If you are not the(an) intended recipient, please immediately
delete this e-mail from your computer system and notify the sender.  Thank you.


---------------------------------------------------------------------
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