Could not parse mapping document from file F:\dev\workspacesldgxzxd\framework\webroot\WEB-INF\conf\y

接下来我要放出另头疼的异常


 org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'varUserDeleteListener' defined in ServletContext resource [/WEB-INF/conf/techcomp/variability/applicationContext-variability.xml]: Cannot resolve reference to bean 'cacheSynchronizeManager' while setting bean property 'cacheSynchronizeManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'cacheSynchronizeManager' defined in ServletContext resource [/WEB-INF/conf/techcomp/cache/applicationContext.xml]: Cannot resolve reference to bean 'cache_cacheObjectTimestampDAO_dao' while setting bean property 'cacheTimestampDao'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'cache_cacheObjectTimestampDAO_dao' defined in ServletContext resource [/WEB-INF/conf/techcomp/cache/applicationContext-dao.xml]: Cannot resolve reference to bean 'sessionFactory' while setting bean property 'sessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in ServletContext resource [/WEB-INF/conf/platform/core/applicationContext-datasource.xml]: Invocation of init method failed; nested exception is org.hibernate.InvalidMappingException: Could not parse mapping document from file F:\dev\workspacesldgxzxd\framework\webroot\WEB-INF\conf\ynLaborRelationShip\approvalBusinessManager\hbm\viewOfficeServices.hbm.xml

前面这么多,最重要的就是最后一句。我的一个hibernate的实体类的配置文件解析异常,映射不到。项目运行的时候就会抛这样的异常。经过我研究其他没有报错的*.hbm.xml的配置文件,我发现的实体类没有设置id。

解决办法,将下面注视显示的bean替换成<id></id>

 <!-- the type 'RAW' could not be resolved.. defaulting to java.lang.String --><!--
    <property name="officeId" label="OFFICE_ID" type="java.lang.String" getStrategy="public" setStrategy="public">
      <column name="OFFICE_ID" not-null="false" length="16" />
      <constraint>
        <length max="16" />
      </constraint>
    </property>
    -->
      <id name="officeId" type="string" getStrategy="public" setStrategy="public">
         <column name="OFFICE_ID" length="16" />
         <generator class="uuid" />
      </id>

成功运行!!!





  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值