错误如下:
信息: could not bind value '144' to parameter: 1; No operations allowed after statement closed.
2009-2-4 5:45:17 org.hibernate.util.JDBCExceptionReporter logExceptions
警告: SQL Error: 0, SQLState: 08003
2009-2-4 5:45:17 org.hibernate.util.JDBCExceptionReporter logExceptions
严重: No operations allowed after statement closed.
2009-2-4 5:45:17 org.hibernate.event.def.DefaultLoadEventListener onLoad
信息: Error performing load command
org.hibernate.exception.JDBCConnectionException: could not load an entity batch: [com.liusoft.dlog4j.organize.QuestionBean#<144, 143, 142, 141, 140, 139, 138, 137, 136, 135, 134, 133>]
at org.hibernate.exception.SQLStateConverter.convert(Unknown Source)
at org.hibernate.exception.JDBCExceptionHelper.convert(Unknown Source)
at org.hibernate.loader.Loader.loadEntityBatch(Unknown Source)
at org.hibernate.loader.entity.BatchingEntityLoader.load(Unknown Source)
at org.hibernate.persister.entity.AbstractEntityPersister.load(Unknown Source)
at org.hibernate.event.def.DefaultLoadEventListener.loadFromDatasource(Unknown Source)
at org.hibernate.event.def.DefaultLoadEventListener.doLoad(Unknown Source)
at org.hibernate.event.def.DefaultLoadEventListener.load(Unknown Source)
at org.hibernate.event.def.DefaultLoadEventListener.proxyOrLoad(Unknown Source)
at org.hibernate.event.def.DefaultLoadEventListener.onLoad(Unknown Source)
at org.hibernate.impl.SessionImpl.fireLoad(Unknown Source)
at org.hibernate.impl.SessionImpl.internalLoad(Unknown Source)
at org.hibernate.type.EntityType.resolveIdentifier(Unknown Source)
at org.hibernate.type.ManyToOneType.assemble(Unknown Source)
at org.hibernate.cache.StandardQueryCache.get(Unknown Source)
at org.hibernate.loader.Loader.getResultFromQueryCache(Unknown Source)
at org.hibernate.loader.Loader.listUsingQueryCache(Unknown Source)
at org.hibernate.loader.Loader.list(Unknown Source)
at org.hibernate.loader.hql.QueryLoader.list(Unknown Source)
at org.hibernate.hql.ast.QueryTranslatorImpl.list(Unknown Source)
at org.hibernate.engine.query.HQLQueryPlan.performList(Unknown Source)
at org.hibernate.impl.SessionImpl.list(Unknown Source)
at org.hibernate.impl.QueryImpl.list(Unknown Source)
at com.liusoft.dlog4j.dao.DAO.executeQuery(DAO.java:230)
at com.liusoft.dlog4j.organize.QuestionDAO.listAuditedQuestion(QuestionDAO.java:79)
at com.liusoft.dlog4j.velocity.DLOG_Organize_VelocityTool.listAuditedQuestion(DLOG_Organize_VelocityTool.java:243)
at sun.reflect.GeneratedMethodAccessor747.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.invoke(UberspectImpl.java:295)
at org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:245)
at org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:203)
at org.apache.velocity.runtime.parser.node.ASTReference.value(ASTReference.java:419)
at org.apache.velocity.runtime.parser.node.ASTExpression.value(ASTExpression.java:73)
at org.apache.velocity.runtime.parser.node.ASTSetDirective.render(ASTSetDirective.java:125)
at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:318)
at org.apache.velocity.Template.merge(Template.java:254)
at org.apache.velocity.tools.view.servlet.VelocityLayoutServlet.mergeTemplate(VelocityLayoutServlet.java:224)
at org.apache.velocity.tools.view.servlet.VelocityViewServlet.doRequest(VelocityViewServlet.java:551)
at com.liusoft.dlog4j.servlet.DLOG_VelocityServlet.doRequest(DLOG_VelocityServlet.java:107)
at org.apache.velocity.tools.view.servlet.VelocityViewServlet.doGet(VelocityViewServlet.java:507)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at com.liusoft.dlog4j.servlet.DLOG_HomeFilter.doFilter(DLOG_HomeFilter.java:120)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at com.liusoft.dlog4j.servlet.DLOG_HibernateFilter.doFilter(DLOG_HibernateFilter.java:76)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:228)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:216)
at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190)
at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:283)
at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:767)
at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:697)
at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:889)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:686)
at java.lang.Thread.run(Thread.java:595)
Caused by: com.mysql.jdbc.exceptions.MySQLNonTransientConnectionException: No operations allowed after statement closed.
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:888)
at com.mysql.jdbc.Statement.checkClosed(Statement.java:380)
at com.mysql.jdbc.PreparedStatement.setInternal(PreparedStatement.java:2733)
at com.mysql.jdbc.PreparedStatement.setInt(PreparedStatement.java:2697)
at org.apache.commons.dbcp.DelegatingPreparedStatement.setInt(DelegatingPreparedStatement.java:117)
at org.apache.commons.dbcp.DelegatingPreparedStatement.setInt(DelegatingPreparedStatement.java:117)
at org.hibernate.type.IntegerType.set(Unknown Source)
at org.hibernate.type.NullableType.nullSafeSet(Unknown Source)
at org.hibernate.type.NullableType.nullSafeSet(Unknown Source)
at org.hibernate.loader.Loader.bindPositionalParameters(Unknown Source)
at org.hibernate.loader.Loader.bindParameterValues(Unknown Source)
at org.hibernate.loader.Loader.prepareQueryStatement(Unknown Source)
at org.hibernate.loader.Loader.doQuery(Unknown Source)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Unknown Source)
... 62 more
这个错误是怎么回事?
有时候出现后刷新下又可以了。。。很奇怪
哪位高手告知下哪里的问题...
问题补充:
那需要怎么样解决呢?如果连接池满的话?
我是用的hibernater配置的连接池
2009年2月04日 11:00