Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » Tomcat Users »

RE: Database pool problem

Edson Alves Pereira

2003-12-05


 Maybe M$ Access isnĀ“t a good database to test. Could you use some
real database? Like MySQL, PostgreeSQL, HypersonicSQL, Oracle and so on.

> ----------
> De:  Chaikin, Yaakov Y (US SSA)[SMTP:yaakov.y.chaikin@(protected)]
> Responder:  Tomcat Users List
> Enviada:  sexta-feira, 5 de dezembro de 2003 13:07
> Para:  tomcat-user@(protected)
> Assunto:  Database pool problem
>
> Hi,
>
> I am having the following problem and how someone can point out to me
> what I am doing wrong.
>
> I am trying to configure Tomcat to have a database connection pool for
> my database, but when I try to access the database through a jsp, it
> gives me "wrong password" for the database... BUT it IS the right
> password.
>
> I am using MS Access as the database (not much choice right now) and
> have set up a System DNS.
>
> The weird part is that I am using the same values for a Realm I defined
> and I know that it DOES create a connection to the database and
> authentication works.
> The <Realm> that I have is this:
> <Realm
>  className="org.apache.catalina.realm.JDBCRealm"
>  connectionName="default"
>  connectionPassword="afecrelease2003"
>  connectionURL="jdbc:odbc:afec" debug="0"
>  driverName="sun.jdbc.odbc.JdbcOdbcDriver"
>  roleNameCol="UserRole"
>  userCredCol="UserPassword"
>  userNameCol="UserName"
>  userRoleTable="TestUsers"
>  userTable="TestUsers"
>  validate="true"/>
>
>
> My server.xml file has this <context>:
>
> <!--*** BEGIN AFECWEB Context ***-->
> <Context className="org.apache.catalina.core.StandardContext"
> cachingAllowed="true"
> charsetMapperClass="org.apache.catalina.util.CharsetMapper"
> cookies="true"
> crossContext="true"
> debug="0"
> displayName="AFECWEB"
> docBase="c:/corej2ee/stage/wls/afecWebApp/afecWEB.war"
> mapperClass="org.apache.catalina.core.StandardContextMapper"
> path="/afecWEB"
> privileged="false"
> reloadable="true"
> swallowOutput="false"
> useNaming="true"
> wrapperClass="org.apache.catalina.core.StandardWrapper">
>  <Logger className="org.apache.catalina.logger.FileLogger"
>  debug="0" directory="logs"
>  prefix="localhost_afecWEB_log."
>  suffix=".txt"
>  timestamp="true"
>  verbosity="99"/>
>  <Resource
>  name="jdbc/afecWEBDB"
>  auth="Container"
>  description="AFEC database; stores info about documents, login"
>  type="javax.sql.DataSource"
>  scope="Shareable" />
>  <ResourceParams name="jdbc/afecWEBDB">
>    <parameter>
>      <name>factory</name>
>  
> value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
>    </parameter>
>    <parameter>
>      <name>maxActive</name>
>      <value>1</value>
>    </parameter>
>    <parameter>
>      <name>maxIdle</name>
>      <value>1</value>
>    </parameter>
>    <parameter>
>      <name>maxWait</name>
>      <value>10000</value>
>    </parameter>
>    <parameter>
>      <name>driverClassName</name>
>      <value>sun.jdbc.odbc.JdbcOdbcDriver</value>
>    </parameter>
>    <parameter>
>      <name>url</name>
>      <value>jdbc:odbc:afec</value>
>    </parameter>
>    <parameter>
>      <name>user</name>
>      <value>default</value>
>    </parameter>
>    <parameter>
>      <name>password</name>
>      <value>afecrelease2003</value>
>    </parameter>
>    <parameter>
>      <name>connectionName</name>
>      <value>default</value>
>    </parameter>
>    <parameter>
>      <name>connectionPassword</name>
>      <value>afecrelease2003</value>
>    </parameter>
>    <parameter>
>      <name>connectionURL</name>
>      <value>jdbc:odbc:afec</value>
>    </parameter>
>    <parameter>
>      <name>driverName</name>
>      <value>sun.jdbc.odbc.JdbcOdbcDriver</value>
>    </parameter>
>  </ResourceParams>
> </Context>
> <!--*** END AFECWEB Context ***-->
>
> Any help would be greatly appreciated.
>
> Thanks.
>
> Yaakov Chaikin
> Software Engineer
> BAE SYSTEMS
> 301-838-6899 (phone)
> 301-838-6802 (fax)
> yaakov.y.chaikin@(protected)
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@(protected)
> For additional commands, e-mail: tomcat-user-help@(protected)
>
©2008 junlu.com - Jax Systems, LLC, U.S.A.