org.springframework.dao.InvalidDataAccessApiUsageException: deleted object would be re-saved by cascade (remove deleted object from associations): [com.atlassian.bamboo.plan.artifact.ConsumedSubscriptionImpl#33456779]; nested exception is org.hibernate.ObjectDeletedException: deleted object would be re-saved by cascade (remove deleted object from associations): [com.atlassian.bamboo.plan.artifact.ConsumedSubscriptionImpl#33456779]

Atlassian JIRA | Nathan Burrell [Atlassian] | 2 years ago
  1. 0

    When the build expiry process runs the following exception is thrown. {noformat} 2015-04-28 14:18:43,196 WARN [7-BuildExpiryBean:pool-14-thread-1] [BuildExpiryBeanImpl] Unable to expire MVN-BUILD-23 org.springframework.dao.InvalidDataAccessApiUsageException: deleted object would be re-saved by cascade (remove deleted object from associations): [com.atlassian.bamboo.plan.artifact.ConsumedSubscriptionImpl#33456779]; nested exception is org.hibernate.ObjectDeletedException: deleted object would be re-saved by cascade (remove deleted object from associations): [com.atlassian.bamboo.plan.artifact.ConsumedSubscriptionImpl#33456779] at org.springframework.orm.hibernate3.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:689) at org.springframework.orm.hibernate3.HibernateAccessor.convertHibernateAccessException(HibernateAccessor.java:414) at org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:416) at org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:341) at com.atlassian.bamboo.plan.PlanHibernateDao.getPlanByKey(PlanHibernateDao.java:72) at sun.reflect.GeneratedMethodAccessor1170.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157) at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:98) at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:262) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:95) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:207) at com.sun.proxy.$Proxy60.getPlanByKey(Unknown Source) at com.atlassian.bamboo.plan.PlanManagerImpl.getPlanByKey(PlanManagerImpl.java:102) at com.atlassian.bamboo.plan.PlanManagerImpl.getPlanByKey(PlanManagerImpl.java:159) at sun.reflect.GeneratedMethodAccessor1200.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157) at com.atlassian.bamboo.security.acegi.intercept.aopalliance.AuthorityOverrideMethodSecurityInterceptor.invoke(AuthorityOverrideMethodSecurityInterceptor.java:30) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:98) at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:262) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:95) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:207) at com.sun.proxy.$Proxy63.getPlanByKey(Unknown Source) at com.atlassian.bamboo.resultsummary.BuildResultsSummaryManagerImpl$3.run(BuildResultsSummaryManagerImpl.java:922) at com.atlassian.bamboo.util.BambooProfilingUtils.withUtilTimerStack(BambooProfilingUtils.java:98) at com.atlassian.bamboo.resultsummary.BuildResultsSummaryManagerImpl.removeChainResult(BuildResultsSummaryManagerImpl.java:912) at com.atlassian.bamboo.resultsummary.BuildResultsSummaryManagerImpl.removeResultSummary(BuildResultsSummaryManagerImpl.java:880) at sun.reflect.GeneratedMethodAccessor2178.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157) at com.atlassian.bamboo.security.acegi.intercept.aopalliance.AuthorityOverrideMethodSecurityInterceptor.invoke(AuthorityOverrideMethodSecurityInterceptor.java:30) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:98) at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:262) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:95) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:207) at com.sun.proxy.$Proxy59.removeResultSummary(Unknown Source) at com.atlassian.bamboo.build.expiry.BuildExpiryBeanImpl.expireResultSummaries(BuildExpiryBeanImpl.java:378) at com.atlassian.bamboo.build.expiry.BuildExpiryBeanImpl.access$800(BuildExpiryBeanImpl.java:47) at com.atlassian.bamboo.build.expiry.BuildExpiryBeanImpl$2.doInHibernate(BuildExpiryBeanImpl.java:339) at org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:411) at org.springframework.orm.hibernate3.HibernateTemplate.executeWithNativeSession(HibernateTemplate.java:379) at com.atlassian.bamboo.persistence.BambooTransactionHibernateTemplate$1.doInTransaction(BambooTransactionHibernateTemplate.java:52) at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:133) at com.atlassian.bamboo.persistence.BambooTransactionHibernateTemplate.execute(BambooTransactionHibernateTemplate.java:41) at com.atlassian.bamboo.persistence.BambooTransactionHibernateTemplate.execute(BambooTransactionHibernateTemplate.java:47) at com.atlassian.bamboo.build.expiry.BuildExpiryBeanImpl.expireBuildPlan(BuildExpiryBeanImpl.java:328) at com.atlassian.bamboo.build.expiry.BuildExpiryBeanImpl$1.call(BuildExpiryBeanImpl.java:159) at com.atlassian.bamboo.build.expiry.BuildExpiryBeanImpl$1.call(BuildExpiryBeanImpl.java:113) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at com.atlassian.bamboo.utils.BambooRunnables$1.run(BambooRunnables.java:49) at com.atlassian.bamboo.security.ImpersonationHelper.runWith(ImpersonationHelper.java:31) at com.atlassian.bamboo.security.ImpersonationHelper.runWithSystemAuthority(ImpersonationHelper.java:20) at com.atlassian.bamboo.security.ImpersonationHelper$1.run(ImpersonationHelper.java:52) at java.lang.Thread.run(Thread.java:745) Caused by: org.hibernate.ObjectDeletedException: deleted object would be re-saved by cascade (remove deleted object from associations): [com.atlassian.bamboo.plan.artifact.ConsumedSubscriptionImpl#33456779] at org.hibernate.impl.SessionImpl.forceFlush(SessionImpl.java:1230) at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:188) at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:117) at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:93) at org.hibernate.impl.SessionImpl.fireSaveOrUpdate(SessionImpl.java:685) at org.hibernate.impl.SessionImpl.saveOrUpdate(SessionImpl.java:677) at org.hibernate.engine.CascadingAction$5.cascade(CascadingAction.java:252) at org.hibernate.engine.Cascade.cascadeToOne(Cascade.java:392) at org.hibernate.engine.Cascade.cascadeAssociation(Cascade.java:335) at org.hibernate.engine.Cascade.cascadeProperty(Cascade.java:204) at org.hibernate.engine.Cascade.cascadeCollectionElements(Cascade.java:425) at org.hibernate.engine.Cascade.cascadeCollection(Cascade.java:362) at org.hibernate.engine.Cascade.cascadeAssociation(Cascade.java:338) at org.hibernate.engine.Cascade.cascadeProperty(Cascade.java:204) at org.hibernate.engine.Cascade.cascade(Cascade.java:161) at org.hibernate.event.def.AbstractFlushingEventListener.cascadeOnFlush(AbstractFlushingEventListener.java:154) at org.hibernate.event.def.AbstractFlushingEventListener.prepareEntityFlushes(AbstractFlushingEventListener.java:145) at org.hibernate.event.def.AbstractFlushingEventListener.flushEverythingToExecutions(AbstractFlushingEventListener.java:88) at org.hibernate.event.def.DefaultAutoFlushEventListener.onAutoFlush(DefaultAutoFlushEventListener.java:58) at org.hibernate.impl.SessionImpl.autoFlushIfRequired(SessionImpl.java:1185) at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1709) at org.hibernate.impl.CriteriaImpl.list(CriteriaImpl.java:347) at org.hibernate.impl.CriteriaImpl.uniqueResult(CriteriaImpl.java:369) at com.atlassian.bamboo.plan.PlanHibernateDao$1.doInHibernate(PlanHibernateDao.java:81) at org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:411) {noformat} *Workaround:* As a workaround, you can go to {{Bamboo administration >> Plans >> Expiry}} There, instead of deleting almost everything as you have now (_Complete build & deployment results, build & release artifacts and all logs_), please configure it to delete just: - Build and release artifacts only - Build and deployment result logs only. If that isn't your case or this workaround does not work for you, please raise an issue with us: http://support.atlassian.com

    Atlassian JIRA | 2 years ago | Nathan Burrell [Atlassian]
    org.springframework.dao.InvalidDataAccessApiUsageException: deleted object would be re-saved by cascade (remove deleted object from associations): [com.atlassian.bamboo.plan.artifact.ConsumedSubscriptionImpl#33456779]; nested exception is org.hibernate.ObjectDeletedException: deleted object would be re-saved by cascade (remove deleted object from associations): [com.atlassian.bamboo.plan.artifact.ConsumedSubscriptionImpl#33456779]
  2. 0

    Extremely weird deleted object would be re-saved by cascade error

    Stack Overflow | 2 years ago | James
    org.hibernate.ObjectDeletedException: deleted object would be re-saved by cascade (remove deleted object from associations): [com.amazon.promotions.storage.hibernate.types.Hospital#57]
  3. 0

    deleted object would be re-saved by cascade (remove deleted object from associations)

    Stack Overflow | 4 years ago | MahmoudS
    org.springframework.dao.InvalidDataAccessApiUsageException: deleted object would be re-saved by cascade (remove deleted object from associations): [com.xeno.advertisingsuite.web.domain.PlaylistadMap#6]; nested exception is org.hibernate.ObjectDeletedException: deleted object would be re-saved by cascade (remove deleted object from associations): [com.xeno.advertisingsuite.web.domain.PlaylistadMap#6]
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    JSF and Hibernate problem

    Oracle Community | 1 decade ago | 843842
    org.hibernate.ObjectDeletedException: deleted object would be re-saved by cascade (remove deleted object from associations): [com.amadesa.admin.model.bo.PagePhysical#4]
  6. 0

    Hibernate deleted Object whould be resaved

    Stack Overflow | 1 year ago | Pascal
    org.hibernate.ObjectDeletedException: deleted object would be re-saved by cascade (remove deleted object from associations): [x.y.z.interfaceentity.InterfaceMasterSignalGroup#1]

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. org.hibernate.ObjectDeletedException

      deleted object would be re-saved by cascade (remove deleted object from associations): [com.atlassian.bamboo.plan.artifact.ConsumedSubscriptionImpl#33456779]

      at org.hibernate.impl.SessionImpl.forceFlush()
    2. Hibernate
      SessionImpl.saveOrUpdate
      1. org.hibernate.impl.SessionImpl.forceFlush(SessionImpl.java:1230)
      2. org.hibernate.event.def.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:188)
      3. org.hibernate.event.def.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:117)
      4. org.hibernate.event.def.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:93)
      5. org.hibernate.impl.SessionImpl.fireSaveOrUpdate(SessionImpl.java:685)
      6. org.hibernate.impl.SessionImpl.saveOrUpdate(SessionImpl.java:677)
      6 frames
    3. Hibernate
      Cascade.cascade
      1. org.hibernate.engine.CascadingAction$5.cascade(CascadingAction.java:252)
      2. org.hibernate.engine.Cascade.cascadeToOne(Cascade.java:392)
      3. org.hibernate.engine.Cascade.cascadeAssociation(Cascade.java:335)
      4. org.hibernate.engine.Cascade.cascadeProperty(Cascade.java:204)
      5. org.hibernate.engine.Cascade.cascadeCollectionElements(Cascade.java:425)
      6. org.hibernate.engine.Cascade.cascadeCollection(Cascade.java:362)
      7. org.hibernate.engine.Cascade.cascadeAssociation(Cascade.java:338)
      8. org.hibernate.engine.Cascade.cascadeProperty(Cascade.java:204)
      9. org.hibernate.engine.Cascade.cascade(Cascade.java:161)
      9 frames
    4. Hibernate
      CriteriaImpl.uniqueResult
      1. org.hibernate.event.def.AbstractFlushingEventListener.cascadeOnFlush(AbstractFlushingEventListener.java:154)
      2. org.hibernate.event.def.AbstractFlushingEventListener.prepareEntityFlushes(AbstractFlushingEventListener.java:145)
      3. org.hibernate.event.def.AbstractFlushingEventListener.flushEverythingToExecutions(AbstractFlushingEventListener.java:88)
      4. org.hibernate.event.def.DefaultAutoFlushEventListener.onAutoFlush(DefaultAutoFlushEventListener.java:58)
      5. org.hibernate.impl.SessionImpl.autoFlushIfRequired(SessionImpl.java:1185)
      6. org.hibernate.impl.SessionImpl.list(SessionImpl.java:1709)
      7. org.hibernate.impl.CriteriaImpl.list(CriteriaImpl.java:347)
      8. org.hibernate.impl.CriteriaImpl.uniqueResult(CriteriaImpl.java:369)
      8 frames
    5. com.atlassian.bamboo
      PlanHibernateDao$1.doInHibernate
      1. com.atlassian.bamboo.plan.PlanHibernateDao$1.doInHibernate(PlanHibernateDao.java:81)
      1 frame
    6. Hibernate
      HibernateTemplate.doExecute
      1. org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:411)
      1 frame