zoukankan      html  css  js  c++  java
  • SpringMVC+MyBatis+MySQL 8小时链接断开

    org.springframework.web.util.NestedServletException: Request processing failed; nested exception is org.springframework.dao.DataAccessResourceFailureException: SqlMapClient operation; SQL [];   
    --- The error occurred in ibatis/comm/comm-Sql-Map.xml.  
    --- The error occurred while applying a parameter map.  
    --- Check the base_login.getUserByLoginId-InlineParameterMap.  
    --- Check the statement (query failed).  
    --- Cause: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: The last packet successfully received from the server was 229,810,227 milliseconds ago.  The last packet sent successfully to the server was 229,810,229 milliseconds ago. is longer than the server configured value of 'wait_timeout'. You should consider either expiring and/or testing connection validity before use in your application, increasing the server configured values for client timeouts, or using the Connector/J connection property 'autoReconnect=true' to avoid this problem.; nested exception is com.ibatis.common.jdbc.exception.NestedSQLException:   
    --- The error occurred in ibatis/comm/comm-Sql-Map.xml.  
    --- The error occurred while applying a parameter map.  
    --- Check the base_login.getUserByLoginId-InlineParameterMap.  
    --- Check the statement (query failed).  
    --- Cause: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: The last packet successfully received from the server was 229,810,227 milliseconds ago.  The last packet sent successfully to the server was 229,810,229 milliseconds ago. is longer than the server configured value of 'wait_timeout'. You should consider either expiring and/or testing connection validity before use in your application, increasing the server configured values for client timeouts, or using the Connector/J connection property 'autoReconnect=true' to avoid this problem.
    	org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:886)
    	org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:790)
    	javax.servlet.http.HttpServlet.service(HttpServlet.java:650)
    	javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
    	org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
    	com.frame.util.interceptor.HttpServletRequestReplacedFilter.doFilter(HttpServletRequestReplacedFilter.java:131)
    	org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
    	org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
    

    root cause

    org.springframework.dao.DataAccessResourceFailureException: SqlMapClient operation; SQL [];   
    --- The error occurred in ibatis/comm/comm-Sql-Map.xml.  
    --- The error occurred while applying a parameter map.  
    --- Check the base_login.getUserByLoginId-InlineParameterMap.  
    --- Check the statement (query failed).  
    --- Cause: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: The last packet successfully received from the server was 229,810,227 milliseconds ago.  The last packet sent successfully to the server was 229,810,229 milliseconds ago. is longer than the server configured value of 'wait_timeout'. You should consider either expiring and/or testing connection validity before use in your application, increasing the server configured values for client timeouts, or using the Connector/J connection property 'autoReconnect=true' to avoid this problem.; nested exception is com.ibatis.common.jdbc.exception.NestedSQLException:   
    --- The error occurred in ibatis/comm/comm-Sql-Map.xml.  
    --- The error occurred while applying a parameter map.  
    --- Check the base_login.getUserByLoginId-InlineParameterMap.  
    --- Check the statement (query failed).  
    --- Cause: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: The last packet successfully received from the server was 229,810,227 milliseconds ago.  The last packet sent successfully to the server was 229,810,229 milliseconds ago. is longer than the server configured value of 'wait_timeout'. You should consider either expiring and/or testing connection validity before use in your application, increasing the server configured values for client timeouts, or using the Connector/J connection property 'autoReconnect=true' to avoid this problem.

    后面已经给出了提示!!
    再URL上添加参数autoReconnect=true

  • 相关阅读:
    Wide character in print at a2.pl line 返回json 需要encode_utf8
    decode_json 必须是unicode形式的字符
    Wide character in print at a2.pl line 6.
    unicode转中文
    用 Flask 来写个轻博客 (4) — (M)VC_创建数据模型和表
    Openstack_通用模块_Oslo_vmware 创建 vCenter 虚拟机快照
    为什么企业数据化运营很重要?
    为什么企业数据化运营很重要?
    Openstack_单元测试工具 tox
    java 把已知下载路径的文件复制到本地
  • 原文地址:https://www.cnblogs.com/sansyou/p/6625181.html
Copyright © 2011-2022 走看看