Hi,
After restarting the server that hosts my webapp using Tomcat 5/Hibernate 2, then restarting postgres, then restarting Tomcat, I'm getting the following error:
Code:
2004-05-31 11:03:24,328 -- WARN net.sf.hibernate.cfg.SettingsFactory -- Could not obtain connection metadata
java.sql.SQLException: java.lang.InterruptedException
at java.lang.Object.wait(Native Method)
at com.mchange.v2.resourcepool.BasicResourcePool.awaitAcquire(BasicResourcePool.java:776)
at com.mchange.v2.resourcepool.BasicResourcePool.checkoutResource(BasicResourcePool.java:198)
at com.mchange.v2.resourcepool.BasicResourcePool.checkoutResource(BasicResourcePool.java:170)
at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection(C3P0PooledConnectionPool.java:172)
at com.mchange.v2.c3p0.PoolBackedDataSource.getConnection(PoolBackedDataSource.java:64)
at com.mchange.v2.c3p0.ComboPooledDataSource.getConnection(ComboPooledDataSource.java:263)
at net.sf.hibernate.connection.DatasourceConnectionProvider.getConnection(DatasourceConnectionProvider.java:56)
it reads the configuration file fine before that (and the hibernate.properties file). Also, this application was working fine before the server restart.
Here is my hibernate.properties:
Code:
hibernate.connection.datasource=java:comp/env/jdbc/pooledDS
hibernate.c3p0.max_size=10
hibernate.c3p0.min_size=2
hibernate.c3p0.timeout=5000
hibernate.c3p0.max_statements=100
hibernate.c3p0.validate=false
hibernate.cglib.use_reflection_optimizer=false
hibernate.show_sql=false
hibernate.connection.username=user
hibernate.connection.password=pass
hibernate.dialect=net.sf.hibernate.dialect.PostgreSQLDialect
hibernate.connection.url=jdbc\:postgresql\://localhost\:5432/dbname
hibernate.connection.driver_class=org.postgresql.Driver
any ideas?[/code]