Java Mailing List Archive

http://www.junlu.com/

Google
Google
Mailing List
Home
Forum Home
JBoss - Java Application Server
Struts - A MVC web framework
Tomcat - JSP/Servlet container
iText - An open source PDF Java Library
JDOM - JDOM XML Parser
J2EE - A mailing list for Java(tm) 2 Platform, Enterprise Edition
J2EE Pattern - An interest list for Sun Java Center J2EE Pattern Catalog
Servlet - A mailing list for discussion about Sun Microsystem's Java Servlet API Technology
JSP - A mailing list about Java Server Pages specification and reference
Struts & Hibernate
Subjects
JSP editor plugin for eclipse ?
org apache jasper JasperException: Unable to compile class for JSP
Tomcat: Connection reset by peer: socket write error
Cannot retrieve definition for form bean null
Struts Tiles Tutorial (free Struts training)
Where do I download Tomcat 4 0 6?
Data Access Object (DAO) pattern, example DAO 's
Where to download Tomcat v 4 1 24 from?
Tomcat 5 0 16 Requested resource not available
Oracle Connection Pooling in 3 2 2
Servlet : Session invalidate
Servlet action is currently unavailable
Tomcat/Struts Unicode Encoding/Decoding problems
Tomcat and webapplication specific java library path
Running a Simple JMS Example
Mapping in workers2 properties
org apache jasper JasperException
Cannot find message resources under key org apache struts action
   MESSAGE
problem with html:text bean throwing exception
Cannot find message resources under key org apache struts action MESSAGE
invalid direct reference problem with solution
Tool for jsp debug Try Sysdeo Eclipse Plugin
Tomcat 5 Cannot load JDBC driver class 'null ' SQL state: null
weblogic ejbc
java properties file
Jboss 3 2 3 Coyote Can 't re
Tomcat 5, Apache2 and mod jk2 integration problem
JBoss example problem new to J2EE
url string for connecting jboss to oracle
Value attribute of <html:checkbox
javax servlet ServletException: BeanUtils populate
HTTP Status 404 The requested resource is not available
5 0 18: Windows XP Pro vs Windows 2000
 
Database pool problem

Database pool problem

2003-12-05       - By Chaikin, Yaakov Y (US SSA)

 Back
Reply:     1     2     3     4     5     6     7     8     9     10     >>  

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 Source code of 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 Source code of org.apache.catalina.core.StandardContext"
cachingAllowed="true"
charsetMapperClass="org.apache.catalina.util.CharsetMapper Source code of 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 Source code of 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 Source code of javax.sql.DataSource"
  scope="Shareable" />
  <ResourceParams name="jdbc/afecWEBDB">
    <parameter>
      <name>factory</name>
 
value>org.apache.commons.dbcp.BasicDataSourceFactory Source code of 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.