Project

General

Profile

Actions

bug #9481

closed

ObjectDeletedException when swap syn and accepted with descriptions belonging to a descriptive dataset

Added by Katja Luther almost 2 years ago. Updated almost 2 years ago.

Status:
Closed
Priority:
Highest
Assignee:
Category:
cdmlib
Target version:
Start date:
Due date:
% Done:

90%

Estimated time:
Severity:
normal
Found in Version:
Tags:

Description

While swapping synonym to taxon, the descriptions are cloned but cannot be deleted with the old accepted taxon because they are still related to the descriptive dataset

last remote method : http://test.e-taxonomy.eu:80/cdmserver/rem_conf_am/remoting/taxon.service
last remote request client time : 2021-02-26T11:07:31.538
last remote request response header time : Fri, 26 Feb 2021 11:07:31 GMT
client error time : 2021-02-26T11:07:32.475
login : admin
editor version : 5.21.0.202102260844
server : test.e-taxonomy.eu (edit-test) / rem_conf_am
schema version : 5.18.6.0.20201124
os : Windows Server 2012 R2 6.3 amd64
java : 1.8.0_131
org.eclipse.swt.SWTException: Failed to execute runnable (org.hibernate.ObjectDeletedException: deleted object would be re-saved by cascade (remove deleted object from associations): [eu.etaxonomy.cdm.model.description.TaxonDescription#2823])
                at org.eclipse.swt.SWT.error(SWT.java:4533)
                at org.eclipse.swt.SWT.error(SWT.java:4448)
                at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:185)
                at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4211)
                at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3827)
                at org.eclipse.jface.window.Window.runEventLoop(Window.java:818)
                at org.eclipse.jface.window.Window.open(Window.java:794)
                at org.eclipse.jface.dialogs.MessageDialog.open(MessageDialog.java:396)
                at org.eclipse.jface.dialogs.MessageDialog.open(MessageDialog.java:424)
                at org.eclipse.jface.dialogs.MessageDialog.openWarning(MessageDialog.java:532)
                at eu.etaxonomy.taxeditor.model.MessagingUtils$4.run(MessagingUtils.java:583)
                at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
                at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:182)
                at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4211)
                at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3827)
                at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1121)
                at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
                at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1022)
...
Caused by: org.hibernate.ObjectDeletedException: deleted object would be re-saved by cascade (remove deleted object from associations): [eu.etaxonomy.cdm.model.description.TaxonDescription#2823]
                at org.hibernate.internal.SessionImpl.forceFlush(SessionImpl.java:1314)
                at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:170)
                at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:97)
                at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:73)
                at org.hibernate.internal.SessionImpl.fireSaveOrUpdate(SessionImpl.java:651)
                at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:643)
                at org.hibernate.engine.spi.CascadingActions$5.cascade(CascadingActions.java:218)
                at org.hibernate.engine.internal.Cascade.cascadeToOne(Cascade.java:423)
                at org.hibernate.engine.internal.Cascade.cascadeAssociation(Cascade.java:348)
                at org.hibernate.engine.internal.Cascade.cascadeProperty(Cascade.java:187)
                at org.hibernate.engine.internal.Cascade.cascadeCollectionElements(Cascade.java:456)
                at org.hibernate.engine.internal.Cascade.cascadeCollection(Cascade.java:388)
                at org.hibernate.engine.internal.Cascade.cascadeAssociation(Cascade.java:351)
                at org.hibernate.engine.internal.Cascade.cascadeProperty(Cascade.java:187)
                at org.hibernate.engine.internal.Cascade.cascade(Cascade.java:136)
                at org.hibernate.event.internal.AbstractFlushingEventListener.cascadeOnFlush(AbstractFlushingEventListener.java:150)
                at org.hibernate.event.internal.AbstractFlushingEventListener.prepareEntityFlushes(AbstractFlushingEventListener.java:141)
                at org.hibernate.event.internal.AbstractFlushingEventListener.flushEverythingToExecutions(AbstractFlushingEventListener.java:74)
                at org.hibernate.event.internal.DefaultAutoFlushEventListener.onAutoFlush(DefaultAutoFlushEventListener.java:44)
                at org.hibernate.internal.SessionImpl.autoFlushIfRequired(SessionImpl.java:1264)
                at org.hibernate.internal.SessionImpl.list(SessionImpl.java:1780)
                at org.hibernate.internal.CriteriaImpl.list(CriteriaImpl.java:363)
                at eu.etaxonomy.cdm.persistence.dao.hibernate.common.CdmEntityDaoBase.findByUuid(CdmEntityDaoBase.java:426)
                at eu.etaxonomy.cdm.persistence.dao.hibernate.common.CdmEntityDaoBase.findByUuid(CdmEntityDaoBase.java:413)
                at eu.etaxonomy.cdm.persistence.dao.hibernate.common.VersionableDaoBase.findByUuid(VersionableDaoBase.java:67)
                at eu.etaxonomy.cdm.persistence.dao.hibernate.common.VersionableDaoBase.findByUuid(VersionableDaoBase.java:36)
                at eu.etaxonomy.cdm.persistence.dao.hibernate.common.CdmEntityDaoBase.load(CdmEntityDaoBase.java:758)
                at eu.etaxonomy.cdm.persistence.dao.hibernate.common.VersionableDaoBase.load(VersionableDaoBase.java:93)
                at eu.etaxonomy.cdm.persistence.dao.hibernate.common.VersionableDaoBase.load(VersionableDaoBase.java:36)
                at eu.etaxonomy.cdm.api.service.ServiceBase.load(ServiceBase.java:190)
                at eu.etaxonomy.cdm.api.service.TaxonServiceImpl.isDeletable(TaxonServiceImpl.java:3017)
                at eu.etaxonomy.cdm.api.service.TaxonServiceImpl.deleteSynonym(TaxonServiceImpl.java:1235)
                at eu.etaxonomy.cdm.api.service.TaxonServiceImpl.swapSynonymAndAcceptedTaxon(TaxonServiceImpl.java:316)
                at eu.etaxonomy.cdm.api.service.TaxonServiceImpl.swapSynonymAndAcceptedTaxon(TaxonServiceImpl.java:3378)
                at sun.reflect.GeneratedMethodAccessor1872.invoke(Unknown Source)
                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                at java.lang.reflect.Method.invoke(Method.java:498)
                at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:333)
                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:99)
                at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:283)
                at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
                at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
                at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:213)
                at com.sun.proxy.$Proxy705.swapSynonymAndAcceptedTaxon(Unknown Source)
                at sun.reflect.GeneratedMethodAccessor1872.invoke(Unknown Source)
                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                at java.lang.reflect.Method.invoke(Method.java:498)
                at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:333)
                at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
                at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
                at org.springframework.remoting.support.RemoteInvocationTraceInterceptor.invoke(RemoteInvocationTraceInterceptor.java:78)
                at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
                at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:213)
                at com.sun.proxy.$Proxy1155.swapSynonymAndAcceptedTaxon(Unknown Source)
                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                at java.lang.reflect.Method.invoke(Method.java:498)
                at org.springframework.remoting.support.RemoteInvocation.invoke(RemoteInvocation.java:212)
                at eu.etaxonomy.cdm.api.remoting.DebuggingRemoteInvocationExecutor.invoke(DebuggingRemoteInvocationExecutor.java:52)

Files

picture093-1.png (25.6 KB) picture093-1.png Andreas Müller, 03/04/2021 03:08 PM
Actions #1

Updated by Andreas Müller almost 2 years ago

  • Tags set to additivity
  • Subject changed from DDS when swap syn and accepted with descriptions belonging to a descriptive dataset to ObjectDeletedException when swap syn and accepted with descriptions belonging to a descriptive dataset
  • % Done changed from 0 to 50
Actions #2

Updated by Andreas Müller almost 2 years ago

  • Description updated (diff)
Actions #3

Updated by Andreas Müller almost 2 years ago

is this for review?

Actions #4

Updated by Katja Luther almost 2 years ago

  • Status changed from New to Resolved
  • Assignee changed from Katja Luther to Andreas Müller
  • Priority changed from New to Highest

yes please review

Actions #5

Updated by Andreas Müller almost 2 years ago

No exception anymore, but it looks like the descriptions are duplicated now.

I ran on Arenaria serpyllifolia Bourg., Willk. & Lange swapping with Chamissoa acuminiata var. swansonii Sohmer. I did this 3x. Before there were 2 Descriptions (1 literatur, 1 default). Afterwards 16

So I guess it was duplicated 3x. 2 x2 x2 x2 = 16

Actions #6

Updated by Katja Luther almost 2 years ago

  • Status changed from Feedback to Resolved
Actions #7

Updated by Katja Luther almost 2 years ago

  • Assignee changed from Katja Luther to Andreas Müller

fixed.

Actions #8

Updated by Andreas Müller almost 2 years ago

  • Status changed from Resolved to Feedback
  • Assignee changed from Andreas Müller to Katja Luther
  • % Done changed from 50 to 90

Works as expected. I did a minor code cleanup. Please check if you think it is correct and close ticket if yes.

Actions #9

Updated by Katja Luther almost 2 years ago

  • Status changed from Feedback to Closed

Andreas Müller wrote:

Works as expected. I did a minor code cleanup. Please check if you think it is correct and close ticket if yes.

Is correct.

Actions

Also available in: Atom PDF