Hibernate提示could not load an entity
时间:2011-12-08
来源:互联网
系统是Win7,在本地Mysql数据库里测试没问题。但是,如果连接上远程Linux上的Mysql数据库,过一段时间就会出现问题,在插入一条记录时,提示下列信息。
HTTP Status 500 -
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.hibernate.exception.JDBCConnectionException: could not load an entity: [entity.User#1]
……
root cause
com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
The 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 report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.hibernate.exception.JDBCConnectionException: could not load an entity: [entity.User#1]
……
root cause
com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
The 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)
……
希望大家指点迷津……
作者: rokeer 发布时间: 2011-12-08
连接超时引起的
要看你具体的代码
要看你具体的代码
作者: tianshi1017 发布时间: 2011-12-08
你是不是用到了连接池呢?
这个问题应该是连接失效了.mysql数据库的连接是有时长的,超过设置的时长,mysql服务器自动会把连接回收.这个时长需要在mysql的my.ini文件里面设置.
这个问题应该是连接失效了.mysql数据库的连接是有时长的,超过设置的时长,mysql服务器自动会把连接回收.这个时长需要在mysql的my.ini文件里面设置.
作者: liupengxia 发布时间: 2011-12-08
相关阅读 更多
热门阅读
-
office 2019专业增强版最新2021版激活秘钥/序列号/激活码推荐 附激活工具
阅读:74
-
如何安装mysql8.0
阅读:31
-
Word快速设置标题样式步骤详解
阅读:28
-
20+道必知必会的Vue面试题(附答案解析)
阅读:37
-
HTML如何制作表单
阅读:22
-
百词斩可以改天数吗?当然可以,4个步骤轻松修改天数!
阅读:31
-
ET文件格式和XLS格式文件之间如何转化?
阅读:24
-
react和vue的区别及优缺点是什么
阅读:121
-
支付宝人脸识别如何关闭?
阅读:21
-
腾讯微云怎么修改照片或视频备份路径?
阅读:28