Hi Peter,
I've found that:
http://www.mail-archive.com/[EMAIL PROTECTED]/msg26483.html

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 to 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

Thanks!

SIZE does matter - The UK's biggest *Free* Web based mail - 10 MB Free mail.lycos.co.uk




------------------------------------------------------------------------

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


------------------------------------------------------------------------------------------------------------------- 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to