Re: [c3p0-users] SQL Exception while using c3p0
Status: Beta
Brought to you by:
swaldman
From: Steve W. <swa...@mc...> - 2013-05-23 07:41:24
|
hi, all you are observing here is an Exception followed by a Connection test failing, that is, an Oracle Connection has died. that's a perfectly ordinary thing to happen in the life of a running Connection pool. that Connections sometimes die is why the pool tests them. (certainly Connection deaths can be a symptom of a larger problem, if they occur to frequently or for no reason. but usually they are just normal albeit infrequent events.) the only problem here is that the Connection failure is observed in the course of handling a client's Exception. it's best if clients never see a bad Connection. the only testing visible here is a passive response to a client Exception. you want an active Connection testing regime so that clients don't see the Exception. please see http://www.mchange.com/projects/c3p0/#configuring_connection_testing you are logging at DEBUG. even with a good Connection testing regime, at this log level, you will see occasional test failures logged. that's perfectly normal, these failures are logged at DEBUG for debugging purposes. in general, c3p0 libraries should be logged at INFO; logging becomes too verbose (and includes upsetting stack traces) at DEBUG levels. good luck, steve On May 22, 2013, at 6:01 PM, Prem chandiran wrote: > Hi All, > I am getting following exception while using c3P0. I kindly request to help me resolving it. > I am using Oracle Database. > Exception-1: > ========== > DEBUG: com.mchange.v2.c3p0.impl.NewPooledConnection@147377d handling a throwable. > java.sql.SQLException: Io exception: Connection timed out > at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112) > at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:146) > at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:255) > at oracle.jdbc.driver.T4CCallableStatement.executeForRows(T4CCallableStatement.java:973) > at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1160) > at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3285) > at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:3368) > at oracle.jdbc.driver.OracleCallableStatement.executeUpdate(OracleCallableStatement.java:4245) > at com.mchange.v2.c3p0.impl.NewProxyCallableStatement.executeUpdate(NewProxyCallableStatement.java:2160) > > > > Exception-2: > ========== > > DEBUG: Connection oracle.jdbc.driver.T4CConnection@710bd1 failed default > system-table Connection test with an Exception! > java.sql.SQLException: Closed Connection > at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112) > at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:146) > at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:208) > at oracle.jdbc.driver.PhysicalConnection.getMetaData(PhysicalConnection.java:1508) > at com.mchange.v2.c3p0.impl.DefaultConnectionTester.activeCheckConnectionNoQuery(DefaultConnectionTester.java:185) > at com.mchange.v2.c3p0.impl.DefaultConnectionTester.activeCheckConnection(DefaultConnectionTester.java:62) > at com.mchange.v2.c3p0.impl.DefaultConnectionTester.statusOnException(DefaultConnectionTester.java:143) > at com.mchange.v2.c3p0.AbstractConnectionTester.statusOnException(AbstractConnectionTester.java:82) > at com.mchange.v2.c3p0.impl.NewPooledConnection.handleThrowable(NewPooledConnection.java:437) > at com.mchange.v2.c3p0.impl.NewProxyCallableStatement.executeUpdate(NewProxyCallableStatement.java:2174) > > > > I kindly request help me . > > > Regards, > > Prem > > ------------------------------------------------------------------------------ > Try New Relic Now & We'll Send You this Cool Shirt > New Relic is the only SaaS-based application performance monitoring service > that delivers powerful full stack analytics. Optimize and monitor your > browser, app, & servers with just a few lines of code. Try New Relic > and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_may_______________________________________________ > c3p0-users mailing list > c3p...@li... > https://lists.sourceforge.net/lists/listinfo/c3p0-users |