tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Caroline Jen <jiapei_...@yahoo.com>
Subject Re: Tomcat Connection Pool Configuration Problem (Cannot Establish the Connection)
Date Wed, 15 Sep 2004 03:40:49 GMT
Help may be truly needed.  A couple of more people are
reporting the exactly the same problem with the Tomcat
5.0.27 at http://java.sun.com --> Forums --> JDBC

I am not the only one having this problem.
--- Caroline Jen <jiapei_jen@yahoo.com> wrote:

> I have been struggling with this problem for more
> than
> a week. I did follow the JDBC datasource howto.  And
> I
> posted all the steps that I have taken to configure
> the Tomcat 5.0.27 connection pool.  Nobody has
> really
> helped to look into the problem.
> 
> I will post all my configuration steps again below
> the
> error message.  The Tomcat logs file shows:
> 
> ==============================================
> root cause 
> 
> org.dhsinfo.content.exceptions.PageDAOSysException:
> SQLException: Cannot create JDBC driver of class ''
> for connect URL 'null'
> 
>
org.dhsinfo.content.dao.OraclePageDAO.findPages(OraclePageDAO.java:51)
> 
>
org.dhsinfo.content.PageService.getPages(PageService.java:18)
> 
>
org.dhsinfo.content.SelectPage.execute(SelectPage.java:29)
> =================================================
> 
> The configuration steps that I have taken are listed
> below:
> 
> Step 1. 
> 
> Jakarta-Commons DBCP 1.2.1 
> Jakarta-Commons Collections 2.1.1 
> Jakarta-Commons Pool 1.2
>  
> These jar files are installed in 
> $CATALINA_HOME/common/lib. 
> 
> Step 2.
> download classes12.zip rename it to classes12.jar
> and
> place it in 
> TOMCAT_HOME\common\lib
> 
> Step 3. C:\jakarta-tomcat-5.0.27\conf\server.xml
> configuration
> 
> I did put the driver and URL in the
> C:\jakarta-tomcat-5.0.27\conf\server.xml file (The
> location is below the         <Logger
> className="org.apache.catalina.logger.FileLogger"
> directory="logs"  prefix="localhost_log."
> suffix=".txt" timestamp="true"/> and before the
> closing </Host> tag).  
> 
> <Context path="/DBTest" docBase="DBTest"
>         debug="5" reloadable="true"
> crossContext="true">
> 
>   <Logger
> className="org.apache.catalina.logger.FileLogger"
>              prefix="localhost_DBTest_log."
> suffix=".txt"
>              timestamp="true"/>
>    <Resource name="jdbc/OracleDB" auth="Container"
>              type="javax.sql.DataSource"/> 
> 
>    <ResourceParams name="jdbc/OracleDB">
>       <parameter>
>          <name>factory</name>
>         
>
<value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
>       </parameter>
>       <parameter>
>          <name>maxWait</name>
>          <value>5000</value>
>       </parameter>
>       <parameter>
>          <name>maxActive</name>
>          <value>20</value>
>       </parameter>
>       <parameter>
>          <name>password</name>
>          <value>cmis001</value>
>       </parameter>
>       <parameter>
>          <name>url</name>
>         
>
<value>jdbc:oracle:thin:@172.19.47.22:1521:devora2</value>
>       </parameter>
>       <parameter>
>          <name>driverClassName</name>
>         
> <value>oracle.jdbc.driver.OracleDriver</value>
>       </parameter>
>       <parameter>
>          <name>maxIdle</name>
>          <value>10</value>
>       </parameter>
>       <parameter>
>          <name>username</name>
>          <value>cmis</value>
>       </parameter>
>       <parameter>
>          <name>removeAbandoned</name>
>          <value>true</value>
>       </parameter>
>       <parameter>
>          <name>removeAbandonedTimeout</name>
>          <value>60</value>
>       </parameter>
>       <parameter>
>          <name>logAbandoned</name>
>          <value>true</value>
>       </parameter>
> </ResourceParams>
> </Context>
> 
> Step 4. web.xml Configuration (the one in
> MyApp/WEB-INF directory)
> 
> add these lines after the <taglib> element
> 
> **********************
> <resource-ref>
>  <description>Oracle Datasource</description>
>  <res-ref-name>jdbc/OracleDB</res-ref-name>
>  <res-type>javax.sql.DataSource</res-type>
>  <res-auth>Container</res-auth>
> </resource-ref>
> **********************
> 
> 
> 
> --- Peng Tuck Kwok <pengtuck@gmail.com> wrote:
> 
> > On Tue, 14 Sep 2004 13:56:48 -0700 (PDT), Caroline
> > Jen
> > <jiapei_jen@yahoo.com> wrote:
> > 
> > > When I configured the Tomcat 5.0.27, I did put
> the
> > > driver and URL in the
> > > C:\jakarta-tomcat-5.0.27\conf\server.xml file
> (The
> > 
> > That's great, but did you actually put the driver
> in
> > a location that
> > tomcat could find it  ?
> > Like here: $CATALINA_HOME/common/lib ?  Dump your
> > driver there (make
> > sure it's a jar file),
> > restart tomcat. Check out the jdbc datasource
> howto
> > if you've missed
> > anything else.
> > 
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> > tomcat-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail:
> > tomcat-user-help@jakarta.apache.org
> > 
> > 
> 
> 
> 
> 	
> 		
> __________________________________
> Do you Yahoo!?
> New and Improved Yahoo! Mail - 100MB free storage!
> http://promotions.yahoo.com/new_mail 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> tomcat-user-help@jakarta.apache.org
> 
> 



		
_______________________________
Do you Yahoo!?
Declare Yourself - Register online to vote today!
http://vote.yahoo.com

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