---
title: "Could not parse configuration: /hibernate.cfg.xml"
author: "easonfans"
date: "2010-09-15T00:50:27Z"
tags: []
categories: ["企业架构"]
slug: "could-not-parse-configuration-hibernate-cfg-xml"
draft: false
lastmod: "2010-09-15T00:50:27Z"
id: 763461
url: "https://easonfans.iteye.com/blog/763461"
---

Could not parse configuration: /hibernate.cfg.xml

![](http://img.baidu.com/img/iknow/icn_point.gif) 悬赏分：0 - 解决时间：2008-12-25 09:36

```
对这个问题烦了好几天，终于解决了，原来版本问题。
1.如果是无法读取的话，则会直接报错，cannot find.
2.can not parse cofiguration:是因为你的jar包和你写的配置xml不对应，所以无法解析。
    可能有人就问了你怎么看我的Hibernate.jar的版本啊：
    你新建一个hibernate1.cfg.xml,内容随便写，然后你在里面的
<!DOCTYPE hibernate-mapping PUBLIC
        "-//Hibernate/Hibernate Mapping DTD//EN"
        "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
    上面的3.0就是版本号
3.解决问题
   1.将hibernate.cfg.xml如上，版本该过来
   2.将XXX.hbm.xml（映射表文件），版本也改过来（如上） 
```