-->
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.  [ 3 posts ] 
Author Message
 Post subject: c3p0 configuration problem
PostPosted: Thu Dec 25, 2003 5:46 pm 
Newbie

Joined: Thu Dec 25, 2003 5:41 pm
Posts: 2
I know I'm probably doing something really stupid here, but when I attempt to configure Hibernate to use c3p0 as its connection pool I get the following stack trace:

Code:
java.lang.NullPointerException
   at java.util.Hashtable.put(Unknown Source)
   at com.mchange.v2.c3p0.impl.DriverManagerDataSource.overrideProps(DriverManagerDataSource.java:177)
   at com.mchange.v2.c3p0.impl.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:138)
   at com.mchange.v2.c3p0.impl.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:235)
   at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1.acquireResource(C3P0PooledConnectionPool.java:65)
   at com.mchange.v2.resourcepool.BasicResourcePool.assimilateResource(BasicResourcePool.java:721)
   at com.mchange.v2.resourcepool.BasicResourcePool.acquireUntil(BasicResourcePool.java:502)
   at com.mchange.v2.resourcepool.BasicResourcePool.access$000(BasicResourcePool.java:34)
   at com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask.run(BasicResourcePool.java:903)
   at com.mchange.v2.async.CarefulRunnableQueue$TaskThread.run(CarefulRunnableQueue.java:145)


My hibernate.properties file is as follows:
Code:
hibernate.query.substitutions true 1, false 0, yes 'Y', no 'N'

hibernate.query.imports net.sf.hibernate.test, net.sf.hibernate.eg

hibernate.dialect net.sf.hibernate.dialect.MySQLDialect
hibernate.connection.driver_class com.mysql.jdbc.Driver
hibernate.connection.url jdbc:mysql://localhost/mm2?autoReconnect=true
hibernate.connection.username root

hibernate.c3p0.max_size 2
hibernate.c3p0.min_size 2
hibernate.c3p0.timeout 5000
hibernate.c3p0.max_statements 100
hibernate.c3p0.validate false
hibernate.connection.provider_class net.sf.hibernate.connection.C3P0ConnectionProvider

hibernate.show_sql false

hibernate.jdbc.batch_size 0

hibernate.jdbc.use_streams_for_binary true


Top
 Profile  
 
 Post subject:
PostPosted: Thu Dec 25, 2003 6:17 pm 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
I think this happens if you dont set the password for the mysql connection (you should better use one anyways :)


Top
 Profile  
 
 Post subject:
PostPosted: Thu Dec 25, 2003 6:19 pm 
Newbie

Joined: Thu Dec 25, 2003 5:41 pm
Posts: 2
You were right, that fixed it, thank you! =)


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 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.