commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dirk Verbeeck <>
Subject Re: [DBCP] Possible to turn off logging that is going to System.out?
Date Tue, 30 Sep 2003 20:57:24 GMT
I fixed this issue a few minutes ago.

It will be in the next release candidate (v1.1RC2) or you can use a 
night build of course..


Peter Smith wrote:

>Hi, I've created a BasicDataSource and when I purposely shut down my db to test error
handling, I get 
>debug print statements going to STDOUT from somwhere within commons-dbcp.jar, when I attempt
>obtain a connection.  How do I turn this off?  I'm fine w/ the error msg - I just don't
want it getting logged 
>twice - I'd like to log it myself, only once.
>I tried the following (setLogWriter()) to no avail -> I still get stuff coming to STDOUT:
>	    BasicDataSource ds = new BasicDataSource();
>	    ds.setUrl(p.getProperty("db.url"));
>	    ds.setDriverClassName(p.getProperty("db.driver"));
>                         ...etc...
>                         // try to turn off logging
>	    FileWriter  fw = new FileWriter("nul"); // on NT
>                         PrintWriter pw = new PrintWriter( fw );
>                         ds.setLogWriter( pw );
>I tried to trace through the source code and I couldn't see why my approach above isn't
working.  It's very 
>possible I'm mis-tracing the code....(not in a debugger that steps through the source)...
>Error message:
>DBCP borrowObject failed: java.sql.SQLException: ORA-01034: ORACLE not available
>ORA-27101: shared memory realm does not exist
>HP-UX Error: 2: No such file or directory

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message