net.sf.hibernate.HibernateException: Flush during cascade is dangerous - this might occur if an object was deleted and then re-saved by cascade (remove deleted object from associations)

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Solutions on the web

via Atlassian JIRA by Zohar Melamed, 1 year ago
Flush during cascade is dangerous - this might occur if an object was deleted and then re-saved by cascade (remove deleted object from associations)
via Atlassian JIRA by Zohar Melamed, 1 year ago
Flush during cascade is dangerous - this might occur if an object was deleted and then re-saved by cascade (remove deleted object from associations)
via Atlassian JIRA by Mike Cannon-Brookes, 1 year ago
Flush during cascade is dangerous - this might occur if an object was deleted and then re-saved by cascade (remove deleted object from associations)
via Atlassian JIRA by Dave Loeng [Atlassian], 1 year ago
Flush during cascade is dangerous - this might occur if an object was deleted and then re-saved by cascade (remove deleted object from associations)
via Atlassian JIRA by Dave Loeng [Atlassian], 1 year ago
Flush during cascade is dangerous - this might occur if an object was deleted and then re-saved by cascade (remove deleted object from associations)
net.sf.hibernate.HibernateException: Flush during cascade is dangerous - this might occur if an object was deleted and then re-saved by cascade (remove deleted object from associations)
at net.sf.hibernate.impl.SessionImpl.flush(SessionImpl.java:2174)
at net.sf.hibernate.impl.SessionImpl.save(SessionImpl.java:711)
at net.sf.hibernate.impl.SessionImpl.saveOrUpdate(SessionImpl.java:1319)
at net.sf.hibernate.engine.Cascades$4.cascade(Cascades.java:114)
at net.sf.hibernate.engine.Cascades.cascade(Cascades.java:436)
at net.sf.hibernate.engine.Cascades.cascadeCollection(Cascades.java:526)
at net.sf.hibernate.engine.Cascades.cascade(Cascades.java:452)
at net.sf.hibernate.engine.Cascades.cascade(Cascades.java:503)
at net.sf.hibernate.engine.Cascades.cascade(Cascades.java:482)
at net.sf.hibernate.impl.SessionImpl.preFlushEntities(SessionImpl.java:2583)
at net.sf.hibernate.impl.SessionImpl.flushEverything(SessionImpl.java:2190)
at net.sf.hibernate.impl.SessionImpl.flush(SessionImpl.java:2179)
at net.sf.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:61)
at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:218)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:196)
at com.atlassian.confluence.pages.actions.RemovePageAction.doRemove(RemovePageAction.java:45)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at com.opensymphony.xwork.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:309)
at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:175)
at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:37)
at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:170)
at com.opensymphony.xwork.interceptor.DefaultWorkflowInterceptor.intercept(DefaultWorkflowInterceptor.java:58)
at com.atlassian.confluence.core.ConfluenceWorkflowInterceptor.intercept(ConfluenceWorkflowInterceptor.java:32)
at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:170)
at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:37)
at com.atlassian.confluence.core.ConfluenceValidationInterceptor.intercept(ConfluenceValidationInterceptor.java:18)
at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:170)
at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:37)
at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:170)
at com.atlassian.confluence.security.actions.PermissionCheckInterceptor.intercept(PermissionCheckInterceptor.java:40)
at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:170)
at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:37)
at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:170)
at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:37)
at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:170)
at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:37)
at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:170)
at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:37)
at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:170)
at com.opensymphony.xwork.DefaultActionProxy.execute(DefaultActionProxy.java:116)
at com.opensymphony.webwork.dispatcher.ServletDispatcher.serviceAction(ServletDispatcher.java:182)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:103)
at com.caucho.server.http.FilterChainServlet.doFilter(FilterChainServlet.java:96)
at com.atlassian.confluence.util.profiling.ProfilingPageFilter.parsePage(ProfilingPageFilter.java:36)
at com.caucho.server.http.FilterChainFilter.doFilter(FilterChainFilter.java:88)
at com.atlassian.seraph.filter.SecurityFilter.doFilter(SecurityFilter.java:161)
at com.caucho.server.http.FilterChainFilter.doFilter(FilterChainFilter.java:88)
at com.atlassian.seraph.filter.LoginFilter.doFilter(LoginFilter.java:181)
at com.caucho.server.http.FilterChainFilter.doFilter(FilterChainFilter.java:88)
at com.atlassian.johnson.filters.JohnsonFilter.doFilter(JohnsonFilter.java:96)
at com.caucho.server.http.FilterChainFilter.doFilter(FilterChainFilter.java:88)
at com.atlassian.confluence.setup.SpringSessionInViewFilter.doFilterInternal(SpringSessionInViewFilter.java:32)
at com.caucho.server.http.FilterChainFilter.doFilter(FilterChainFilter.java:88)
at com.atlassian.util.profiling.filters.ProfilingFilter.doFilter(ProfilingFilter.java:132)
at com.caucho.server.http.FilterChainFilter.doFilter(FilterChainFilter.java:88)
at com.atlassian.core.filters.AbstractEncodingFilter.doFilter(AbstractEncodingFilter.java:38)
at com.caucho.server.http.FilterChainFilter.doFilter(FilterChainFilter.java:88)
at com.caucho.server.http.Invocation.service(Invocation.java:315)
at com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:246)
at com.caucho.server.http.HttpRequest.handleConnection(HttpRequest.java:163)
at com.caucho.server.TcpConnection.run(TcpConnection.java:139)
at java.lang.Thread.run(Thread.java:534)

Users with the same issue

You are the first who have seen this exception.

Write tip

Know the solutions? Share your knowledge to help other developers to debug faster.