Project

General

Profile

bug #6281

delete synonym with annotations throws exception

Added by Katja Luther almost 2 years ago. Updated over 1 year ago.

Status:
Closed
Priority:
Highest
Assignee:
Category:
cdmlib
Target version:
Start date:
12/14/2016
Due date:
% Done:

0%

Severity:
critical
Found in Version:

Description

Das Löschen von Synonymen geht zwar letztlich, aber es kommt immer zuerst eine Fehlermeldung (s.u.).
Nur wenn man diese hartnäckig mit OK ignoriert, dann das Taxon schließt und wieder neu läd, sieht man, dass er das Löschen vollzogen hat.

Beste Grüße,
Norbert

login : ki
editor version : 4.4.0
server : api.cybertaxonomy.org / cybertaxonomy.org
schema version : 4.1.0.0.201607300000
os : Windows 7 6.1 amd64
java : 1.8.0_111
org.eclipse.core.commands.ExecutionException: While executing the operation, an exception occurred
                at org.eclipse.core.commands.operations.DefaultOperationHistory.execute(DefaultOperationHistory.java:521)
                at eu.etaxonomy.taxeditor.model.AbstractUtility$1.run(AbstractUtility.java:346)
                at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:464)
                at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:372)
                at org.eclipse.jface.window.ApplicationWindow$1.run(ApplicationWindow.java:759)
                at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
                at org.eclipse.jface.window.ApplicationWindow.run(ApplicationWindow.java:756)
                at org.eclipse.ui.internal.WorkbenchWindow.run(WorkbenchWindow.java:2649)
                at org.eclipse.ui.internal.progress.ProgressManager$RunnableWithStatus.run(ProgressManager.java:1346)
                at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
                at org.eclipse.ui.internal.progress.ProgressManager$7.run(ProgressManager.java:1184)
                at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:180)
                at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:150)
                at org.eclipse.swt.widgets.Display.syncExec(Display.java:4683)
                at org.eclipse.ui.internal.progress.ProgressManager.runInUI(ProgressManager.java:1182)
                at eu.etaxonomy.taxeditor.model.AbstractUtility.runInUI(AbstractUtility.java:658)
                at eu.etaxonomy.taxeditor.model.AbstractUtility.executeOperation(AbstractUtility.java:364)
                at eu.etaxonomy.taxeditor.editor.name.handler.DeleteTaxonBaseHandler.doExecute(DeleteTaxonBaseHandler.java:87)
                at eu.etaxonomy.taxeditor.editor.name.handler.DeleteTaxonBaseHandler.execute(DeleteTaxonBaseHandler.java:55)
                at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:293)
                at org.eclipse.core.commands.Command.executeWithChecks(Command.java:476)
                at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:508)
                at org.eclipse.ui.internal.handlers.HandlerService.executeCommand(HandlerService.java:169)
                at org.eclipse.ui.internal.handlers.SlaveHandlerService.executeCommand(SlaveHandlerService.java:241)
                at org.eclipse.ui.internal.handlers.SlaveHandlerService.executeCommand(SlaveHandlerService.java:241)
                at org.eclipse.ui.internal.handlers.SlaveHandlerService.executeCommand(SlaveHandlerService.java:241)
                at org.eclipse.ui.menus.CommandContributionItem.handleWidgetSelection(CommandContributionItem.java:829)
                at org.eclipse.ui.menus.CommandContributionItem.access$19(CommandContributionItem.java:815)
                at org.eclipse.ui.menus.CommandContributionItem$5.handleEvent(CommandContributionItem.java:805)
                at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
                at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
                at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4165)
                at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3754)
                at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2701)
                at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2665)
                at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2499)
                at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:679)
                at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
                at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:668)
                at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
                at eu.etaxonomy.taxeditor.Application.start(Application.java:24)
                at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
                at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
                at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
                at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:344)
                at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
                at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
                at java.lang.reflect.Method.invoke(Unknown Source)
                at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622)
                at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
                at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
Caused by: org.hibernate.AssertionFailure: collection owner not associated with session: eu.etaxonomy.cdm.model.common.OriginalSourceBase.annotations
                at org.hibernate.engine.internal.Collections.processDereferencedCollection(Collections.java:91)
                at org.hibernate.engine.internal.Collections.processUnreachableCollection(Collections.java:50)
                at org.hibernate.event.internal.AbstractFlushingEventListener.flushCollections(AbstractFlushingEventListener.java:243)
                at org.hibernate.event.internal.AbstractFlushingEventListener.flushEverythingToExecutions(AbstractFlushingEventListener.java:86)
                at org.hibernate.event.internal.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:38)
                at org.hibernate.internal.SessionImpl.flush(SessionImpl.java:1282)
                at org.hibernate.internal.SessionImpl.managedFlush(SessionImpl.java:465)
                at org.hibernate.internal.SessionImpl.flushBeforeTransactionCompletion(SessionImpl.java:2963)
                at org.hibernate.internal.SessionImpl.beforeTransactionCompletion(SessionImpl.java:2339)
                at org.hibernate.engine.jdbc.internal.JdbcCoordinatorImpl.beforeTransactionCompletion(JdbcCoordinatorImpl.java:485)
                at org.hibernate.resource.transaction.backend.jdbc.internal.JdbcResourceLocalTransactionCoordinatorImpl.beforeCompletionCallback(JdbcResourceLocalTransactionCoordinatorImpl.java:147)
                at org.hibernate.resource.transaction.backend.jdbc.internal.JdbcResourceLocalTransactionCoordinatorImpl.access$100(JdbcResourceLocalTransactionCoordinatorImpl.java:38)
                at org.hibernate.resource.transaction.backend.jdbc.internal.JdbcResourceLocalTransactionCoordinatorImpl$TransactionDriverControlImpl.commit(JdbcResourceLocalTransactionCoordinatorImpl.java:231)
                at org.hibernate.engine.transaction.internal.TransactionImpl.commit(TransactionImpl.java:65)
                at org.springframework.orm.hibernate5.HibernateTransactionManager.doCommit(HibernateTransactionManager.java:581)
                at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:761)
                at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:730)
                at org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(TransactionAspectSupport.java:485)
                at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:291)
                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:208)
                at com.sun.proxy.$Proxy606.deleteSynonym(Unknown Source)
                at sun.reflect.GeneratedMethodAccessor37609.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:302)
                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:208)
                at com.sun.proxy.$Proxy908.deleteSynonym(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 org.springframework.remoting.support.DefaultRemoteInvocationExecutor.invoke(DefaultRemoteInvocationExecutor.java:39)
                at org.springframework.remoting.support.RemoteInvocationBasedExporter.invoke(RemoteInvocationBasedExporter.java:78)
                at org.springframework.remoting.support.RemoteInvocationBasedExporter.invokeAndCreateResult(RemoteInvocationBasedExporter.java:114)
                at org.springframework.remoting.httpinvoker.HttpInvokerServiceExporter.handleRequest(HttpInvokerServiceExporter.java:74)
                at org.springframework.web.servlet.mvc.HttpRequestHandlerAdapter.handle(HttpRequestHandlerAdapter.java:51)
                at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:959)
                at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:893)
                at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:969)
                at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:871)
                at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
                at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:845)
                at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
                at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:808)
                at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669)
                at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:316)
                at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:126)
                at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:90)
                at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
                at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:114)
                at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
                at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:122)
                at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
                at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:169)
                at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
                at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:48)
                at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
                at org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilterInternal(BasicAuthenticationFilter.java:213)
                at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
                at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
                at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:120)
                at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
                at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:64)
                at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
                at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
                at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:91)
                at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
                at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:53)
                at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
                at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
                at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:213)
                at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:176)
                at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
                at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:262)
                at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
                at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:121)
                at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
                at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
                at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)
                at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
                at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577)
                at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)
                at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)
                at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)
                at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
                at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)
                at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
                at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:215)
                at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
                at org.eclipse.jetty.server.Server.handle(Server.java:497)
                at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310)
                at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)
                at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540)
                at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)
                at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)
                at java.lang.Thread.run(Thread.java:745)
                at org.springframework.remoting.support.RemoteInvocationUtils.fillInClientStackTraceIfPossible(RemoteInvocationUtils.java:45)
                at org.springframework.remoting.support.RemoteInvocationResult.recreate(RemoteInvocationResult.java:149)
                at org.springframework.remoting.support.RemoteInvocationBasedAccessor.recreateRemoteInvocationResult(RemoteInvocationBasedAccessor.java:85)
                at org.springframework.remoting.httpinvoker.HttpInvokerClientInterceptor.invoke(HttpInvokerClientInterceptor.java:150)
                at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
                at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:208)
                at com.sun.proxy.$Proxy36.deleteSynonym(Unknown Source)
                at eu.etaxonomy.taxeditor.editor.name.operation.DeleteSynonymOperation.execute(DeleteSynonymOperation.java:78)
                at org.eclipse.core.commands.operations.DefaultOperationHistory.execute(DefaultOperationHistory.java:513)
                ... 52 more

Associated revisions

Revision 20cfb7a6 (diff)
Added by Katja Luther almost 2 years ago

fix #6281: remove orphan removal for collections

Revision 61f0bdd2 (diff)
Added by Katja Luther over 1 year ago

fix #6281: call a flush after removing the synonym from taxon seems to fix the problem

Revision bd2dc401 (diff)
Added by Andreas Müller over 1 year ago

ref #6281 added doc for dao.flush()

Revision 8f24905c (diff)
Added by Katja Luther over 1 year ago

ref #6281: add test

History

#1 Updated by Katja Luther almost 2 years ago

this seems to be only a problem if the annotation is related to a synonym not if it is related to a taxon.
The exception is thrown during the method isDeletable for the name of the synonym while the annotation is at the synonym...
it is also no problem to delete the taxon with the annotated synonym

#2 Updated by Katja Luther almost 2 years ago

same problem, when the synonym has original sources.

login : W.Greuter
editor version : 4.4.1
server : api.cybertaxonomy.org / cybertaxonomy.org
schema version : 4.1.0.0.201607300000
os : Windows 7 6.1 amd64
java : 1.8.0_101
org.eclipse.core.commands.ExecutionException: While executing the operation, an exception occurred
                at org.eclipse.core.commands.operations.DefaultOperationHistory.execute(DefaultOperationHistory.java:521)
                at eu.etaxonomy.taxeditor.model.AbstractUtility$1.run(AbstractUtility.java:346)
                at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:464)
                at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:372)
                at org.eclipse.jface.window.ApplicationWindow$1.run(ApplicationWindow.java:759)
                at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
                at org.eclipse.jface.window.ApplicationWindow.run(ApplicationWindow.java:756)
                at org.eclipse.ui.internal.WorkbenchWindow.run(WorkbenchWindow.java:2649)
                at org.eclipse.ui.internal.progress.ProgressManager$RunnableWithStatus.run(ProgressManager.java:1346)
                at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
                at org.eclipse.ui.internal.progress.ProgressManager$7.run(ProgressManager.java:1184)
                at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:180)
                at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:150)
                at org.eclipse.swt.widgets.Display.syncExec(Display.java:4683)
                at org.eclipse.ui.internal.progress.ProgressManager.runInUI(ProgressManager.java:1182)
                at eu.etaxonomy.taxeditor.model.AbstractUtility.runInUI(AbstractUtility.java:658)
                at eu.etaxonomy.taxeditor.model.AbstractUtility.executeOperation(AbstractUtility.java:364)
                at eu.etaxonomy.taxeditor.editor.name.handler.DeleteTaxonBaseHandler.doExecute(DeleteTaxonBaseHandler.java:87)
                at eu.etaxonomy.taxeditor.editor.name.handler.DeleteTaxonBaseHandler.execute(DeleteTaxonBaseHandler.java:55)
                at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:293)
                at org.eclipse.core.commands.Command.executeWithChecks(Command.java:476)
                at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:508)
                at org.eclipse.ui.internal.handlers.HandlerService.executeCommand(HandlerService.java:169)
                at org.eclipse.ui.internal.handlers.SlaveHandlerService.executeCommand(SlaveHandlerService.java:241)
                at org.eclipse.ui.internal.handlers.SlaveHandlerService.executeCommand(SlaveHandlerService.java:241)
                at org.eclipse.ui.internal.handlers.SlaveHandlerService.executeCommand(SlaveHandlerService.java:241)
                at org.eclipse.ui.menus.CommandContributionItem.handleWidgetSelection(CommandContributionItem.java:829)
                at org.eclipse.ui.menus.CommandContributionItem.access$19(CommandContributionItem.java:815)
                at org.eclipse.ui.menus.CommandContributionItem$5.handleEvent(CommandContributionItem.java:805)
                at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
                at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
                at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4165)
                at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3754)
                at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2701)
                at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2665)
                at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2499)
                at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:679)
                at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
                at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:668)
                at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
                at eu.etaxonomy.taxeditor.Application.start(Application.java:24)
                at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
                at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
                at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
                at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:344)
                at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
                at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
                at java.lang.reflect.Method.invoke(Unknown Source)
                at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622)
                at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
                at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
                at org.eclipse.equinox.launcher.Main.main(Main.java:1386)
Caused by: org.hibernate.AssertionFailure: collection owner not associated with session: eu.etaxonomy.cdm.model.common.OriginalSourceBase.annotations
                at org.hibernate.engine.internal.Collections.processDereferencedCollection(Collections.java:91)
                at org.hibernate.engine.internal.Collections.processUnreachableCollection(Collections.java:50)
                at org.hibernate.event.internal.AbstractFlushingEventListener.flushCollections(AbstractFlushingEventListener.java:243)
                at org.hibernate.event.internal.AbstractFlushingEventListener.flushEverythingToExecutions(AbstractFlushingEventListener.java:86)
                at org.hibernate.event.internal.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:38)
                at org.hibernate.internal.SessionImpl.flush(SessionImpl.java:1282)
                at org.hibernate.internal.SessionImpl.managedFlush(SessionImpl.java:465)
                at org.hibernate.internal.SessionImpl.flushBeforeTransactionCompletion(SessionImpl.java:2963)
                at org.hibernate.internal.SessionImpl.beforeTransactionCompletion(SessionImpl.java:2339)
                at org.hibernate.engine.jdbc.internal.JdbcCoordinatorImpl.beforeTransactionCompletion(JdbcCoordinatorImpl.java:485)
                at org.hibernate.resource.transaction.backend.jdbc.internal.JdbcResourceLocalTransactionCoordinatorImpl.beforeCompletionCallback(JdbcResourceLocalTransactionCoordinatorImpl.java:147)
                at org.hibernate.resource.transaction.backend.jdbc.internal.JdbcResourceLocalTransactionCoordinatorImpl.access$100(JdbcResourceLocalTransactionCoordinatorImpl.java:38)
                at org.hibernate.resource.transaction.backend.jdbc.internal.JdbcResourceLocalTransactionCoordinatorImpl$TransactionDriverControlImpl.commit(JdbcResourceLocalTransactionCoordinatorImpl.java:231)
                at org.hibernate.engine.transaction.internal.TransactionImpl.commit(TransactionImpl.java:65)
                at org.springframework.orm.hibernate5.HibernateTransactionManager.doCommit(HibernateTransactionManager.java:581)
                at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:761)
                at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:730)
                at org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(TransactionAspectSupport.java:485)
                at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:291)
                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:208)
                at com.sun.proxy.$Proxy1579.deleteSynonym(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.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:302)
                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:208)
                at com.sun.proxy.$Proxy1665.deleteSynonym(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 org.springframework.remoting.support.DefaultRemoteInvocationExecutor.invoke(DefaultRemoteInvocationExecutor.java:39)
                at org.springframework.remoting.support.RemoteInvocationBasedExporter.invoke(RemoteInvocationBasedExporter.java:78)
                at org.springframework.remoting.support.RemoteInvocationBasedExporter.invokeAndCreateResult(RemoteInvocationBasedExporter.java:114)
                at org.springframework.remoting.httpinvoker.HttpInvokerServiceExporter.handleRequest(HttpInvokerServiceExporter.java:74)
                at org.springframework.web.servlet.mvc.HttpRequestHandlerAdapter.handle(HttpRequestHandlerAdapter.java:51)
                at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:959)
                at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:893)
                at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:969)
                at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:871)
                at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
                at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:845)
                at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
                at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:808)
                at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669)
                at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:316)
                at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:126)
                at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:90)
                at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
                at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:114)
                at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
                at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:122)
                at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
                at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:169)
                at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
                at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:48)
                at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
                at org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilterInternal(BasicAuthenticationFilter.java:213)
                at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
                at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
                at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:120)
                at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
                at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:64)
                at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
                at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
                at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:91)
                at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
                at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:53)
                at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
                at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
                at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:213)
                at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:176)
                at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
                at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:262)
                at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
                at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:121)
                at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
                at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
                at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)
                at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
                at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577)
                at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)
                at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)
                at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)
                at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
                at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)
                at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
                at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:215)
                at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
                at org.eclipse.jetty.server.Server.handle(Server.java:497)
                at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310)
                at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)
                at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540)
                at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)
                at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)
                at java.lang.Thread.run(Thread.java:745)
                at org.springframework.remoting.support.RemoteInvocationUtils.fillInClientStackTraceIfPossible(RemoteInvocationUtils.java:45)
                at org.springframework.remoting.support.RemoteInvocationResult.recreate(RemoteInvocationResult.java:149)
                at org.springframework.remoting.support.RemoteInvocationBasedAccessor.recreateRemoteInvocationResult(RemoteInvocationBasedAccessor.java:85)
                at org.springframework.remoting.httpinvoker.HttpInvokerClientInterceptor.invoke(HttpInvokerClientInterceptor.java:150)
                at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
                at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:208)
                at com.sun.proxy.$Proxy77.deleteSynonym(Unknown Source)
                at eu.etaxonomy.taxeditor.editor.name.operation.DeleteSynonymOperation.execute(DeleteSynonymOperation.java:78)
                at org.eclipse.core.commands.operations.DefaultOperationHistory.execute(DefaultOperationHistory.java:513)
                ... 53 more

#3 Updated by Andreas Kohlbecker almost 2 years ago

  • Description updated (diff)

#4 Updated by Andreas Müller almost 2 years ago

  • Target version changed from Release 4.5 to Release 4.6

#5 Updated by Katja Luther almost 2 years ago

  • Status changed from New to Resolved
  • % Done changed from 0 to 50

#6 Updated by Katja Luther almost 2 years ago

  • Assignee changed from Katja Luther to Andreas Müller
  • % Done changed from 50 to 0

after some more research it seems to be a problem of orphanRemoval=true.

I removed the orphan-removal annotation and it works now.
The entities of the collections are still removed after deleting the synonym because of the cascade.delete annotation.

#7 Updated by Katja Luther almost 2 years ago

  • Status changed from Resolved to In Progress
  • Assignee changed from Andreas Müller to Katja Luther

reverted the orphan-delete removal and try to reproduce when the problem appears. In a cdmlib test everything works fine. delete a taxon with a synonym having annotations attached works fine. Delete the synonym in bulkeditor creates the exception.

#8 Updated by Andreas Müller over 1 year ago

  • Target version changed from Release 4.6 to Release 4.7

#9 Updated by Katja Luther over 1 year ago

Only the deletion of synonym associated to a taxon throws this exception, a synonym created in bulkeditor can be deleted without problems

#10 Updated by Katja Luther over 1 year ago

  • Status changed from In Progress to Resolved
  • % Done changed from 0 to 50

#11 Updated by Katja Luther over 1 year ago

  • Status changed from Resolved to In Progress
  • % Done changed from 50 to 0

the last comment seems to contain the solution, after removing the synonym from the taxon, we have to call a flush. then the exception does not appear anymore.

#12 Updated by Katja Luther over 1 year ago

  • Status changed from In Progress to Resolved
  • Assignee changed from Katja Luther to Andreas Müller

#13 Updated by Andreas Müller over 1 year ago

  • Status changed from Resolved to Feedback

For me the flush feels like a dirty solution, but maybe I am wrong. I also remember that I ran into some kind of problem not long time ago because of this (or a similar) flush, but I don't remember exactly why and where and if it was really the final reason.

Anyway, could a explain a bit more, why the flush solves the problem/ why it is necessary here. Is there maybe also another solution (e.g. session.update(xxx)) to attache the collection to the session?

#14 Updated by Andreas Müller over 1 year ago

  • Assignee changed from Andreas Müller to Katja Luther

Anyway, the above solution seems to work for the given problem. At least, I can't reproduce any exception. Maybe you can give also to Norbert for review after release.

#15 Updated by Katja Luther over 1 year ago

I really tried different solutions with saving, reloading, updating but the only way to avoid the exception was the flush().

#16 Updated by Andreas Müller over 1 year ago

Katja Luther wrote:

I really tried different solutions with saving, reloading, updating but the only way to avoid the exception was the flush().

Do we have a test for this issue. This makes it easier to fix in future in case we run into problems with the flush. If not, can you create one.

#17 Updated by Katja Luther over 1 year ago

There is a test on cdmlib side but no at editor side. I will create one.

#18 Updated by Katja Luther over 1 year ago

  • Status changed from Feedback to Closed

added the test and close the ticket

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 40 MB)