设为首页 加入收藏

TOP

hibernate的org.dom4j.DocumentException:Connectiontimedout问题
2015-07-24 11:55:03 来源: 作者: 【 】 浏览:5
Tags:hibernate org.dom4j.DocumentException:Connectiontimedout 问题

hibbernate的异常的一种情况

一开始以为是数据库连接问题。。。。错了

Communication failure during handshake. Is there a server running on localhost:3306?这个才是数据库连接问题

---特别要注意版本对应,这种问就出现在下面了

问题定位:

org.dom4j.DocumentException: Connection timed out

Connection timed out: connect Nested exception: Connection timed out: connect

出现这个异常的原因之一是读取配置文件超时。

通常是在读取hibernate配置文件验证dtd时版本不对造成的。所以在生成hibernate配置文件的时候要注意配置文件的dtd版本。根据相应的hibernate.jar版本,生成对应的hbm.cfg.xml

如果出现以上异常 可以试下

转换试下

又或者是反过来!

】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
分享到: 
上一篇android开发,http工具类 下一篇mysqlcommandlineclient使用命令

评论

帐  号: 密码: (新用户注册)
验 证 码:
表  情:
内  容:

·数据库:推荐几款 Re (2025-12-25 12:17:11)
·如何最简单、通俗地 (2025-12-25 12:17:09)
·什么是Redis?为什么 (2025-12-25 12:17:06)
·对于一个想入坑Linux (2025-12-25 11:49:07)
·Linux 怎么读? (2025-12-25 11:49:04)