Object references an unsaved transient instance-Save the transient instance before flushing

Source: Internet
Author: User
Document directory
  • Stacktraces

This problem occurs only when many jar packages are removed during project writing.

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. Events: 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)

You just need to add the antlr-2.7.6.jar. 3 hours wasted on this, tangle.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.