异常信息:

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的解决方案相关推荐

  1. org.springframework.dao.InvalidDataAccessApiUsageException: ERR wrong number of arguments for ‘srem‘

    1.报错信息 org.springframework.dao.InvalidDataAccessApiUsageException: ERR wrong number of arguments for ...

  2. org.springframework.dao.InvalidDataAccessApiUsageException: Write operations are not allowed in r...

    2019独角兽企业重金招聘Python工程师标准>>> Struts Problem Report Struts has detected an unhandled exceptio ...

  3. org.springframework.dao.InvalidDataAccessApiUsageException: Write operations

    在配置 springmvc+hibernate+MySQL 的时候,出现如下问题: 异常信息: org.springframework.dao.InvalidDataAccessApiUsageExc ...

  4. org.springframework.dao.InvalidDataAccessApiUsageException

    org.springframework.dao.InvalidDataAccessApiUsageException: Write operations are not allowed in read ...

  5. org.springframework.dao.InvalidDataAccessApiUsageException: Cannot locate field code on class .....

    报错日志 org.springframework.dao.InvalidDataAccessApiUsageException: Cannot locate field code on class c ...

  6. 找不到org.springframework.dao.support.DaoSupport的类文件

    无法访问org.springframework.dao.support.DaoSupport   找不到org.springframework.dao.support.DaoSupport的类文件 或 ...

  7. java.lang.NoClassDefFoundError: org/springframework/dao/support/PersistenceE解决方法

    笔者是使用spring4.0时,报的错误: 原因是没有引入spring-tx-4.0.0.RELEASE.jar包,將spring-tx-4.0.0.RELEASE.jar添加到build path中 ...

  8. org.springframework.dao.IncorrectResultSizeDataAccessException: query did not return a unique result

    客户现场反馈考勤计算失败: 日志报错显示: org.springframework.dao.IncorrectResultSizeDataAccessException: query did not ...

  9. 达梦数据库 ,无效的列名, org.springframework.dao.DataIntegrityViolationException: Hibernate-related JDBC operat

    在达梦数据库中创建了一张表,然后向表中插入字段,报错如下 org.springframework.dao.DataIntegrityViolationException: Hibernate-rela ...

最新文章

  1. oracle 数据库开发应用实例,招生录取系统,oracle与plsql教程打包下载
  2. linux-shell命令之rmdir(remove dir)【删除目录】
  3. 周末狂欢赛1(玩游戏/Game,函数,JOIOI王国)
  4. 搜索Maven依赖资源_搜索Maven工件_搜索Maven构件_搜索依赖_搜索构件_搜索工件
  5. [Python] 增加维度或者减少维度:a.squeeze(axis) 和 a.unsqueeze(axis)
  6. 内网分享文件html源码,vue项目分享html页面(服务器只能内网访问)
  7. 计算机漏洞英语怎么说,漏洞英文,漏洞英文发音bug。
  8. mysql sql语句 编辑器_三个非常实用的开源SQL编辑器
  9. C# doevents
  10. 创建google账号收费_谷歌GMS认证收费标准
  11. vue-router动态路由实践
  12. Linux下使用为知笔记的坑和解决办法
  13. 推荐几个高质量的程序员 B 站视频账号
  14. 页面停留长时间不操作,一定时间退出系统
  15. 使用conda install安装库,如何提高速度
  16. linux用户读取文件过程,Python中读取写入文件并进行文件与用户交互的操作
  17. jdk11新特性——ZGC
  18. 2018年最新Mpvue Vue2 Vuex MintUi视频教程网盘分享
  19. OpenAi 语法修正
  20. anywhere 随起随用本地服务器

热门文章

  1. 金蝶EAS开发 第一弹:了解开发工具与基本使用(上)
  2. SQLite3的安装使用
  3. 解决Java ,class java.lang.String cannot be cast to class java.lang.Integer
  4. 【数学基础知识】证明三角形的中线交于一点
  5. 根据身份证解析出生年月
  6. 贪心--CF645E
  7. 20款Adobe AIR小游戏
  8. 互联网的前世今生:Web 1.0、2.0、3.0
  9. 多用户反馈win11系统软件莫名崩溃 微软:正抓紧修复补丁
  10. P3426 [POI2005]SZA-Template(kmp、dp)