Hello, i am using c3p0 0.8.5.1 , Hsqldb 0.8.0.1 standalone mode and Hibernate 2.1.8
for testing, i run the HSQLDB in server mode outside, and tried to run the server which uses HSQLDB in stand alone mode. Then c3p0 started throwing exceptions. This is expected but system just dont stop throwing them for a long time (for some minutes..)
Here is my pool settings in test.
Code:
<!-- Connection Pool settings -->
<property name="hibernate.c3p0.acquire_increment">1</property>
<property name="hibernate.c3p0.idle_test_period">0</property>
<property name="hibernate.c3p0.timeout">0</property>
<property name="hibernate.c3p0.max_size">10</property>
<property name="hibernate.c3p0.max_statements">0</property>
<property name="hibernate.c3p0.min_size">3</property>
What can i do for it to stop throwing exceptions?
Code:
java.sql.SQLException: The database is already in use by another process: org.hsqldb.persist.NIOLockFile@fdad6a3f[file =C:.......blah.lck, exists=true, locked=false, valid=false, fl =null]: java.lang.Exception: The process cannot access the file because another process has locked a portion of the file : ......blah.lck
at org.hsqldb.jdbc.Util.sqlException(Unknown Source)
at org.hsqldb.jdbc.jdbcConnection.<init>(Unknown Source)
at org.hsqldb.jdbcDriver.getConnection(Unknown Source)
at org.hsqldb.jdbcDriver.connect(Unknown Source)
at com.mchange.v2.c3p0.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:68)
at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:87)
at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1.acquireResource(C3P0PooledConnectionPool.java:83)
at com.mchange.v2.resourcepool.BasicResourcePool.assimilateResource(BasicResourcePool.java:884)
at com.mchange.v2.resourcepool.BasicResourcePool.acquireUntil(BasicResourcePool.java:601)
at com.mchange.v2.resourcepool.BasicResourcePool.access$400(BasicResourcePool.java:31)
at com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask.run(BasicResourcePool.java:1079)
at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:354)
later it says
Code:
Acquisition Attempt Failed!!! Clearing pending acquires.
While trying to acquire a needed new resource, we failed
to succeed more than the maximum number of allowed
acquisition attempts (30).
but keeps throwing excptions.