Hi all I have a web application which use Hibernate to retrieve data in the database. And in the server side some execeptions come out at regular interval. Below is the exce
This is the code that triggers this log statement in C3P0:
if ( logger.isLoggable( MLevel.FINEST ) )
logger.log( MLevel.FINEST, this + " closed by a client.",
new Exception("DEBUG -- CLOSE BY CLIENT STACK TRACE") );
Note that:
This is not an exception, the new Exception
is used merely to show execution path for debug purposes.
And yes, this is only a debug message (actually, FINEST
is the lowest possible level in java.util.logging
).
To wrap this up: ignore and tune your logging levels to skip these.
I found where the error is: I think that it appears when some object calls deliberately
com.mchange.v2.c3p0.ComboPooledDataSource.close
I have configured this class in spring. When I put destroy-method="close" the error appears.
Obviously, I've removed it and the problem is now solved.
Hibernate connection close work like this way so you no need remove the destroy-method="close".
public synchronized void close() throws SQLException
{
close(null);
}
private void close(Throwable cause) throws SQLException
{
<--statement-->
if(cause == null)
{
invalidatingException = NORMAL_CLOSE_PLACEHOLDER;
if(logger.isLoggable(MLevel.FINEST))
logger.log(MLevel.FINEST, this + " closed by a client.", new Exception("DEBUG -- CLOSE BY CLIENT STACK TRACE"));
<--statement-->
}