S2SH3配置错误

来源:互联网 发布:阿里云域名空间 编辑:程序博客网 时间:2024/04/27 21:33

1.   严重: Exception sending context initializedevent to listener instance of class

 

org.springframework.web.context.ContextLoaderListener

org.springframework.beans.factory.BeanCreationException:Error creating bean with name 'sessionFactory' defined in class path resource[applicationContext.xml]: Invocation of init method failed; nested exception isorg.hibernate.MappingException: Association references unmapped class:OutStroege

Caused by:org.hibernate.MappingException:Association references unmapped class: OutStroege

解决方法:

检查所有与这张表有关联的 .hbm.xml 的CLASS路径是否正确。

如:

<hibernate-mappingpackage="com.yt.entity">

 

2.  Caused by:

org.xml.sax.SAXParseException: Element type "prpperty" must be declared.

配置文件中属性错误,应该是property

 

3.  Caused by:

org.xml.sax.SAXParseException:Documentroot element "hibernate-maaping", mustmatch DOCTYPE root "hibernate-mapping".

    Hbm.xml配置文件中<hibernate-mapping >属性拼写错误。

 

 

4.  Caused by:

 org.dom4j.DocumentException: Error on line 15 of document : The element type "hibernate-mapping" must be terminated bythe matching end-tag "</hibernate-mapping>". Nested exception:The element type "hibernate-mapping" must be terminated by thematching end-tag "</hibernate-mapping>".

配置文件hbm.xml中前后不匹配< hibernate-mapping >< hibernate-maaping />

 

5.   Caused by:org.hibernate.PropertyNotFoundException: Could not find a getter for goodsname in classcom.yt.entity.InStroege

InStroege.java中的属性和InStroege.hbm.xml中的属性没有对起(本处错误:InStroege.java中是goodsname而InStroege.hbm.xml中是goodsName)。