Вызывается: org.hibernate.exception.GenericJDBCException: Невозможно получить соединение JDB C с EmbeddedDerby - PullRequest
0 голосов
/ 30 апреля 2020

Я использую Embedded Derby Derby 10.15.2.0 с Hibernate 5.4.14

Драйверы и файлы jar c3p0 добавлены в classpath проекта, но не знаю, почему я Получаю

ERROR: An SQLException was provoked by the following failure: com.mchange.v2.resourcepool.NoGoodResourcesException: After checking so many resources we blew the stack, no resources tested acceptable for checkout. See logger com.mchange.v2.resourcepool.BasicResourcePool output at FINER/DEBUG for information on individual failures.

И

Caused by: org.hibernate.exception.GenericJDBCException: Unable to acquire JDBC Connection

Вот Hibernate.cfg.xml

<hibernate-configuration>
    <session-factory>
        <property name="hibernate.dialect">org.hibernate.dialect.DerbyTenSevenDialect</property>
        <property name="hibernate.connection.driver_class">org.apache.derby.jdbc.EmbeddedDriver</property>
        <property name="hibernate.connection.url">jdbc:derby:/home/.netbeans/11.0/derby/clientieFX</property>
        <property name="hibernate.connection.username">app</property>
        <property name="hibernate.connection.password">app</property>
        <property name="hibernate.default_schema">APP</property>
        <property name="hibernate.enable_lazy_load_no_trans">true</property>
        <property name="current_session_context_class">thread</property>

        <property name="hibernate.c3p0.acquire_increment">1</property>
        <property name="hibernate.c3p0.min_size">5</property>
        <property name="hibernate.c3p0.max_size">20</property>
        <property name="hibernate.c3p0.timeout">300</property>
        <property name="hibernate.c3p0.maxIdleTimeExcessConnections">300</property>
        <property name="hibernate.c3p0.numHelperThreads">6</property>
        <property name="hibernate.c3p0.unreturnedConnectionTimeout">3600</property>
        <property name="hibernate.c3p0.debugUnreturnedConnectionTimeout">true</property>
        <property name="hibernate.c3p0.max_statements">1000</property>
        <property name="hibernate.c3p0.preferredTestQuery">/* ping */</property>
        <property name="hibernate.c3p0.testConnectionOnCheckout">true</property>
        <property name="hibernate.connection.release_mode">on_close</property>

        <mapping resource="com/clientie/pojo/Order.hbm.xml"/>
        <mapping resource="com/clientie/pojo/Client.hbm.xml"/>
        <mapping resource="com/clientie/pojo/Product.hbm.xml"/>
        <mapping resource="com/clientie/pojo/User.hbm.xml"/>
    </session-factory>
</hibernate-configuration>

Я пытался изменить свойства, но он не работает.
Почему он не может подключиться?

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...