gpt4 book ai didi

hibernate - 奇怪的错误:通过客户堆栈跟踪关闭

转载 作者:行者123 更新时间:2023-12-03 11:40:51 24 4
gpt4 key购买 nike

大家好,我有一个使用Hibernate检索数据库中数据的Web应用程序。并且在服务器端,某些想法会定期出现。以下是异常日志。

    16:04:22,227 DEBUG NewPooledConnection:491 - com.mchange.v2.c3p0.impl.NewPooledConnection@ef46613 closed by a client.
java.lang.Exception: DEBUG -- CLOSE BY CLIENT STACK TRACE
at com.mchange.v2.c3p0.impl.NewPooledConnection.close(NewPooledConnection.java:491)
at com.mchange.v2.c3p0.impl.NewPooledConnection.close(NewPooledConnection.java:191)
at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.destroyResource(C3P0PooledConnectionPool.java:470)
at com.mchange.v2.resourcepool.BasicResourcePool$1DestroyResourceTask.run(BasicResourcePool.java:964)
at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:547)
16:09:42,310 DEBUG C3P0PooledConnectionPool:476 - Successfully destroyed PooledConnection: com.mchange.v2.c3p0.impl.NewPooledConnection@32ef0763
16:09:42,310 DEBUG BasicResourcePool:967 - Successfully destroyed resource: com.mchange.v2.c3p0.impl.NewPooledConnection@32ef0763
16:09:42,310 DEBUG GooGooStatementCache:319 - ENTER METHOD: closeAll( org.postgresql.jdbc4.Jdbc4Connection@42df0af8 )! -- num_connections: 1

有人可以帮我解决这个问题吗?非常感谢!

最佳答案

这是触发C3P0中此日志语句的代码:

if ( logger.isLoggable( MLevel.FINEST ) )
logger.log( MLevel.FINEST, this + " closed by a client.",
new Exception("DEBUG -- CLOSE BY CLIENT STACK TRACE") );

注意:
  • 这也不异常(exception),new Exception仅用于显示调试路径。
  • 是的,这只是一条调试消息(实际上FINESTjava.util.logging中最低的级别)。

  • 总结一下:忽略并调整您的日志记录级别以跳过这些。

    关于hibernate - 奇怪的错误:通过客户堆栈跟踪关闭,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8403227/

    24 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com