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 ...
随机推荐
- Unity3d:The requested item has been unloaded
问题描述:System.Xml类库下实例化的对象所有枚举类的值都显示如标题错误解决方案1:查看所在类是否:MonoBehaviour,如果没继承,添加即可.<ignore_js_op>
- python 自定义函数
200 ? "200px" : this.width)!important;} --> 介绍 在Python中,定义一个函数要使用def语句,依次写出函数名.括号.括号中的参 ...
- 在Button的click事件中引起客户端JavaScript
void action1_Execute(object sender, SimpleActionExecuteEventArgs e) { WebWindow.CurrentRequestWindow ...
- javaScript hook
今天在网上搜索了不少资料,基本概念如下: 钩子(Hook),是Windows消息处理机制的一个平台,应用程序可以在上面设置子程以监视指定窗口的某种消息,而且所监视的窗口可以是其他进程所创建的.当消息到 ...
- <meta http-equiv = "X-UA-Compatible" cotent = "IE=edge,chrome=1"/>
<meta http-equiv = "X-UA-Compatible" cotent = "IE=edge,chrome=1"/> 制定ie调用哪 ...
- requests设置headers,proxies,cookies
header = {'referer':'http://www.baidu.com'} # referer代表从什么网页跳过来的,其他属性同理设置 proxy = { 'http':'115.28.5 ...
- (3)HTML ”列表“、图片和超链接
本节解说 1. html支持的列表:无序列表.有序列表.定义列表 2. html中如何插入图片 3.html的超链接 <1> 无序列表 无序列表是一个项目的列表,此列项目使用粗体圆点(典型 ...
- Extjs随笔
{ columnWidth : .1, layout : 'form', items : [{ fieldLabel : "至", labelSeparator:'', label ...
- Java数据结构之树和二叉树(2)
从这里始将要继续进行Java数据结构的相关讲解,Are you ready?Let's go~~ Java中的数据结构模型可以分为一下几部分: 1.线性结构 2.树形结构 3.图形或者网状结构 接下来 ...
- Java学习笔记之方法重载,动态方法调度和抽象类
一.方法重载 如果子类中的方法与它的超类中的方法有相同的方法名,则称子类中的方法重载超类中的方法,特别是当超类和子类中的方法名和参数类型都相同时,在子类中调用该方法时,超类中的方法会被隐藏.考虑下面程 ...