我有一個映射資源的問題在我的hibernate.cfg.xml - 我得到Hibernate映射的資源必須跟任一屬性規格,「>」或「/>」「。
Element type "mapping-resource" must be followed by either attribute specifications, ">" or "/>".'
我的hibernate.cfg.xml看起來像
<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
<session-factory>
<property name="datasourceName">java:jboss/datasources/MySqlDS</property>
<property name="dialect">org.hibernate.dialect.MySQLDialect</property>
<mapping-resource="com/mycompany/myapp/common/businessobjects/User.hbm.xml"/>
<mapping-resource="com/mycompany/myapp/common/businessobjects/Company.hbm.xml"/>
<mapping- resource="com/mycompany/myapp/common/businessobjects/ServerSettings.hbm.xml"/>
<mapping-resource="com/mycompany/myapp/common/businessobjects/Station.hbm.xml"/>
</session-factory>
</hibernate-configuration>
不知道是什麼問題?語法似乎正確?我在我的基礎測繪資源的東西上的信息在這裏
http://docs.jboss.org/hibernate/core/3.3/reference/en/html/session-configuration.html
想必當你在複製的XML映射'-____ resource'大空白髮生了什麼? –