list下能不能 一对一
GoogdsOrder.hbm.xml
<list access="field" table="drp_listmerchan" name="merch">
<key column="merchId"/>
<list-index column="merchindex"/>
<composite-element class="com.wubobw.drp.vo.ListMerchandise">
<many-to-one unique="true" access="field" name="merchan" not-null="true" class="com.wubobw.drp.vo.ListMerchandise"> </many-to-one>
<property name="merchanNumber" access="field"/>
<property name="totalPrice" access="field"/>
</composite-element>
</list> Merchandise.hbm.xml
<one-to-one name="listMerchandise" access="field" class="com.wubobw.drp.vo.ListMerchandise" property-ref="merchan" />
Tomcat下运行报错
21:25:31,265 ERROR ContextLoader:204 - Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'managerorgimpl' defined in file [E:\Tomcat 5.5\webapps\DRP2\WEB-INF\classes\applicationContext-beans.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 file [E:\Tomcat 5.5\webapps\DRP2\WEB-INF\classes\applicationContext-common.xml]: Invocation of init method failed; nested exception is org.hibernate.MappingException: property-ref to unmapped class: com.wubobw.drp.vo.ListMerchandise
Caused by:
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in file [E:\Tomcat 5.5\webapps\DRP2\WEB-INF\classes\applicationContext-common.xml]: Invocation of init method failed; nested exception is org.hibernate.MappingException: property-ref to unmapped class: com.wubobw.drp.vo.ListMerchandise
Caused by:
org.hibernate.MappingException: property-ref to unmapped class: com.wubobw.drp.vo.ListMerchandise
有人能帮下么!!
GoogdsOrder.hbm.xml
<list access="field" table="drp_listmerchan" name="merch">
<key column="merchId"/>
<list-index column="merchindex"/>
<composite-element class="com.wubobw.drp.vo.ListMerchandise">
<many-to-one unique="true" access="field" name="merchan" not-null="true" class="com.wubobw.drp.vo.ListMerchandise"> </many-to-one>
<property name="merchanNumber" access="field"/>
<property name="totalPrice" access="field"/>
</composite-element>
</list> Merchandise.hbm.xml
<one-to-one name="listMerchandise" access="field" class="com.wubobw.drp.vo.ListMerchandise" property-ref="merchan" />
Tomcat下运行报错
21:25:31,265 ERROR ContextLoader:204 - Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'managerorgimpl' defined in file [E:\Tomcat 5.5\webapps\DRP2\WEB-INF\classes\applicationContext-beans.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 file [E:\Tomcat 5.5\webapps\DRP2\WEB-INF\classes\applicationContext-common.xml]: Invocation of init method failed; nested exception is org.hibernate.MappingException: property-ref to unmapped class: com.wubobw.drp.vo.ListMerchandise
Caused by:
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in file [E:\Tomcat 5.5\webapps\DRP2\WEB-INF\classes\applicationContext-common.xml]: Invocation of init method failed; nested exception is org.hibernate.MappingException: property-ref to unmapped class: com.wubobw.drp.vo.ListMerchandise
Caused by:
org.hibernate.MappingException: property-ref to unmapped class: com.wubobw.drp.vo.ListMerchandise
有人能帮下么!!
解决方案 »
- hibernate版本问题
- 多个spring配置相互引用的问题
- xfire中文问题,会的指点一下啊
- 大家帮忙 领导让我将汉字拼音对照表插入到oracle库中 字段是(id,汉字,拼音) 啊 a 阿 a e 埃 ai 挨 ai 哎 ai 唉 ai 哀 ai,一个字还可能对
- 问个tomcat的问题
- 一个JAVA文件包含多个类,如何编译?
- 连接不上sql server2000数据库
- 一个有关xml的奇怪问题
- 怎样理解EJB?哪里有好的例子下载?
- displaytag能否对接收到的日期变量进行转换
- (搜索引擎的模糊匹配)lucene适合海量数据的模糊匹配吗?寻求“类百家姓”在lucene的实现方法?
- 有没有人看过编程之美的
错误说的是属性引用了一个没有做影射的类.com.wubobw.drp.vo.ListMerchandise
重点看一下'managerorgimpl' 这个属性。