Dear OS community.
I have an issue when I change the status of a specimen from “collected” to “missed collection”.
The specimen was previously collected and stored in a dimensionless container. When I try to edit the status from “collected” to “missed collection”, I get an error message.
This is the output in the log file:
2017-10-23 16:06:28,666 [http-nio-8080-exec-10] ERROR com.krishagni.catissueplus.core.common.TransactionalInterceptor- Error doing work inside ResponseEvent com.krishagni.catissueplus.core.biospecimen.services.impl.SpecimenServiceImpl.updateSpecimen(RequestEvent)
org.hibernate.NonUniqueObjectException: a different object with the same identifier value was already associated with the session: [krishagni.catissueplus.beans.FormRecordEntryBean#993]
at org.hibernate.engine.internal.StatefulPersistenceContext.checkUniqueness(StatefulPersistenceContext.java:696)
at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.performUpdate(DefaultSaveOrUpdateEventListener.java:296)
at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.entityIsDetached(DefaultSaveOrUpdateEventListener.java:241)
at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:109)
at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:90)
at org.hibernate.internal.SessionImpl.fireSaveOrUpdate(SessionImpl.java:654)
at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:646)
at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:642)
at com.krishagni.catissueplus.core.de.repository.impl.FormDaoImpl.saveOrUpdateRecordEntry(FormDaoImpl.java:347)
at com.krishagni.catissueplus.core.de.domain.DeObject.delete(DeObject.java:146)
at com.krishagni.catissueplus.core.biospecimen.domain.Specimen.deleteEvents(Specimen.java:1249)
at com.krishagni.catissueplus.core.biospecimen.domain.Specimen.updateHierarchyStatus(Specimen.java:1286)
at com.krishagni.catissueplus.core.biospecimen.domain.Specimen.updateCollectionStatus(Specimen.java:756)
at com.krishagni.catissueplus.core.biospecimen.domain.Specimen.update(Specimen.java:685)
at com.krishagni.catissueplus.core.biospecimen.services.impl.SpecimenServiceImpl.saveOrUpdate(SpecimenServiceImpl.java:749)
at com.krishagni.catissueplus.core.biospecimen.services.impl.SpecimenServiceImpl.updateSpecimen(SpecimenServiceImpl.java:568)
at com.krishagni.catissueplus.core.biospecimen.services.impl.SpecimenServiceImpl.updateSpecimen_aroundBody10(SpecimenServiceImpl.java:214)
at com.krishagni.catissueplus.core.biospecimen.services.impl.SpecimenServiceImpl$AjcClosure11.run(SpecimenServiceImpl.java:1)
at org.aspectj.runtime.reflect.JoinPointImpl.proceed(JoinPointImpl.java:149)
at com.krishagni.catissueplus.core.common.TransactionalInterceptor$1.doInTransaction(TransactionalInterceptor.java:104)
at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:131)
at com.krishagni.catissueplus.core.common.TransactionalInterceptor.doWork0(TransactionalInterceptor.java:96)
at com.krishagni.catissueplus.core.common.TransactionalInterceptor.doWork(TransactionalInterceptor.java:78)
at com.krishagni.catissueplus.core.common.TransactionalInterceptor.ajc$inlineAccessMethod$com_krishagni_catissueplus_core_common_TransactionalInterceptor$com_krishagni_catissueplus_core_common_TransactionalInterceptor$doWork(TransactionalInterceptor.java:1)
at com.krishagni.catissueplus.core.common.TransactionalInterceptor.startTransaction(TransactionalInterceptor.java:64)
at com.krishagni.catissueplus.core.biospecimen.services.impl.SpecimenServiceImpl.updateSpecimen(SpecimenServiceImpl.java:210)
at com.krishagni.catissueplus.rest.controller.SpecimensController.updateSpecimen(SpecimensController.java:178)
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.web.method.support.InvocableHandlerMethod.invoke(InvocableHandlerMethod.java:215)
at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:132)
at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:104)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandleMethod(RequestMappingHandlerAdapter.java:743)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:672)
at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:82)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:919)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:851)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:953)
at org.springframework.web.servlet.FrameworkServlet.doPut(FrameworkServlet.java:866)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:664)
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:829)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:742)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:106)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
at com.krishagni.catissueplus.rest.filter.AuthTokenFilter.doFilter(AuthTokenFilter.java:152)
at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:343)
at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:260)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:478)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:80)
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:624)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:341)
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:783)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:798)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1441)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:748)
2017-10-23 16:06:28,715 [http-nio-8080-exec-10] ERROR com.krishagni.catissueplus.core.common.TransactionalInterceptor- No admin or IT admin email ID has been configured to send uncaught system errors
2017-10-23 16:06:28,767 [http-nio-8080-exec-10] ERROR com.krishagni.catissueplus.rest.RestErrorController- Error handling request
org.hibernate.NonUniqueObjectException: a different object with the same identifier value was already associated with the session: [krishagni.catissueplus.beans.FormRecordEntryBean#993]
at org.hibernate.engine.internal.StatefulPersistenceContext.checkUniqueness(StatefulPersistenceContext.java:696)
at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.performUpdate(DefaultSaveOrUpdateEventListener.java:296)
at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.entityIsDetached(DefaultSaveOrUpdateEventListener.java:241)
at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:109)
at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:90)
at org.hibernate.internal.SessionImpl.fireSaveOrUpdate(SessionImpl.java:654)
at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:646)
at org.hibernate.internal.SessionImpl.saveOrUpdate(SessionImpl.java:642)
at com.krishagni.catissueplus.core.de.repository.impl.FormDaoImpl.saveOrUpdateRecordEntry(FormDaoImpl.java:347)
at com.krishagni.catissueplus.core.de.domain.DeObject.delete(DeObject.java:146)
at com.krishagni.catissueplus.core.biospecimen.domain.Specimen.deleteEvents(Specimen.java:1249)
at com.krishagni.catissueplus.core.biospecimen.domain.Specimen.updateHierarchyStatus(Specimen.java:1286)
at com.krishagni.catissueplus.core.biospecimen.domain.Specimen.updateCollectionStatus(Specimen.java:756)
at com.krishagni.catissueplus.core.biospecimen.domain.Specimen.update(Specimen.java:685)
at com.krishagni.catissueplus.core.biospecimen.services.impl.SpecimenServiceImpl.saveOrUpdate(SpecimenServiceImpl.java:749)
at com.krishagni.catissueplus.core.biospecimen.services.impl.SpecimenServiceImpl.updateSpecimen(SpecimenServiceImpl.java:568)
at com.krishagni.catissueplus.core.biospecimen.services.impl.SpecimenServiceImpl.updateSpecimen_aroundBody10(SpecimenServiceImpl.java:214)
at com.krishagni.catissueplus.core.biospecimen.services.impl.SpecimenServiceImpl$AjcClosure11.run(SpecimenServiceImpl.java:1)
at org.aspectj.runtime.reflect.JoinPointImpl.proceed(JoinPointImpl.java:149)
at com.krishagni.catissueplus.core.common.TransactionalInterceptor$1.doInTransaction(TransactionalInterceptor.java:104)
at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:131)
at com.krishagni.catissueplus.core.common.TransactionalInterceptor.doWork0(TransactionalInterceptor.java:96)
at com.krishagni.catissueplus.core.common.TransactionalInterceptor.doWork(TransactionalInterceptor.java:78)
at com.krishagni.catissueplus.core.common.TransactionalInterceptor.ajc$inlineAccessMethod$com_krishagni_catissueplus_core_common_TransactionalInterceptor$com_krishagni_catissueplus_core_common_TransactionalInterceptor$doWork(TransactionalInterceptor.java:1)
at com.krishagni.catissueplus.core.common.TransactionalInterceptor.startTransaction(TransactionalInterceptor.java:64)
at com.krishagni.catissueplus.core.biospecimen.services.impl.SpecimenServiceImpl.updateSpecimen(SpecimenServiceImpl.java:210)
at com.krishagni.catissueplus.rest.controller.SpecimensController.updateSpecimen(SpecimensController.java:178)
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.web.method.support.InvocableHandlerMethod.invoke(InvocableHandlerMethod.java:215)
at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:132)
at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:104)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandleMethod(RequestMappingHandlerAdapter.java:743)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:672)
at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:82)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:919)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:851)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:953)
at org.springframework.web.servlet.FrameworkServlet.doPut(FrameworkServlet.java:866)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:664)
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:829)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:742)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:106)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
at com.krishagni.catissueplus.rest.filter.AuthTokenFilter.doFilter(AuthTokenFilter.java:152)
at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:343)
at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:260)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:478)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:80)
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:624)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:341)
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:783)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:798)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1441)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:748)
Thanks for any help!
Cheers, Michael