博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
object references an unsaved transient instance - save the transient instance before flushing
阅读量:6068 次
发布时间:2019-06-20

本文共 2685 字,大约阅读时间需要 8 分钟。

刚开是在写项目的时候,去掉了很多jar包所以才会出现这个问题

Struts Problem Report

Struts has detected an unhandled exception:

Messages:
  1. object references an unsaved transient instance - save the transient instance before flushing: com.yy.entity.Orgnization
  2. 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
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个小时浪费在这上,纠结.

转载地址:http://gwfgx.baihongyu.com/

你可能感兴趣的文章
layui-更多demo
查看>>
电脑 F键(功能键)的具体作用
查看>>
STM32F207Cube库函数USART中断接收
查看>>
比较两个圆的面积大小
查看>>
ble设备的第一次成功例子
查看>>
JVM自动内存管理机制
查看>>
loj2542「PKUWC2018」随机游走
查看>>
bzoj2564集合的面积
查看>>
Vue搭建后台项目
查看>>
app启动过程
查看>>
docker的四种网络模式
查看>>
MVC,MVP 和 MVVM 的图示
查看>>
localStorage
查看>>
etherlime-3-Etherlime Library API-Deployed Contract Wrapper
查看>>
docker swarm英文文档学习-8-在集群中部署服务
查看>>
毕业生是怎么一步步给培训班骗去学编程的
查看>>
java泛型中<?>和<T>有什么区别?
查看>>
oracle 12c使用问题总结
查看>>
冒泡排序
查看>>
Linux系统概要
查看>>