系统是Win7,在本地Mysql数据库里测试没问题。但是,如果连接上远程Linux上的Mysql数据库,过一段时间就会出现问题,在插入一条记录时,提示下列信息。
HTTP Status 500 -type Exception reportmessagedescription The server encountered an internal error () that prevented it from fulfilling this request.exceptionorg.hibernate.exception.JDBCConnectionException: could not load an entity: [entity.User#1]
……root causecom.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failureThe last packet successfully received from the server was 280,216 milliseconds ago. The last packet sent successfully to the server was 1 milliseconds ago.
sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
……希望大家指点迷津……
HTTP Status 500 -type Exception reportmessagedescription The server encountered an internal error () that prevented it from fulfilling this request.exceptionorg.hibernate.exception.JDBCConnectionException: could not load an entity: [entity.User#1]
……root causecom.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failureThe last packet successfully received from the server was 280,216 milliseconds ago. The last packet sent successfully to the server was 1 milliseconds ago.
sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
……希望大家指点迷津……
解决方案 »
- jstl sql标签 和servlet 在jsp页面
- 控制广告显示时间
- sql server2000 中的%
- 数据库
- 谁有《Jsp应用开发详解》(第二版)的电子版的下载?(在线关注,非常感谢!)
- tomcat5.x log4j问题
- hibernate 连接oracle总是初相 oracle.jdbc.driver.OracleDatabaseMetaData.supportsGetGen
- 请教一个jsp和ejb的问题
- Jtree控件的事件触发问题,在线等待!!!
- msn风格,各位大家都用过msn,foxmail,qq.小弟想问问那位大哥知道有下角的提醒是怎么弄出来的?
- tomcat6.0和迅雷端口重复问题
- 分布式缓存的服务器更新
这个问题应该是连接失效了.mysql数据库的连接是有时长的,超过设置的时长,mysql服务器自动会把连接回收.这个时长需要在mysql的my.ini文件里面设置.