我是 hibernate 新手,并尝试运行第一个应用程序,但收到此错误:
“-//Hibernate/Hibernate配置DTD 3.0//EN”
“http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd”>
<hibernate-configuration>
<session-factory>
<property name="hbm2ddl.auto">update</property>
<property name="dialect">org.hibernate.dialect.MySQLDialect</property>
<property name="connection.url">jdbc:mysql://localhost:3306/test</property>
<property name="connection.username">root</property>
<property name="connection.password">prashant</property>
<property name="connection.driver_class"> com.mysql.jdbc.Driver</property>
<mapping resource="employee.hbm.xml"/>
</session-factory>
</hibernate-configuration>
最佳答案
您的 hibernate.cfg.xml 中似乎有一些无效的 xml,因为它无法解析。
尝试将文件中的内容发布到此处,以便我们查看。
关于java - 线程中的异常 "main"org.hibernate.HibernateException : Could not parse,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43627814/