【问题标题】:hibernate startup error休眠启动错误
【发布时间】:2010-07-12 23:40:56
【问题描述】:

当休眠启动时,我收到一条奇怪的消息,打印到标准我们的标准,我无法诊断它。

这是打印出来的消息(它在我的 Eclipse 控制台中显示为红色,所以我相信这意味着它被写入标准错误):

initialPoolSize-> coercedPropVal: 1
maxIdleTime-> coercedPropVal: 1500
maxPoolSize-> coercedPropVal: 15
maxStatements-> coercedPropVal: 50
minPoolSize-> coercedPropVal: 1
initialPoolSize-> coercedPropVal: 1
maxIdleTime-> coercedPropVal: 1500
maxPoolSize-> coercedPropVal: 15
maxStatements-> coercedPropVal: 50
minPoolSize-> coercedPropVal: 1

没有错误消息或其他任何内容。这是我的 hibernate.cfg.xml

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE hibernate-configuration
    PUBLIC "-//Hibernate/Hibernate Configuration DTD//EN"
    "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
<session-factory>
    <!-- local connection properties -->
    <property name="connection.provider_class">
        org.hibernate.connection.C3P0ConnectionProvider
    </property>
    <property name="hibernate.connection.url">
        URL...
    </property>
    <property name="hibernate.connection.driver_class">
        oracle.jdbc.driver.OracleDriver
    </property>
    <property name="hibernate.jdbc.batch_size">20</property>
    <property name="hibernate.connection.username">USER_NAME</property>
    <property name="hibernate.connection.password">PASSWORD</property>
    <property name="hibernate.c3p0.min_size">1</property>
    <property name="hibernate.c3p0.max_size">15</property>
    <property name="hibernate.c3p0.timeout">1500</property>
    <property name="hibernate.c3p0.max_statements">50</property>
    <property name="hibernate.order_inserts">true</property>
    <property name="hibernate.current_session_context_class">thread</property>
    <property name="hibernate.dialect">
        org.hibernate.dialect.Oracle10gDialect
    </property>

    <property name="hibernate.show_sql">false</property>
    <property name="hibernate.transaction.factory_class">
        org.hibernate.transaction.JDBCTransactionFactory
    </property>

    <mapping ...>
    <mapping ...>
</session-factory>
</hibernate-configuration>

尽管出现此错误,但在项目中一切正常,我只是不想让这些随机难以辨认的文本进入我的日志文件。

我已经尝试过四处搜索,但我似乎找不到任何关于此的内容。

提前致谢

【问题讨论】:

    标签: java hibernate configuration


    【解决方案1】:

    为什么你会认为这是一个错误?不是——是打印出来的连接池的选项。

    【讨论】:

    • 我认为这是一个错误,因为它被打印为标准错误,如果它不是一个错误,你知道如何抑制它吗?
    • 或许可以获取更新版本的连接池(c3p0)
    猜你喜欢
    • 2016-03-24
    • 1970-01-01
    • 2012-05-14
    • 2015-06-30
    • 2014-06-16
    • 2020-05-17
    • 1970-01-01
    • 2012-04-19
    相关资源
    最近更新 更多