On Mar 6, 2013, at 1:49 PM, Rahul Somasunderam wrote:

> Hi,
> 
> I'm running Tomcat 7.0.23.

This is getting pretty old, you might want to consider upgrading.

> I've got a question about configuring the logging of DBCP Failures. 
> 
> I've go this in my context xml file.
> 
> <Context docBase="/home/foo/war/" path="/foo" reloadable="true">
>   <Resource
>       name="jdbc/hd/datasource"
>       auth="Container"
>       type="javax.sql.DataSource"
>       driverClassName="oracle.jdbc.OracleDriver"
>       url="jdbc:oracle:thin:@//localhost:1531/PROD"
>       username="foouser"
>       password="foopass"
>   />
> </Context>
> 
> When the username and password are correct, I have no trouble connecting and 
> my application works as expected.
> However when this is wrong, I get no indication of why it went wrong.

When it's wrong what happens?  How are you testing for failure?  Are you 
accessing a page in your app that requires the DB?

> I suppose Tomcat/DBCP is catching the exception and not logging it.

Hard to say for sure, but it's possible that DBCP may not even be connecting to 
the Database.  The "initialSize" parameter defaults to 0, so on startup it 
won't make any connections.  Maybe try setting "initialSize" to "1" and see 
what happens.

  https://commons.apache.org/dbcp/configuration.html

Dan

> When I try from outside of tomcat using jdbc, I see Oracle returning a 
> ORA-01017 error code and jdbc throwing an exception.
> 
> What must I do in the logging.properties to make tomcat log this?
> 
> R,
> rahul

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to