org.springframework.dao.InvalidDataAccessApiUsageException:The given object has a null identifi的解决方案
异常信息:
org.springframework.dao.InvalidDataAccessApiUsageException: The given object has a null identifier: com.blog.entity.PersonalizedSettings; nested exception is org.hibernate.TransientObjectException: The given object has a null identifier: com.blog.entity.PersonalizedSettings
发生原因:抛这个异常是因为,当你在更新数据时,从JSP页面往Action传值没有传递ID值。
解决方案:把ID值放在隐藏域传递过去就OK了
<input type="hidden" name="personalizedSettings.id" value="<s:property value='personalizedSettings.id'/>"/>
版权声明:本文为博主原创文章,未经博主允许不得转载。
org.springframework.dao.InvalidDataAccessApiUsageException:The given object has a null identifi的解决方案的更多相关文章
- javaEE-----org.springframework.dao.InvalidDataAccessApiUsageException: Write operation
org.springframework.dao.InvalidDataAccessApiUsageException: Write operations are not allowed in read ...
- org.springframework.dao.InvalidDataAccessApiUsageException: Parameter value [41] did not match expected type [java.lang.Integer (n/a)];
题记:以前记录过一些自己遇到的BUG,这个行为,让我一看报错的提示信息就能定位到问题的所在,后来记得比较多了,好多是重复性的再加上比较忙就没有详细的记录了,今天的工作量比较小,就顺便记录一下,以便以后 ...
- org.springframework.dao.InvalidDataAccessApiUsageException: Write operations are not allowed in read-only mode
[spring]:org.springframework.dao.InvalidDataAccessApiUsageException: Write operations are not allowe ...
- OpenSessionInViewFilter与org.springframework.dao.InvalidDataAccessApiUsageException
报错:org.springframework.dao.InvalidDataAccessApiUsageException: Write operations are not allowed in r ...
- org.springframework.dao.InvalidDataAccessApiUsageException: detached entity passed to persist: sys.entity.Role; nested exception is org.hibernate.PersistentObjectException: 的解决方案
1.错误信息 org.springframework.dao.InvalidDataAccessApiUsageException: detached entity passed to persist ...
- Request processing failed; nested exception is org.springframework.dao.InvalidDataAccessApiUsageException: Multiple representations of the same entity解决方法
1.错误信息 Request processing failed; nested exception is org.springframework.dao.InvalidDataAccessApiUs ...
- hibernate框架学习错误集锦-org.springframework.dao.InvalidDataAccessApiUsageException: Write operations are not allowed in read-only mode (FlushMode.MANUAL)
最近学习ssh框架,总是出现这问题,后查证是没有开启事务. 如果采用注解方式,直接在业务层加@Transactional 并引入import org.springframework.transacti ...
- org.springframework.dao.InvalidDataAccessApiUsageException报错
2018-01-09 18:12:29,980 [qtp1501019626-21] ERROR - 外部接口调用方法[TestController$$EnhancerBySpringCGLIB$$8 ...
- org.springframework.dao.InvalidDataAccessApiUsageException
org.springframework.dao.InvalidDataAccessApiUsageException: Write operations are not allowed in read ...
随机推荐
- JPBM4.4基础及数据库说明
JPBM4.4基础及数据库说明 对jBPM4.4数据库的几张表简单介绍: A.资源库和运行时表结构 JBPM4_DEPLOYMENT 流程定义表 ...
- javascript数字转汉字中文数字
/* 工具包 */ var Utils={ /* 单位 */ units:'个十百千万@#%亿^&~', /* 字符 */ chars:'零一二三四五六七八九', /* 数字转中文 @numb ...
- sudo权限集中管理用法
#定义一组命令集合,名称DBA_CMD,禁止使用的命令前加!即可Cmnd_Alias DBA_CMD = /bin/touch,/bin/mkdir,/sbin/service,/sbin/chkc ...
- ActionBar ShareActionProvider
添加share按钮 添加share按钮的主要步骤: 1. 在ActionBar中添加share按钮 2. 从item中获取ShareActionProvider ShareActionProvider ...
- XGrid绑定(转)
using System; using System.Collections.Generic; using System.ComponentModel; using System.Windows.Fo ...
- C++ Bit Fields
http://msdn.microsoft.com/en-us/library/ewwyfdbe%28v=vs.71%29.aspx Note An unnamed bit field of widt ...
- HITAG 1/2/S
HITAG S -- 3rd generation HITAG™ family Modulation Read/Write Device to Transponder: 100 % ASK and B ...
- 使用adns库解析域名
1. adns.adns-python库简介 adns库是一个可进行异步非阻塞解析域名的库,主要使用C语言编写,在linux平台下运行.使用adns库进行域名解析效率非常,著名的开源网络爬虫larbi ...
- C++ Primer 学习笔记_46_STL实践与分析(20)--容器特有的算法
STL实践与分析 --容器特有的算法 与其它顺序容器所支持的操作相比,标准库为list容器定义了更精细的操作集合,使它不必仅仅依赖于泛型操作.当中非常大的一个原因就是list容器不是依照内存中的顺序进 ...
- UVALive 4222 Dance 模拟题
Dance 题目连接: https://icpcarchive.ecs.baylor.edu/index.php?option=com_onlinejudge&Itemid=8&pag ...