-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: c3p0 does not stop throwing exceptions
PostPosted: Tue Aug 23, 2005 12:16 pm 
Beginner
Beginner

Joined: Fri Jan 23, 2004 10:26 am
Posts: 21
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.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Aug 23, 2005 12:42 pm 
Beginner
Beginner

Joined: Fri Jan 23, 2004 10:26 am
Posts: 21
now i found some properties for retry attempts and write them to c3p0.properties

acquireRetryAttempts=3
acquireRetryDelay=1000

but when system starts as if c3P0 still uses the default values (acquireRetryAttempts=30). i put it to the correct place.. what am i doing wrong?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Aug 24, 2005 3:59 pm 
Newbie

Joined: Mon Jan 17, 2005 5:59 pm
Posts: 6
Location: Canada
Try

c3p0.acquireRetryAttempts=3
c3p0.acquireRetryDelay=1000

and the location of c3p0.properties file needs to be in the classpath.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
cron
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.