-->
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: Could not instantiate DBCP connection pool
PostPosted: Sat May 22, 2004 3:15 am 
Regular
Regular

Joined: Sun Jan 18, 2004 9:43 am
Posts: 50
Hi all

I have tried to configure hibernate to use DBCP connection pool but I get the following error and I am not sure what property of the dbcp I didn't set or didn't set correctly. The following si the dbcp properties I have set

hibernate.dbcp.initialSize=3
hibernate.dbcp.maxActive=100
hibernate.dbcp.maxIdle=8
hibernate.dbcp.minIdle=3
hibernate.dbcp.maxWait=5000


Code:
The error I get is:

net.sf.hibernate.HibernateException: Could not instantiate DBCP connection pool
   at net.sf.hibernate.connection.DBCPConnectionProvider.configure(DBCPConnectionProvider.java:116)
   at net.sf.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(ConnectionProviderFactory.java:83)
   at net.sf.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:64)
   at net.sf.hibernate.cfg.Configuration.buildSettings(Configuration.java:1091)
   at net.sf.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:737)
   at Main.test26(Main.java:175)
   at Main.test2(Main.java:53)
   at Main.main(Main.java:29)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:324)
   at com.intellij.rt.execution.application.AppMain.main(Unknown Source)
Caused by: java.lang.NumberFormatException: null
   at java.lang.Integer.parseInt(Integer.java:436)
   at java.lang.Byte.parseByte(Byte.java:122)
   at java.lang.Byte.parseByte(Byte.java:79)
   at net.sf.hibernate.connection.DBCPConnectionProvider.configure(DBCPConnectionProvider.java:77)
   ... 12 more




By the way, what do you guys think about c3p0 connection pool? Is it robust and efficient? Please tell me if you have had encountered any difficult problems with c3p0 or any advices are very welcome!

Thanks !!

_________________
Edmond Hung
Credit Card DNA Security System (Holdings) Ltd.


Top
 Profile  
 
 Post subject:
PostPosted: Sat May 22, 2004 4:00 am 
Hibernate Team
Hibernate Team

Joined: Thu Dec 18, 2003 9:55 am
Posts: 1977
Location: France
try proxool, forget dbcp

_________________
Anthony,
Get value thanks to your skills: http://www.redhat.com/certification


Top
 Profile  
 
 Post subject:
PostPosted: Mon May 24, 2004 2:00 am 
Regular
Regular

Joined: Sun Jan 18, 2004 9:43 am
Posts: 50
anthony wrote:
try proxool, forget dbcp


Is proxool significant better than dbcp?? In what ways, it is better than dbcp? and how it is compared with c3p0?

_________________
Edmond Hung
Credit Card DNA Security System (Holdings) Ltd.


Top
 Profile  
 
 Post subject:
PostPosted: Mon May 24, 2004 3:12 am 
Hibernate Team
Hibernate Team

Joined: Thu Dec 18, 2003 9:55 am
Posts: 1977
Location: France
dbcp has bugs

now you can choose Proxool or C3P0, both work fine

_________________
Anthony,
Get value thanks to your skills: http://www.redhat.com/certification


Top
 Profile  
 
 Post subject:
PostPosted: Mon Nov 21, 2005 11:47 am 
Newbie

Joined: Mon Nov 21, 2005 10:28 am
Posts: 1
Location: London, UK
anthony wrote:
dbcp has bugs

Can you give me an idea of the kind of bugs with DBCP have been observed? For example, do they occurr all the time, or in high-load situations only, or with complex object models only or some other conditions?

I'm currently using DBCP with Hibernate and it's working fine, but I'd like to have an idea of what potential problems I might be letting myself into.

_________________
Tony.


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.