mybatis+mysql执行sql时会出现链接已关闭,但不是每次都会出现这种现象
DataSourceUtils.doGetConnection(110)|FetchingJDBCConnectionfromDataSourceSpringManage...
DataSourceUtils.doGetConnection(110) | Fetching JDBC Connection from DataSource
SpringManagedTransaction.openConnection(85) | JDBC Connection [org.apache.commons.dbcp.PoolableConnection@5a0d2bee] will not be managed by Spring
BaseJdbcLogger.debug(139) | ==> Preparing: SELECT USER_ID AS userId FROM USER WHERE USERNAME = ?
SQLErrorCodeSQLExceptionTranslator.doTranslate(287) | Unable to translate SQLException with Error code '0', will now try the fallback translator
SQLStateSQLExceptionTranslator.doTranslate(94) | Extracted SQL state class '08' from value '08003'
SqlSessionUtils.closeSqlSession(170) | Closing non transactional SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@38ee9f13]
DataSourceUtils.doReleaseConnection(327) | Returning JDBC Connection to DataSource
DataSourceUtils.releaseConnection(297) | Could not close JDBC Connection
java.sql.SQLException: Already closed.
at org.apache.commons.dbcp.PoolableConnection.close(PoolableConnection.java:114)
at org.apache.commons.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.close(PoolingDataSource.java:191)
at org.springframework.jdbc.datasource.DataSourceUtils.doCloseConnection(DataSourceUtils.java:341)
at org.springframework.jdbc.datasource.DataSourceUtils.doReleaseConnection(DataSourceUtils.java:328) 展开
SpringManagedTransaction.openConnection(85) | JDBC Connection [org.apache.commons.dbcp.PoolableConnection@5a0d2bee] will not be managed by Spring
BaseJdbcLogger.debug(139) | ==> Preparing: SELECT USER_ID AS userId FROM USER WHERE USERNAME = ?
SQLErrorCodeSQLExceptionTranslator.doTranslate(287) | Unable to translate SQLException with Error code '0', will now try the fallback translator
SQLStateSQLExceptionTranslator.doTranslate(94) | Extracted SQL state class '08' from value '08003'
SqlSessionUtils.closeSqlSession(170) | Closing non transactional SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@38ee9f13]
DataSourceUtils.doReleaseConnection(327) | Returning JDBC Connection to DataSource
DataSourceUtils.releaseConnection(297) | Could not close JDBC Connection
java.sql.SQLException: Already closed.
at org.apache.commons.dbcp.PoolableConnection.close(PoolableConnection.java:114)
at org.apache.commons.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.close(PoolingDataSource.java:191)
at org.springframework.jdbc.datasource.DataSourceUtils.doCloseConnection(DataSourceUtils.java:341)
at org.springframework.jdbc.datasource.DataSourceUtils.doReleaseConnection(DataSourceUtils.java:328) 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询