MySQL - No operations allowed after connection closed.;
2017-01-10 00:00
609 查看
摘要: No operations allowed after connection closed.; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: No operations allowed after connection closed.
昨天晚上项目放到阿里云的ubt14.04系统中。tomcat8.5.8/jdk1.8/mysql5.7;今天早上打开阿里云服务器上的页面,登录报错:
在网上找到博客:
《No operations allowed after connection closed.Connection was implicitly closed 》
http://www.myexception.cn/operating-system/1311178.html
查看自己使用的dataSource为:org.apache.commons.dbcp.BasicDataSource
昨天晚上项目放到阿里云的ubt14.04系统中。tomcat8.5.8/jdk1.8/mysql5.7;今天早上打开阿里云服务器上的页面,登录报错:
org.springframework.web.util.NestedServletException: Request processing failed; nested exception is org.springframework.dao.DataAccessResourceFailureException: ### Error querying database. Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: No operations allowed after connection closed. ### The error may exist in file [/usr/local/apache-tomcat-8.5.8/webapps/weiwei_01/WEB-INF/classes/com/shark/mapper/auth/AuthUser.mapper.xml] ### The error may involve com.shark.dao.auth.AuthUserDAO.findAuthUserByMobileAndPwd ### The error occurred while executing a query ### SQL: select * from wei_auth_user where mobile = ? and login_pwd = ? ### Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: No operations allowed after connection closed. ; SQL []; No operations allowed after connection closed.; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: No operations allowed after connection closed.
在网上找到博客:
《No operations allowed after connection closed.Connection was implicitly closed 》
http://www.myexception.cn/operating-system/1311178.html
查看自己使用的dataSource为:org.apache.commons.dbcp.BasicDataSource
<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close"> <property name="driverClassName" value="com.mysql.jdbc.Driver" /> <property name="validationQuery" value="select 1" /> <property name="testWhileIdle" value="true" /> <!-- some positive integer --> <property name="timeBetweenEvictionRunsMillis" value="3600000" /> <!-- set to something smaller than 'wait_timeout' --> <property name="minEvictableIdleTimeMillis" value="18000000" /> <!-- if you don't mind a hit for every getConnection(), set to "true" --> <property name="testOnBorrow" value="true" /> <property name="url" value="jdbc:mysql://localhost/[DBname]?serverTimezone=UTC&useUnicode=true&characterEncoding=utf8&rewriteBatchedStatements=true"></property> <property name="username" value="root"/> <property name="password" value="***"/> </bean>
相关文章推荐
- mysql No operations allowed after connection closed.Connection was implicitly closed due to underly
- MySQLNonTransientConnectionException: No operations allowed after statement closed
- MySQLNonTransientConnectionException: No operations allowed after connection closed.
- Mysql异常:MySQLNonTransientConnectionException: No operations allowed after statement closed
- Mysql异常:MySQLNonTransientConnectionException: No operations allowed after statement closed
- MySQLNonTransientConnectionException: No operations allowed after connection closed
- MySQL: No operations allowed after connection closed。解决办法
- myBatis连接MySQL报异常:No operations allowed after connection closed.Connection was i
- myBatis连接MySQL报异常:No operations allowed after connection closed.Connection was implicitly closed
- Mysql异常:MySQLNonTransientConnectionException: No operations allowed after statement closed
- Mysql异常:MySQLNonTransientConnectionException: No operations allowed after statement closed
- 连接mysql异常处理:MySQLNonTransientConnectionException: No operations allowed after connection closed
- MyBatis连接MySQL出错:No operations allowed after connection closed
- mysql No operations allowed after connection closed连接异常的解决
- MyBatis连接MySQL报异常:No operations allowed after connection closed.Connection was implicitly closed
- Mysql异常:MySQLNonTransientConnectionException: No operations allowed after statement closed
- nutz连接mysql异常处理:MySQLNonTransientConnectionException: No operations allowed after connection closed
- nutz连接mysql异常处理:MySQLNonTransientConnectionException: No operations allowed after connection closed
- myBatis连接MySQL报异常:No operations allowed after connection closed.Connection was implicitly closed
- No operations allowed after connection closed异常的解决