我正在尝试运行一个示例 Hibernate 程序,它将一个值插入数据库,但是我遇到了错误,我已经在我的构建路径中包含了 slf4j JAR 请帮助我解决这个问题。
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
org.hibernate.HibernateException: Could not parse configuration: /hibernate.cfg.xml
at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:2246)
at org.hibernate.cfg.Configuration.configure(Configuration.java:2158)
at org.hibernate.cfg.Configuration.configure(Configuration.java:2137)
at org.test1.HibernateTest.main(HibernateTest.java:18)
Caused by: org.dom4j.DocumentException: Error on line 2 of document : The document type declaration for root element type "hibernate-configuration" must end with '>'. Nested exception: The document type declaration for root element type "hibernate-configuration" must end with '>'.
at org.dom4j.io.SAXReader.read(SAXReader.java:482)
at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:2238)
... 3 more