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 ...
随机推荐
- String.Format格式说明(转)
C#格式化数值结果表 字符 说明 示例 输出 C 货币 string.Format("{0:C3}", 2) $2.000 D 十进制 string.Format("{0 ...
- Lucene/ElasticSearch 学习系列 (1) 为什么学,学什么,怎么学
为什么学 <What I wish I knew When I was 20>这本书给了我很多启发.作者在书中提到,Stanford 大学培养人才的目标是 ”T形人才“:精通某个领域,但对 ...
- Linux 调节屏幕亮度
intel的核心显卡驱动是在 /sys/class/backlight/intel_backlight/ 目录下面的brightness文件中配置的. 可以通过查看max_brightness的值来确 ...
- Spring中的设计模式
[Spring中的设计模式] http://www.uml.org.cn/j2ee/201301074.asp [详解设计模式在Spring中的应用] [http://www.geek521.c ...
- 开发过程中常用的Linux命令
做Java开发好几年了,部署JavaWeb到服务器上,一般都选择Linux,Linux作为服务器真是不二之选,高性能,只要熟悉Linux,操作快捷,效率很高. 总结一下工作中常用的Linux命令备忘: ...
- 使用UILocalizedIndexedCollation实现区域索引排序 及 不显示没有数据的区域
UILocalizedIndexedCollation可以实现区域排序,类似通讯录的样式. //首先进行初始化 locationCollation = [UILocalizedIndexedColla ...
- CUDA Memories--CUDA记忆体(翻译+整理+测试)
一边学习一边记录(本文中英结合,专业名词统统不翻译) 在CUDA里,host和devices有不同的记忆体空间. 首先呢,CUDA的memory有很多种类啦 1. Global memory 2. C ...
- Windows创建自动化任务
Windows创建自动化任务使得开机就打开相应的Python目录 1:计算机管理 2:找到任务计划程序 3:创建基本任务 4:任务触发器 5: 建立bat执行文件 start "" ...
- javascript实现继承的方式
this this表示当前对象,如果在全局作用范围内使用this,则指代当前页面对象window: 如果在函数中使用this,则this指代什么是根据运行时此函数在什么对象上被调用. 我们还可以使用a ...
- Microsoft Visual C++ Runtime Library Runtime Error的解决的方法
打开浏览器时,出现Microsoft Visual C++ Runtime Library Runtime Error错误,初步预计是软件冲突,可能有多种出错的方式,我的是浏览器自己主动关闭. 一. ...