You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Meichun Li <li...@metalab.unc.edu> on 2002/07/05 15:40:22 UTC
Connection Pool/ SQLException problem
Hi,
Thanks all for the great help in connection pool.
I am using DBCP for the pool now. I is almost working now!:-)
It works perfectly in looking up the datasource, but
I got SQLException when trying to connect to database. Please give me
some guide. Thanks!
java.lang.RuntimeException: java.sql.SQLException: Invalid authorization
specification: Access denied for user: 'nobody@divahouse.metalab.unc.edu'
(Using password: YES)
The related java code is: Connection con=ds.getConnection();
I configured the username, password and driverClass and url in server.xml
as below:
<Context path="/osrt/osprey/webapps"
docBase="/public/html/osrt/osprey/webapps"
debug="0" reloadable="true">
<Resource name="jdbc/ospreyDb" auth="Container"
type="javax.sql.DataSource"/>
<ResourceParams name="jdbc/ospreyDb">
<parameter>
<name>factory</name>
<value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
</parameter>
<parameter>
<name>maxActive</name><value>100</value>
</parameter>
<parameter><name>maxIdle</name><value>30000</value></parameter>
<parameter><name>maxWait</name><value>100</value></parameter>
<parameter><name>user</name><value>xxxxx</value></parameter>
<parameter><name>password</name><value>xxxx</value></parameter>
<parameter><name>driverClassName</name>
<value>org.gjt.mm.mysql.Driver</value></parameter>
<parameter><name>url</name>
<value>jdbc:mysql://trance.metalab.unc.edu:3306/osprey</value></parameter>
</ResourceParams>
</Context>
--
Meichun Li
Ibiblio.org
919-962-5646
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>