org.hibernate.TransactionException: JDBC begin failed解决方案

org.hibernate.TransactionException: JDBC begin failed: 
    at org.hibernate.transaction.JDBCTransaction.begin(JDBCTransaction.java:68)
    at org.hibernate.impl.SessionImpl.beginTransaction(SessionImpl.java:1326)
    at com.stable.application.common.hibernate.HibernateSessionFactory.beginTransaction(HibernateSessionFactory.java:136)
    at com.stable.application.common.struts.AduActionServlet.process(AduActionServlet.java:78)
    at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
    at com.stable.application.common.struts.AduActionServlet.doGet(AduActionServlet.java:104)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at com.stable.application.common.http.filter.UserSessionFilter.doFilter(UserSessionFilter.java:57)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at com.stable.application.common.http.filter.RequestEncodeFilter.doFilter(RequestEncodeFilter.java:51)
    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:233)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
    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:293)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849)
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454)
    at java.lang.Thread.run(Thread.java:619)
Caused by: 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.Wrapper$$EnhancerByProxool$$1cc186b6.getAutoCommit(<generated>)
    at org.hibernate.transaction.JDBCTransaction.begin(JDBCTransaction.java:57)
    ... 25 more
换了个连接池 和配置

<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource">

<property name="driverClassName" value="com.mysql.jdbc.Driver" />

<property name="url" value="jdbc:mysql://localhost:3306/nxlib?useUnicode=true&amp;characterEncoding=utf8" />

<property name="username" value="" />

<property name="password" value="" />

<!-- Connection Pooling Info -->

<property name="maxActive" value="5" />

<property name="maxIdle" value="40" />

<property name="defaultAutoCommit" value="false" />

<!-- 连接Idle一个小时后超时 -->

<property name="timeBetweenEvictionRunsMillis" value="3600000" />

<property name="minEvictableIdleTimeMillis" value="3600000" />

</bean>

你可能感兴趣的:(transaction)