-->
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: new hibernate issue with c3p0 (NPE), possible bug
PostPosted: Fri Jul 27, 2007 7:13 am 
Newbie

Joined: Tue Jun 13, 2006 9:03 am
Posts: 18
I've just upgraded my hibernate libs in my application, from hibernate 3.2.0.ga to 3.2.4.sp1, using the same c3p0 0.9.1.2, and all of a sudden get a NullPointerException during application bootstrap:

*******************************************
2007-07-26 22:49:56,106 | FATAL | Timer-3 | C3P0ConnectionProvider | nection.C3P0ConnectionProvider 162 | could not instantiate C3P0 connection pool
java.lang.NullPointerException
at java.util.Hashtable.put(Hashtable.java:394)
at com.mchange.v2.c3p0.DataSources.pooledDataSource(DataSources.java:314)
at org.hibernate.connection.C3P0ConnectionProvider.configure(C3P0ConnectionProvider.java:159)
at org.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(ConnectionProviderFactory.java:124)
at org.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(ConnectionProviderFactory.java:56)
at org.hibernate.cfg.SettingsFactory.createConnectionProvider(SettingsFactory.java:414)
at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:62)
at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2009)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1292)
at org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:915)
...
...
**************************************


I haven't changed anything in my application or hibernate configuration, just the stated hibernate jars. Quickly glancing at the source, I can see that some of the code in C3P0ConnectionProvider.configure() has changed from the working 3.2.0ga to 3.2.4sp1-- particularly in the riddance of the PoolConfig class. Below are my hibernate c3p0 configuration:


****************************************
<property name="hibernate.c3p0.min_size">5</property>
<property name="hibernate.c3p0.max_size">50</property>
<property name="hibernate.c3p0.timeout">600</property>
<property name="hibernate.c3p0.max_statements">0</property>
<property name="hibernate.c3p0.idle_test_period">300</property>
<property name="hibernate.c3p0.acquire_increment">1</property>
****************************************


Any help would be appreciated.

-nefi


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.