log4j:WARN No appenders could be found for logger (org.hibernate.cfg.Environment).
log4j:WARN Please initialize the log4j system properly.
Exception in thread "main" org.hibernate.HibernateException: Could not parse configuration: /hibernate.cfg.xml
at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1528)
at org.hibernate.cfg.Configuration.configure(Configuration.java:1462)
at org.hibernate.cfg.Configuration.configure(Configuration.java:1448)
at cn.th.hiberinate.Base.main(Base.java:16)
Caused by: org.dom4j.DocumentException: Error on line 4 of document : Content is not allowed in prolog. Nested exception: Content is not allowed in prolog.
at org.dom4j.io.SAXReader.read(SAXReader.java:482)
at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1518)
... 3 more
log4j:WARN Please initialize the log4j system properly.
Exception in thread "main" org.hibernate.HibernateException: Could not parse configuration: /hibernate.cfg.xml
at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1528)
at org.hibernate.cfg.Configuration.configure(Configuration.java:1462)
at org.hibernate.cfg.Configuration.configure(Configuration.java:1448)
at cn.th.hiberinate.Base.main(Base.java:16)
Caused by: org.dom4j.DocumentException: Error on line 4 of document : Content is not allowed in prolog. Nested exception: Content is not allowed in prolog.
at org.dom4j.io.SAXReader.read(SAXReader.java:482)
at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1518)
... 3 more
解决方案 »
- struts部署错误
- 新人求助ssh java.lang.NullPointerException
- jsp页面中如何获取request的属性,急!!!
- axis如何生成服务端的代码?具体步骤
- 刚出道,应该选择做那样呢(技术)
- 如果程序员把美工也精通了是不是找工作时就更有优势呢?
- 如何用 JBuider 创建一个 jar 文件
- struts配置问题,请教一下
- 怎样配置tomcat使其能运行servlet?
- 我定义的rs应该为空,可它执行的却是它不为空的语句,请各位指教
- 为什么安装了IntelliJ IDEA 8.1.2后,我的电脑找不到JDK文件?
- struts+spring+hibernate,修改记录时经常是插入新记录(有时会修改相应记录)
你试试“http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd”。替换为正确的DTD路径:“http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd”。
2.如果上述无误,还有可能映射文件中配置有问题