-->
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.  [ 1 post ] 
Author Message
 Post subject: Maintaing ResourcePool thru Hibernate.
PostPosted: Fri May 11, 2007 2:23 am 
Beginner
Beginner

Joined: Mon Oct 30, 2006 12:46 am
Posts: 26
Hi All,

i am getting this expection :


Caused by: java.sql.SQLException: Connections could not be acquired from the underlying database!
[Cause: com.mchange.v2.resourcepool.CannotAcquireResourceException: A ResourcePool could not acquire a resource from its primary factory or source.

I hope this is bacs of getting full of resourcepool connections. I am not getting how to fix this error. Here i am coping my hiberante.cfg.xml file :


cp-sun2:resources> vi hibernate.cfg.xml
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">

<!-- Generated by MyEclipse Hibernate Tools. -->

<hibernate-configuration>

<session-factory>

<!-- MySql
<property name="dialect">org.hibernate.dialect.MySQLDialect</property>
<property name="connection.driver_class">com.mysql.jdbc.Driver</property>
<property name="hbm2ddl.auto">validate</property>
<property name="connection.username">root</property>

-->


<property name="dialect">org.hibernate.dialect.Oracle9Dialect</property>
<property name="connection.driver_class">
oracle.jdbc.driver.OracleDriver
</property>
<property name="hbm2ddl.auto">verify</property>

<property name="connection.url">jdbc:oracle:thin:@equator.cisco.com:1521:cesdev3</property>
<property name="connection.username"></property>
<property name="connection.password"></property>

<!-- Testcase insert gives error, stream type is not allowed in batch.
To avoid this problem disabled the batch ..
this has performance impace and needs to be further
researched if we can disable batch mode at individual query level -->

<property name="hibernate.jdbc.batch_size">0</property>

<!-- oracle demo database do not use for dev.
<property name="connection.username">hotice_user</property>
<property name="connection.password">hotice_user</property>
-->

<!-- configuration pool via c3p0
reference : http://www.hibernate.org/214.html
Experiment with these to avoid 8hrs idle problem. -->
<property name="c3p0.acquire_increment">1</property>
<property name="c3p0.idle_test_period">100</property>
<!-- seconds test for idle conn and recycle-->
<property name="c3p0.max_statements">50</property>
<!-- cache -->
<property name="c3p0.min_size">1</property><!-- min pool size -->
<property name="c3p0.max_size">4</property><!-- max pool size -->
<property name="c3p0.timeout">100</property><!-- seconds -->

<!-- property name="connection.url">
jdbc:mysql://cp-sun2:3306/hotice
</property> -->

<!-- property name="connection.url">
jdbc:mysql://atpatil-u10:3306/atpatil2
</property> -->

<!--
<property name="connection.url">
jdbc:mysql://cp-sun2:3306/demo
</property>
-->

<!--
<property name="connection.url">
jdbc:mysql://cp-sun2:3306/srinivve
</property>
-->
<!--
<property name="connection.url">
jdbc:mysql://cp-sun2:3306/pdommara
</property>
-->



</session-factory>

</hibernate-configuration>


Pls help me in these regard !! pls pls !!


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

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.