hibernate3 使用dbcp连接池异常

dao接口实现由jdbc变更为hibernate3后,应用异常,信息如下:

 

org.springframework.jdbc.Uncategori zedSQLException: Hibernate operation: Cannot open connection; uncategorized SQLE xception for SQL [???]; SQL state [null]; error code [0]; Cannot get a connectio n, pool error Timeout waiting for idle object; nested exception is org.apache.co mmons.dbcp.SQLNestedException: Cannot get a connection, pool error Timeout waiti ng for idle object com.travelsky.ota.OTARuntimeException: org.springframework.jdbc.UncategorizedSQL Exception: Hibernate operation: Cannot open connection; uncategorized SQLExcepti on for SQL [???]; SQL state [null]; error code [0]; Cannot get a connection, poo l error Timeout waiting for idle object; nested exception is org.apache.commons. dbcp.SQLNestedException: Cannot get a connection, pool error Timeout waiting for idle object

 

经排查后确定由于hibernate3对原先的dbcp池支持不好造成,更换c3p0池后,一切正常。

你可能感兴趣的:(sql,exception,Hibernate,object,c3p0,nested)