Hibernate-获得无效的配置错误。有人能帮我吗?

时间:2014-09-13 13:03:38

标签: hibernate

<?xml version="1.0" encoding="UTF-8"?>

<hibernate-configuration>
<session-factory>


<property name="hibernate dialect">org.hibernate.dialect.Oracle10gDialect</property>
<property name="hibernate.connection.driver_class">oracle.jdbc.OracleDriver</property>
<property name= "hibernate.connection.url">jdbc:oracle:thin:@localhost:1521:XE</property>
<property name="hibernate.connection.username">System</property>
<property name="hibernate.connection.password"> admin</property>



<mapping resource="OrderEntry.hbm.xml"/>

</session-factory>
</hibernate-configuration>

1 个答案:

答案 0 :(得分:1)

在xml版本之后在xml中添加doctype

<!DOCTYPE hibernate-configuration PUBLIC
        "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
        "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">