-->
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.  [ 5 posts ] 
Author Message
 Post subject: c3p0 - "Acquisition Attempt Failed!!!"
PostPosted: Tue Sep 27, 2005 10:06 am 
Newbie

Joined: Tue Sep 27, 2005 9:35 am
Posts: 3
Hi,

I'm developing an application which uses Hibernate for OR Mapping and c3p0 for connection pooling. Starting the application from Eclipse and from a batch file works fine on the computer on which I'm actually developing. But after installing the application on a new computer (which has no internet connection) c3p0 hangs with the following error message and no connection to the database could be established:

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).
Exception in thread "main" java.sql.SQLException: Connections could not be acquired from the underlying database!


I have used the same batch file to start the application.

Hibernate version: 3.0.5
c3p0 version: 0.9.0
Name and version of the database you are using: Oracle 10.1.0.2
Hibernate configuration:

Code:
<!-- conncection pooling C3PO -->
<property name="hibernate.connection.provider_class">
   org.hibernate.connection.C3P0ConnectionProvider
</property>
<property name="hibernate.c3p0.max_size">20</property>
<property name="hibernate.c3p0.min_size">5</property>
<property name="hibernate.c3p0.timeout">300</property>
<property name="hibernate.c3p0.idle_test_period">3000</property>
<property name="hibernate.c3p0.max_statements">50</property>


On my development computer I'm using Java 1.5.0_01 on the new computer is the newest version of the Java runtime installed (1.5.0_05). I'm not sure if this is of matter. The database has the same configuration on both computers.

Best regards,
tfe


Top
 Profile  
 
 Post subject:
PostPosted: Tue Sep 27, 2005 10:11 am 
Newbie

Joined: Sat Jul 23, 2005 8:31 am
Posts: 18
hi,

i was looking recently at the same error on a test environment. i simply forgot to install the database.

is it possible to connect to the db, with the same login/password as hibernate, with another tool?


Top
 Profile  
 
 Post subject: c3p0 - "Acquisition Attempt Failed!!!"
PostPosted: Tue Sep 27, 2005 10:25 am 
Newbie

Joined: Tue Sep 27, 2005 9:35 am
Posts: 3
chrigi wrote:
hi,

i was looking recently at the same error on a test environment. i simply forgot to install the database.

is it possible to connect to the db, with the same login/password as hibernate, with another tool?


chrigi,

I have installed the same database version on both machines and I'm able to connect to the database with a SQL query tool.

My first thought was that there is something missing in the classpath due to Eclipses strange classpath handling but the fact that the same batch file is not working on the new machine is invalidating my suspicion.

Best regards,
tfe


Top
 Profile  
 
 Post subject:
PostPosted: Tue Sep 27, 2005 10:40 am 
Newbie

Joined: Sat Jul 23, 2005 8:31 am
Posts: 18
this error is generated by c3p0. if you change the connection pool temporarily it might output a more specific error and give you a hint.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Sep 27, 2005 10:52 am 
Newbie

Joined: Tue Sep 27, 2005 9:35 am
Posts: 3
chrigi,

it is in fact a database problem - as you assumed. I can reproduce exactly the same message on my old machine if I'm shutting down the Oracle instance and try to start the application. I'm a little bit astonished because I'm able to connect to the database using a query tool.

Nevertheless I have to check what has gone wrong with the database on the other machine tomorrow.

Many thanks and best regards,
tfe


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 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:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.