commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From José Antonio Pérez Testa <>
Subject Re: [DBCP] Possible to turn off logging that is going to System.out?
Date Tue, 30 Sep 2003 09:01:11 GMT
Hi Peter,
I've found that:

I hope this would help.

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
>SIZE does matter - The UK's biggest *Free* Web based mail - 10 MB Free 
>To unsubscribe, e-mail:
>For additional commands, e-mail:

Este correo electrónico y, en su caso, cualquier fichero anexo al mismo, contiene información
de carácter confidencial exclusivamente dirigida a su destinatario o destinatarios. Queda
prohibida su divulgación, copia o distribución a terceros sin la previa autorización escrita
de Indra. En el caso de haber recibido este correo electrónico por error, se ruega notificar
inmediatamente esta circunstancia mediante reenvío a la dirección electrónica del remitente.

The information in this e-mail and in any attachments is confidential and solely for the attention
and use of the named addressee(s). You are hereby notified that any dissemination, distribution
or copy of this communication is prohibited without the prior written consent of Indra. If
you have received this communication in error, please, notify the sender by reply e-mail

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

View raw message