Jsp页面中ajax提交数据:及hbm.xml文件中出现的错误

来源:互联网 发布:js里data属性 编辑:程序博客网 时间:2024/06/06 00:00

jqgrid获得数据dele+rowObject.uid+

Function dele(id)中传入的数据要用data包裹,另外action里的数据id要和

Data里面传入的一样。此外,action里 的方法中不要写参数

一般通过get set得到ajax提交的data数据。

当 名称不一样时会报如下错误

另外,Hbm.xml文件映射中 不能出现空格,否则出现如下错误:

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in class path resource [spring/applicationContext.xml]: Invocation of init method failed; nested exception is org.hibernate.InvalidMappingException: Could not parse mapping document from file D:/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/erp/WEB-INF/classes/hibernate/

 

Caused by: org.hibernate.InvalidMappingException: Could not parse mapping document from file D:/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/erp/WEB-INF/classes/hibernate

 

Caused by: org.hibernate.PropertyNotFoundException: field [taskassigdate ] not found on

 

 

Hbm.xml文件映射中 不能处理集合类型 当entity类中有集合类型的的属性时,汇报如下错误:

严重: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener

Caused by: org.hibernate.MappingException: Could not determine type for: java.util.List, at table:

如果坚持要放集合,则需将集合独立成一张表,在hbm.xml文件中建立对映关系(多对一,多对多等)。

原创粉丝点击