java - 线程中的异常 "main"org.hibernate.HibernateException : Could not parse

标签 java hibernate

我是 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/

相关文章:

java - 使用 PreBuiltTransportClient 调用 elasticsearch

java - hibernate 删除: SQLGrammarException Unexpected token: CROSS

java - Hibernate Criteria API - 添加标准 : string should be in collection

java - 如何进行 hibernate 手动连接?

java - native 存储过程与 Hibernate

java - 如何在java中搜索对象数组然后更新对象的一部分?

java - hibernate、jpa、c3p0 和警告 HHH000208

java - Cassandra 中未排序的 map 类型

java - 空窗口 JavaFX

java - org.hibernate.LazyInitializationException : could not initialize proxy - no Session