当前位置: 代码迷 >> J2EE >> !Couldn't perform the operation getAutoCommit
  详细解决方案

!Couldn't perform the operation getAutoCommit

热度:105   发布时间:2016-04-22 02:00:33.0
在线等!Couldn't perform the operation getAutoCommit
java.sql.SQLException: Couldn't perform the operation getAutoCommit: You can't perform any operations on this connection. It has been automatically closed by Proxool for some reason (see logs). 
at org.logicalcobwebs.proxool.WrappedConnection.invoke(WrappedConnection.java:207) 
at org.logicalcobwebs.proxool.WrappedConnection.intercept(WrappedConnection.java:87) 
at $java.sql.Connection$$EnhancerByProxool$$5698d586.getAutoCommit() 
at org.hibernate.jdbc.ConnectionManager.isAutoCommit(ConnectionManager.java:185) 
at org.hibernate.jdbc.JDBCContext.afterNontransactionalQuery(JDBCContext.java:223) 
at org.hibernate.impl.SessionImpl.afterOperation(SessionImpl.java:412) 
at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1111) 
at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79) 
at org.springframework.orm.hibernate3.HibernateTemplate$31.doInHibernate(HibernateTemplate.java:853) 
at org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:366) at org.springframework.orm.hibernate3.HibernateTemplate.find(HibernateTemplate.java:844) at org.springframework.orm.hibernate3.HibernateTemplate.find(HibernateTemplate.java:840) at com.hibernate.dao.AdminuserDAO.findByProperty(AdminuserDAO.java:81) 
at com.wclhc.struts.action.AdminloginAction.execute(AdminloginAction.java:117) 
at org.springframework.web.struts.DelegatingActionProxy.execute(DelegatingActionProxy.java:106) at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:419) 
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224) 
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194) 
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432) 
at javax.servlet.http.HttpServlet.service(HttpServlet.java:710) 
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.filter.FilterEncoding.doFilter(FilterEncoding.java:24) 
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilte(ApplicationFilterChain.java:235) 
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) 
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) 
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:102) 
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) 
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263) 
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844) 
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:584) 
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447) 
at java.lang.Thread.run(Thread.java:595) 

项目用的是HIBERNATE+PROXOOL,请大家帮帮忙,我都不知道这问题出错在什么程序中^

说说自己的感受: 
  此问题,应该出自在AdminloginAction 调用AdminuserDAO 的 findByProperty方法中!是一个简单的登陆查询用户信息的DAO,由ECLIPSE自动生成的DAO,我也看过了并没有什么发现 
public List findByProperty(String propertyName, Object value) { 
log.debug("finding Adminuser instance with property: " + propertyName 
+ ", value: " + value); 
try { 
String queryString = "from Adminuser as model where model." 
+ propertyName + "= ?"; 
  相关解决方案