如题spring中配置了c3p0和mysql的数据源,系统启动时没有报错,但是在查询数据时回报下面错误,不知道为什么,用了dbcp还是包这样的错,怀疑是数据库的问题,请教下各位:下面是查询数据时的打印的异常:
[GraMind] 2008-09-07 23:21:25,093 - DEBUG org.springframework.orm.hibernate3.SessionFactoryUtils : Opening Hibernate Session
[GraMind] 2008-09-07 23:21:25,203 - DEBUG org.hibernate.impl.SessionImpl : opened session at timestamp: 12208008850
[GraMind] 2008-09-07 23:21:25,203 - DEBUG org.hibernate.engine.query.QueryPlanCache : located HQL query plan in cache (select user.userName from User user)
[GraMind] 2008-09-07 23:21:25,265 - DEBUG org.hibernate.engine.query.QueryPlanCache : located HQL query plan in cache (select user.userName from User user)
[GraMind] 2008-09-07 23:21:25,265 - DEBUG org.hibernate.engine.query.HQLQueryPlan : find: select user.userName from User user
[GraMind] 2008-09-07 23:21:25,375 - DEBUG org.hibernate.engine.QueryParameters : named parameters: {}
[GraMind] 2008-09-07 23:21:25,468 - DEBUG org.hibernate.jdbc.AbstractBatcher : about to open PreparedStatement (open PreparedStatements: 0, globally: 0)
[GraMind] 2008-09-07 23:21:25,468 - DEBUG org.hibernate.jdbc.ConnectionManager : opening JDBC connection
[GraMind] 2008-09-07 23:21:25,531 - DEBUG com.mchange.v2.resourcepool.BasicResourcePool : resource age is okay: com.mchange.v2.c3p0.impl.NewPooledConnection@e2f8c1 ---> age: 231797 max: 600000 [com.mchange.v2.resourcepool.BasicResourcePool@28bda]
[GraMind] 2008-09-07 23:21:25,531 - DEBUG com.mchange.v2.resourcepool.BasicResourcePool : trace com.mchange.v2.resourcepool.BasicResourcePool@28bda [managed: 9, unused: 8, excluded: 0] (e.g. com.mchange.v2.c3p0.impl.NewPooledConnection@4ba4d6)
[GraMind] 2008-09-07 23:21:25,531 - DEBUG org.hibernate.SQL : select user0_.UserName as col_0_0_ from gramind_bbs.bbscs_userinfo user0_
Hibernate: select user0_.UserName as col_0_0_ from gramind_bbs.bbscs_userinfo user0_
[GraMind] 2008-09-07 23:21:25,531 - DEBUG org.hibernate.jdbc.AbstractBatcher : preparing statement
[GraMind] 2008-09-07 23:21:25,875 - DEBUG com.mchange.v2.c3p0.stmt.GooGooStatementCache : cxnStmtMgr.statementSet( com.mysql.jdbc.Connection@10a59d2 ).size(): 1
[GraMind] 2008-09-07 23:21:25,875 - DEBUG com.mchange.v2.c3p0.stmt.GooGooStatementCache : checkoutStatement: com.mchange.v2.c3p0.stmt.GlobalMaxOnlyStatementCache stats -- total size: 1; checked out: 1; num connections: 1; num keys: 1
[GraMind] 2008-09-07 23:21:26,484 - DEBUG org.hibernate.jdbc.AbstractBatcher : about to open ResultSet (open ResultSets: 0, globally: 0)
[GraMind] 2008-09-07 23:21:26,500 - DEBUG org.hibernate.loader.Loader : processing result set
[GraMind] 2008-09-07 23:21:26,578 - DEBUG com.mchange.v2.c3p0.impl.NewPooledConnection : com.mchange.v2.c3p0.impl.NewPooledConnection@e2f8c1 handling a throwable.
java.sql.SQLException: The statement (1) has no open cursor.
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2901)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:773)
at com.mysql.jdbc.MysqlIO.nextRow(MysqlIO.java:1304)
at com.mysql.jdbc.MysqlIO.fetchRowsViaCursor(MysqlIO.java:933)
at com.mysql.jdbc.CursorRowProvider.fetchMoreRows(CursorRowProvider.java:357)
at com.mysql.jdbc.CursorRowProvider.hasNext(CursorRowProvider.java:291)
at com.mysql.jdbc.ResultSet.next(ResultSet.java:2834)
at com.mchange.v2.c3p0.impl.NewProxyResultSet.next(NewProxyResultSet.java:3041)
at org.hibernate.loader.Loader.doQuery(Loader.java:697)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:236)
at org.hibernate.loader.Loader.doList(Loader.java:2220)
at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2104)
at org.hibernate.loader.Loader.list(Loader.java:2099)
at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:378)
at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:338)
at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:172)
at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1121)
at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)
at
请帮帮忙,谢谢