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
|