Could not obtain connection to query metadata解决

11:12:56,906  WARN JDBCExceptionReporter:233 - SQL Error: 0, SQLState: null
11:12:56,921 ERROR JDBCExceptionReporter:234 - Cannot create PoolableConnectionFactory (The Network Adapter could not establish the connection)
11:12:57,000  WARN SettingsFactory:147 - Could not obtain connection to query metadata
org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (The Network Adapter could not establish the connection)
	at org.apache.commons.dbcp.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:1549)
	at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1388)
	at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:1044)
	at org.springframework.orm.hibernate3.LocalDataSourceConnectionProvider.getConnection(LocalDataSourceConnectionProvider.java:81)
	at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:114)
	at org.hibernate.cfg.Configuration.buildSettingsInternal(Configuration.java:2833)
	at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2829)

 

总是报Could not obtain connection to query metadata这个.... 
然后是url is null...好像.... 
找了半天,是hibernate.cfg.xml中配置proxool,相关的内容没有注释掉导致的.... 
晕死.... 
不过,log4j,倒是蛮好用的...

 

你可能感兴趣的:(hibernate)