org.hibernate.InvalidMappingException: 无法解析来自资源 houseDocumenter/House 的映射文档。hbm.xml

org.hibernate.InvalidMappingException: Could not parse mapping document from resource houseDocumenter/House.hbm.xml

一直出现这个错误。 我正在使用日食月神 我的 House.hbm.xml 在 eclipse

中验证
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<!-- Generated 24-Oct-2015 10:24:27 by Hibernate Tools 3.4.0.CR1 -->
<hibernate-mapping>
    <class name="houseDocumenter.House" table="HOUSE">
        <id name="id" type="int">
            <column name="ID" />
            <generator class="assigned" />
        </id>
        <property name="imageURL" type="java.lang.String">
            <column name="IMAGEURL" />
        </property>
        <property name="propertyAddress" type="java.lang.String">
            <column name="PROPERTYADDRESS" />
        </property>
        <property name="evaluationCompleteYN" type="java.lang.String">
            <column name="EVALUATIONCOMPLETEYN" />
        </property>
        <property name="evaluationText" type="java.lang.String">
            <column name="EVALUATIONTEXT" />
        </property>
        <property name="followUpYN" type="java.lang.String">
            <column name="FOLLOWUPYN" />
        </property>
        <property name="followUpText" type="java.lang.String">
            <column name="FOLLOWUPTEXT" />
        </property>
        <property name="originatingWebURL" type="java.lang.String">
            <column name="ORIGINATINGWEBURL" />
        </property>
        <property name="price" type="int">
            <column name="PRICE" />
        </property>
        <property name="valueForMoney" type="java.lang.String">
            <column name="VALUEFORMONEY" />
        </property>
        <property name="valuationNotes" type="java.lang.String">
            <column name="VALUATIONNOTES" />
        </property>
        <property name="schoolNameKey" type="java.lang.String">
            <column name="SCHOOLNAMEKEY" />
        </property>
        <property name="schoolRatingKey" type="java.lang.String">
            <column name="SCHOOLRATINGKEY" />
        </property>
        <property name="broadbandProviderKey" type="java.lang.String">
            <column name="BROADBANDPROVIDERKEY" />
        </property>
        <property name="broadbandSpeed" type="int">
            <column name="BROADBANDSPEED" />
        </property>
        <property name="mobilePhoneConnectivity" type="java.lang.String">
            <column name="MOBILEPHONECONNECTIVITY" />
        </property>
        <property name="transportLinksOkYN" type="java.lang.String">
            <column name="TRANSPORTLINKSOKYN" />
        </property>
        <property name="tenure">
            <column name="TENURE" />
        </property>
    </class>
</hibernate-mapping>

我正在尝试使用 Hibernate 为我的系统生成字典 pojo。 它工作了一次,但后来放弃了。

如有任何帮助,我将不胜感激!

Hibernate 错误消息 window 包含以下内容:

org.hibernate.InvalidMappingException: Could not parse mapping document from resource houseDocumenter/House.hbm.xml
Could not parse mapping document from resource houseDocumenter/House.hbm.xml
org.hibernate.InvalidMappingException: Could not parse mapping document from resource houseDocumenter/House.hbm.xml
Could not parse mapping document from resource houseDocumenter/House.hbm.xml
org.hibernate.PropertyNotFoundException: field [tenure] not found on houseDocumenter.House
field [tenure] not found on houseDocumenter.House

我找到了我的特定问题的答案。 hbm.xml 想要一个类型。

上一个:

<property name="tenure">
            <column name="TENURE" />
        </property>

正确:

 <property name="tenure" type="java.lang.String">
            <column name="TENURE" />
        </property>

小事意义重大。

感谢所有看过的人。