object references an unsaved transient instance - save the transient instance before flushing
刚开是在写项目的时候,去掉了很多jar包所以才会出现这个问题
Struts Problem Report
Struts has detected an unhandled exception:
Messages: |
|
File: | org/hibernate/engine/ForeignKeys.java |
Line number: | 243 |
Stacktraces
org.springframework.dao.InvalidDataAccessApiUsageException: object references an unsaved transient instance - save the transient instance before flushing: com.yy.entity.Orgnization; nested exception is org.hibernate.TransientObjectException: object references an unsaved transient instance - save the transient instance before flushing: com.yy.entity.Orgnization
org.springframework.orm.hibernate3.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:654)org.springframework.orm.hibernate3.HibernateTransactionManager.convertHibernateAccessException(HibernateTransactionManager.java:793)org.springframework.orm.hibernate3.HibernateTransactionManager.doCommit(HibernateTransactionManager.java:664)org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:754)org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:723)org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(TransactionAspectSupport.java:393)org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:120)org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)$Proxy14.save(Unknown Source)com.yy.action.OrgAction.save(OrgAction.java:101)sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)java.lang.reflect.Method.invoke(Method.java:597)
只需要添加上antlr-2.7.6.jar即可.3个小时浪费在这上,纠结.
转载于:https://www.cnblogs.com/JPAORM/archive/2011/11/09/2510246.html
object references an unsaved transient instance - save the transient instance before flushing相关推荐
- 关于object references an unsaved transient instance - save the transient instance before flushing的解决方法
关于object references an unsaved transient instance - save the transient instance before flushing的解决方法 ...
- object references an unsaved transient instance - save the transient instance before flushing .
http://blog.csdn.net/zdwzzu2006/article/details/7552234 异常1:not-null property references a null or t ...
- object references an unsaved transient instance save the transient instance before flushing
问题内容: 在一个hibernate项目中,为一个Model类添加一个多对一的配置 当表单中选择数据时对其多对一对象进行保存操作,没有选择的话则不对其做任何操作,如下面代码:当Attach不为空的情况 ...
- object references an unsaved transient instance - save the transient instance before flushing异常问题处理
object references an unsaved transient instance - save the transient instance before flushing异常问题处理 ...
- SpringBoot JPA多对一 持久化是报错object references an unsaved transient instance - save the transient instanc
@RequestMapping(value = "/updateRoleOper", method = RequestMethod.POST)@ApiOperation(value ...
- object references an unsaved transient instance - save the transient instance before flushing 解决过程。
前言 本篇博客记录一个Spring JPA报错的解决方案.这个报错源自于一个需求的的改动,由于原始的接口执行过于缓慢,所以要改造成为异步通知模式,也因此遇到了这个报错,浪费了一上午时间. 情景还原 由 ...
- 解决object references an unsaved transient instance - save the transient instance before flushing 的错误
异常信息: Caused by: org.hibernate.TransientPropertyValueException: object references an unsaved transie ...
- Hibernate中的级联策略和object references an unsaved transient instance - save the transient instance before
本片博文整理关于Hibernate中级联策略cascade和它导致的异常: Exception in thread "main" org.hibernate.TransientOb ...
- object references an unsaved transient instance【异常】
object references an unsaved transient instance[异常] 参考文章: (1)object references an unsaved transient ...
最新文章
- apache laravel主页500_PS强大笔刷,插画师完美Hold住各种效果!(附500个笔刷)
- 追求极简:Docker镜像构建演化史
- 京东共聚黑山县三方合力-农民丰收节·万祥军:谋定智慧农业
- TENSORFLOW GUIDE: EXPONENTIAL MOVING AVERAGE FOR IMPROVED CLASSIFICATION
- 第三章 Redis/SSDB+Twemproxy安装与使用
- 【MFC】带下拉菜单的工具栏
- Towxml 3.0来了,让小程序完美支持Markdown
- 关于 SAP CloudFoundry 应用的 Resilience
- 【深度学习系列】基础知识、模型学习
- 从XaaS到Java EE – 2012年哪一种该死的云最适合我?
- 【渝粤教育】国家开放大学2018年春季 7407-22T药物治疗学(本) 参考试题
- lvm 扩展根目录_转://如何增加linux根目录的磁盘空间(基于LVM)?
- y700支持m2硬盘_两块硬盘一起读写?奥睿科M.2 NVMe双盘位固态硬盘盒使用
- Atitit 数据与模板绑定法 目录 1.1. templet - 自定义列模板	1 1.2. 方式三:直接赋值模版字符。事实上,templet 也可以直接是一段 html 内容,如:	1 1.2.
- 运动耳机品牌排名榜,2022年最值得入手的运动耳机推荐
- 交叉编译Ghostscript
- 倒立摆控制系统matlab,单轴倒立摆控制系统设计及Matlab仿真毕业设计论文(资料4)...
- 网络学习 2g 3g 4g 5g技术对比
- android n换行格式,Android 写文件生成器的时候换行请用\r\n
- 这几行 C++ 代码,真的骚!