Project

General

Profile

Actions

bug #7013

closed

NonUniqueObjectException for setSecundumReferenceForSubtree

Added by Katja Luther over 5 years ago. Updated about 2 years ago.

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

100%

Estimated time:
Severity:
normal
Found in Version:

Description

The following exception occurs for SetSecundumReferenceForSubtree.


java.lang.IllegalStateException: org.hibernate.NonUniqueObjectException: A different object with the same identifier value was already associated with the session : [eu.etaxonomy.cdm.model.taxon.Taxon#3321]
    at eu.etaxonomy.taxeditor.util.ProgressMonitorClientManager.pollMonitor(ProgressMonitorClientManager.java:141)
    at eu.etaxonomy.taxeditor.util.ProgressMonitorClientManager.pollMonitor(ProgressMonitorClientManager.java:57)
    at eu.etaxonomy.taxeditor.model.AbstractUtility$5.run(AbstractUtility.java:921)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
Caused by: org.hibernate.NonUniqueObjectException: A different object with the same identifier value was already associated with the session : [eu.etaxonomy.cdm.model.taxon.Taxon#3321]
    at org.hibernate.engine.internal.StatefulPersistenceContext.checkUniqueness(StatefulPersistenceContext.java:648)
    at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.performUpdate(DefaultSaveOrUpdateEventListener.java:284)
    at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.entityIsDetached(DefaultSaveOrUpdateEventListener.java:227)
    at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:92)
    at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:73)
    at org.hibernate.internal.SessionImpl.fireSaveOrUpdate(SessionImpl.java:648)
    at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:640)
    at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:635)
    at eu.etaxonomy.cdm.persistence.dao.hibernate.common.CdmEntityDaoBase.saveOrUpdate(CdmEntityDaoBase.java:303)
    at eu.etaxonomy.cdm.api.service.ServiceBase.saveOrUpdate(ServiceBase.java:274)
    at eu.etaxonomy.cdm.api.service.TaxonServiceImpl.saveOrUpdate(TaxonServiceImpl.java:3222)
    at eu.etaxonomy.cdm.api.service.TaxonServiceImpl.saveOrUpdate(TaxonServiceImpl.java:1)
    at eu.etaxonomy.cdm.api.service.ServiceBase.saveOrUpdate(ServiceBase.java:35)
    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.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99)
    at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:281)
    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.$Proxy170.saveOrUpdate(Unknown Source)
    at eu.etaxonomy.cdm.api.service.TaxonNodeServiceImpl.setSecundumForSubtree(TaxonNodeServiceImpl.java:789)
    at eu.etaxonomy.cdm.api.service.TaxonNodeServiceImpl$1.doRun(TaxonNodeServiceImpl.java:872)
    at eu.etaxonomy.cdm.common.monitor.RemotingProgressMonitorThread.run(RemotingProgressMonitorThread.java:46)
Actions #1

Updated by Katja Luther over 5 years ago

This exception does not appear if it is called without the monitoring thread. As a workaround the monitoring thread is removed and we have to find a new solution with monitoring

Actions #2

Updated by Andreas Müller about 5 years ago

  • Target version changed from Release 4.11 to Release 4.12
Actions #3

Updated by Andreas Müller about 5 years ago

  • Target version changed from Release 4.12 to Release 4.13
Actions #4

Updated by Andreas Müller about 5 years ago

  • Target version changed from Release 4.13 to Release 4.14
Actions #5

Updated by Katja Luther almost 5 years ago

now this problem also appears whithout the progress monitor.

Hallo,
habe versucht, für die ganzen Apocynaceae in Fl. Cuba die sec. Ref. zu ändern, Fehler.
Funktioniert auch für nur eine Gattung nicht.
HG
W

login : 
editor version : 4.12.2
server :  ()
schema version : 
os : Windows 10 10.0 amd64
java : 1.8.0_161
org.hibernate.NonUniqueObjectException: A different object with the same identifier value was already associated with the session : [eu.etaxonomy.cdm.model.reference.Reference#151]
                at org.hibernate.engine.internal.StatefulPersistenceContext.checkUniqueness(StatefulPersistenceContext.java:648)
                at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.performUpdate(DefaultSaveOrUpdateEventListener.java:284)
                at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.entityIsDetached(DefaultSaveOrUpdateEventListener.java:227)
                at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:92)
                at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:73)
                at org.hibernate.internal.SessionImpl.fireSaveOrUpdate(SessionImpl.java:648)
                at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:640)
                at org.hibernate.engine.spi.CascadingActions$5.cascade(CascadingActions.java:218)
                at org.hibernate.engine.internal.Cascade.cascadeToOne(Cascade.java:398)
                at org.hibernate.engine.internal.Cascade.cascadeAssociation(Cascade.java:323)
                at org.hibernate.engine.internal.Cascade.cascadeProperty(Cascade.java:162)
                at org.hibernate.engine.internal.Cascade.cascade(Cascade.java:111)
                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:1251)
                at org.hibernate.internal.SessionImpl.list(SessionImpl.java:1767)
                at org.hibernate.internal.CriteriaImpl.list(CriteriaImpl.java:363)
                at eu.etaxonomy.cdm.persistence.dao.hibernate.common.CdmEntityDaoBase.findByUuid(CdmEntityDaoBase.java:375)
                at eu.etaxonomy.cdm.persistence.dao.hibernate.common.VersionableDaoBase.findByUuid(VersionableDaoBase.java:72)
                at eu.etaxonomy.cdm.persistence.dao.hibernate.common.VersionableDaoBase.findByUuid(VersionableDaoBase.java:37)
                at eu.etaxonomy.cdm.persistence.dao.hibernate.common.CdmEntityDaoBase.load(CdmEntityDaoBase.java:637)
                at eu.etaxonomy.cdm.persistence.dao.hibernate.common.VersionableDaoBase.load(VersionableDaoBase.java:92)
                at eu.etaxonomy.cdm.persistence.dao.hibernate.common.VersionableDaoBase.load(VersionableDaoBase.java:37)
                at eu.etaxonomy.cdm.persistence.dao.hibernate.taxon.TaxonNodeDaoHibernateImpl.setSecundum(TaxonNodeDaoHibernateImpl.java:498)
                at eu.etaxonomy.cdm.persistence.dao.hibernate.taxon.TaxonNodeDaoHibernateImpl.setSecundumForSubtreeAcceptedTaxa(TaxonNodeDaoHibernateImpl.java:472)
                at eu.etaxonomy.cdm.api.service.TaxonNodeServiceImpl.setSecundumForSubtree(TaxonNodeServiceImpl.java:801)
                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.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99)
                at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:281)
                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.$Proxy1841.setSecundumForSubtree(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.$Proxy2190.setSecundumForSubtree(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.$Proxy51.setSecundumForSubtree(Unknown Source)
                at eu.etaxonomy.taxeditor.navigation.navigator.operation.SetSecundumForSubtreeOperation$1.run(SetSecundumForSubtreeOperation.java:101)
                at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
Actions #6

Updated by Katja Luther almost 5 years ago

This seems to be a problem when the setSecundumForSubtree method was called with the same reference before.

Actions #7

Updated by Andreas Müller almost 5 years ago

  • Target version changed from Release 4.14 to Release 5.0
Actions #8

Updated by Katja Luther almost 5 years ago

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

this should be resolved with reload of the reference

Actions #9

Updated by Andreas Müller almost 5 years ago

  • Target version changed from Release 5.0 to Release 4.14
Actions #10

Updated by Andreas Müller about 2 years ago

  • Status changed from Resolved to Closed
  • % Done changed from 0 to 100

As far as I know and have tried this works now. Also the progress monitor seems to work again. Therefore I close the ticket.

Actions #11

Updated by Andreas Müller about 2 years ago

  • Assignee changed from Andreas Müller to Katja Luther
Actions

Also available in: Atom PDF