java.lang.RuntimeException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • We get export errors sometimes (IOException). The following is one example are they occurring because of some conflict in Opal? The Onyx error and Opal error occurred at the same time so assume they are related. (Hour difference because of the local time for Dalhousie) catalina.log: {code} 2014-12-11 18:37:15,313 - [http-8443-4] - INFO - tithreadedDatasourceCopier - Copy 1% complete. 2014-12-11 18:38:15,731 - [http-8443-4] - ERROR - page.ParticipantSearchPage - Error on data export. java.lang.RuntimeException: java.io.IOException: Server Error at org.obiba.magma.support.MultithreadedDatasourceCopier$ConcurrentValueSetWriter.run(MultithreadedDatasourceCopier.java:317) at org.obiba.magma.support.MultithreadedDatasourceCopier.write(MultithreadedDatasourceCopier.java:161) at org.obiba.magma.support.MultithreadedDatasourceCopier.copy(MultithreadedDatasourceCopier.java:149) at org.obiba.onyx.engine.variable.export.OnyxDataExport.internalExport(OnyxDataExport.java:209) at org.obiba.onyx.engine.variable.export.OnyxDataExport.exportInterviews(OnyxDataExport.java:143) at org.obiba.onyx.engine.variable.export.OnyxDataExport$$FastClassByCGLIB$$c7571da3.invoke(<generated>) at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149) at org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:689) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:622) at org.obiba.onyx.engine.variable.export.OnyxDataExport$$EnhancerByCGLIB$$3f62bd99.exportInterviews(<generated>) at org.obiba.onyx.engine.variable.export.OnyxDataExport$$FastClassByCGLIB$$c7571da3.invoke(<generated>) at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149) at org.apache.wicket.proxy.LazyInitProxyFactory$CGLibInterceptor.intercept(LazyInitProxyFactory.java:317) at WICKET_org.obiba.onyx.engine.variable.export.OnyxDataExport$$EnhancerByCGLIB$$e8962fa.exportInterviews(<generated>) at org.obiba.onyx.webapp.participant.page.ParticipantSearchPage$ActionFragment$7$1.onYesButtonClicked(ParticipantSearchPage.java:668) at org.obiba.onyx.wicket.reusable.ConfirmationDialog$1.onClose(ConfirmationDialog.java:45) at org.obiba.onyx.wicket.reusable.Dialog$7.onClose(Dialog.java:405) at org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow$WindowClosedBehavior.respond(ModalWindow.java:966) at org.apache.wicket.ajax.AbstractDefaultAjaxBehavior.onRequest(AbstractDefaultAjaxBehavior.java:302) at org.apache.wicket.request.target.component.listener.BehaviorRequestTarget.processEvents(BehaviorRequestTarget.java:157) at org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(AbstractRequestCycleProcessor.java:92) at org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1250) at org.apache.wicket.RequestCycle.step(RequestCycle.java:1329) at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1436) at org.apache.wicket.RequestCycle.request(RequestCycle.java:545) at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:486) at org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:319) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489) at java.lang.Thread.run(Thread.java:679) Caused by: java.io.IOException: Server Error at org.obiba.opal.rest.client.magma.RestValueTableWriter.checkResponse(RestValueTableWriter.java:101) at org.obiba.opal.rest.client.magma.RestValueTableWriter.access$100(RestValueTableWriter.java:32) at org.obiba.opal.rest.client.magma.RestValueTableWriter$2.close(RestValueTableWriter.java:87) at org.obiba.magma.support.MultithreadedDatasourceCopier$ConcurrentValueSetWriter.run(MultithreadedDatasourceCopier.java:315) ... 45 more 2014-12-12 06:30:52, … {code} opal.log: {code} 2014-12-11 17:38:09,227 [qtp95230463-28737] INFO org.obiba.magma.support.DatasourceCopier - Copying ValueTable 'ContraIndications' to 'clsa-dcs.ContraIndications' (copyMetadata=true, copyValues=false). 2014-12-11 17:38:13,899 [qtp95230463-28737] INFO org.hibernate.event.internal.DefaultLoadEventListener - HHH000327: Error performing load command : org.hibernate.StaleObjectStateException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect) : [org.obiba.magma.datasource.hibernate.domain.ValueTableState#138] 2014-12-11 17:38:13,903 [qtp95230463-28913] INFO org.obiba.magma.support.DatasourceCopier - Copying ValueTable 'LateralBoneDensity' to 'clsa-dcs.LateralBoneDensity' (copyMetadata=true, copyValues=false). 2014-12-11 17:38:13,907 [qtp95230463-28737] WARN org.obiba.opal.web.magma.ClientErrorDtos - DatasourceCopierIOException java.lang.RuntimeException: org.hibernate.StaleObjectStateException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect) : [org.obiba.magma.datasource.hibernate.domain.ValueTableState#138] at org.obiba.opal.core.service.DataImportServiceImpl.copyValueTables(DataImportServiceImpl.java:142) ~[opal-core-2.2.15.jar:na] at org.obiba.opal.core.service.DataImportServiceImpl.importData(DataImportServiceImpl.java:105) ~[opal-core-2.2.15.jar:na] at org.obiba.opal.web.magma.TableResourceImpl.updateValueSet(TableResourceImpl.java:170) ~[opal-core-ws-2.2.15.jar:na] at sun.reflect.GeneratedMethodAccessor225.invoke(Unknown Source) ~[na:na] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.7.0_51] at java.lang.reflect.Method.invoke(Method.java:606) ~[na:1.7.0_51] at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317) [spring-aop-4.0.3.RELEASE.jar:4.0.3.RELEASE] at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190) [spring-aop-4.0.3.RELEASE.jar:4.0.3.RELEASE] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157) [spring-aop-4.0.3.RELEASE.jar:4.0.3.RELEASE] at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:98) [spring-tx-4.0.3.RELEASE.jar:4.0.3.RELEASE] at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:262) [spring-tx-4.0.3.RELEASE.jar:4.0.3.RELEASE] at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:95) [spring-tx-4.0.3.RELEASE.jar:4.0.3.RELEASE] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) [spring-aop-4.0.3.RELEASE.jar:4.0.3.RELEASE] at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:207) [spring-aop-4.0.3.RELEASE.jar:4.0.3.RELEASE] at com.sun.proxy.$Proxy149.updateValueSet(Unknown Source) [na:na] at sun.reflect.GeneratedMethodAccessor225.invoke(Unknown Source) ~[na:na] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.7.0_51] at java.lang.reflect.Method.invoke(Method.java:606) ~[na:1.7.0_51] at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:137) [resteasy-jaxrs-3.0.6.Final.jar:na] at org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTarget(ResourceMethodInvoker.java:280) [resteasy-jaxrs-3.0.6.Final.jar:na] at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:234) [resteasy-jaxrs-3.0.6.Final.jar:na] at org.jboss.resteasy.core.ResourceLocatorInvoker.invokeOnTargetObject(ResourceLocatorInvoker.java:140) [resteasy-jaxrs-3.0.6.Final.jar:na] at org.jboss.resteasy.core.ResourceLocatorInvoker.invoke(ResourceLocatorInvoker.java:103) [resteasy-jaxrs-3.0.6.Final.jar:na] at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:356) [resteasy-jaxrs-3.0.6.Final.jar:na] at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:179) [resteasy-jaxrs-3.0.6.Final.jar:na] at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:220) [resteasy-jaxrs-3.0.6.Final.jar:na] at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:56) [resteasy-jaxrs-3.0.6.Final.jar:na] at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:51) [resteasy-jaxrs-3.0.6.Final.jar:na] at javax.servlet.http.HttpServlet.service(HttpServlet.java:848) [javax.servlet-3.0.0.v201112011016.jar:na] at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:684) [jetty-servlet-8.1.14.v20131031.jar:8.1.14.v20131031] at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1496) [jetty-servlet-8.1.14.v20131031.jar:8.1.14.v20131031] at org.obiba.shiro.web.filter.AuthenticationFilter.doFilterInternal(AuthenticationFilter.java:88) [obiba-shiro-web-1.6.1.jar:na] at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:108) [spring-web-4.0.3.RELEASE.jar:4.0.3.RELEASE] at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:344) [spring-web-4.0.3.RELEASE.jar:4.0.3.RELEASE] … {code} stdout.log from opal: {code} 2014-12-11 17:38:13,918 ERROR org.obiba.opal.web.provider.ErrorDtoExceptionMapper - System error Internal Server Error: org.springframework.transaction.UnexpectedRollbackException org.springframework.transaction.UnexpectedRollbackException: JTA transaction unexpectedly rolled back (maybe due to a timeout); nested exception is javax.transaction.RollbackException at org.springframework.transaction.jta.JtaTransactionManager.doCommit(JtaTransactionManager.java:1024) ~[spring-tx-4.0.3.RELEASE.jar:4.0.3.RELEASE] at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:757) ~[spring-tx-4.0.3.RELEASE.jar:4.0.3.RELEASE] at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:726) ~[spring-tx-4.0.3.RELEASE.jar:4.0.3.RELEASE] at org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(TransactionAspectSupport.java:478) ~[spring-tx-4.0.3.RELEASE.jar:4.0.3.RELEASE] at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:272) ~[spring-tx-4.0.3.RELEASE.jar:4.0.3.RELEASE] at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:95) ~[spring-tx-4.0.3.RELEASE.jar:4.0.3.RELEASE] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) ~[spring-aop-4.0.3.RELEASE.jar:4.0.3.RELEASE] at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:207) ~[spring-aop-4.0.3.RELEASE.jar:4.0.3.RELEASE] at com.sun.proxy.$Proxy149.updateValueSet(Unknown Source) ~[na:na] at sun.reflect.GeneratedMethodAccessor225.invoke(Unknown Source) ~[na:na] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.7.0_51] at java.lang.reflect.Method.invoke(Method.java:606) ~[na:1.7.0_51] at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:137) ~[resteasy-jaxrs-3.0.6.Final.jar:na] at org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTarget(ResourceMethodInvoker.java:280) ~[resteasy-jaxrs-3.0.6.Final.jar:na] at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:234) ~[resteasy-jaxrs-3.0.6.Final.jar:na] .... {code}
    via by Dwain Elson,
  • We get export errors sometimes (IOException). The following is one example are they occurring because of some conflict in Opal? The Onyx error and Opal error occurred at the same time so assume they are related. (Hour difference because of the local time for Dalhousie) catalina.log: {code} 2014-12-11 18:37:15,313 - [http-8443-4] - INFO - tithreadedDatasourceCopier - Copy 1% complete. 2014-12-11 18:38:15,731 - [http-8443-4] - ERROR - page.ParticipantSearchPage - Error on data export. java.lang.RuntimeException: java.io.IOException: Server Error at org.obiba.magma.support.MultithreadedDatasourceCopier$ConcurrentValueSetWriter.run(MultithreadedDatasourceCopier.java:317) at org.obiba.magma.support.MultithreadedDatasourceCopier.write(MultithreadedDatasourceCopier.java:161) at org.obiba.magma.support.MultithreadedDatasourceCopier.copy(MultithreadedDatasourceCopier.java:149) at org.obiba.onyx.engine.variable.export.OnyxDataExport.internalExport(OnyxDataExport.java:209) at org.obiba.onyx.engine.variable.export.OnyxDataExport.exportInterviews(OnyxDataExport.java:143) at org.obiba.onyx.engine.variable.export.OnyxDataExport$$FastClassByCGLIB$$c7571da3.invoke(<generated>) at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149) at org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:689) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:622) at org.obiba.onyx.engine.variable.export.OnyxDataExport$$EnhancerByCGLIB$$3f62bd99.exportInterviews(<generated>) at org.obiba.onyx.engine.variable.export.OnyxDataExport$$FastClassByCGLIB$$c7571da3.invoke(<generated>) at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149) at org.apache.wicket.proxy.LazyInitProxyFactory$CGLibInterceptor.intercept(LazyInitProxyFactory.java:317) at WICKET_org.obiba.onyx.engine.variable.export.OnyxDataExport$$EnhancerByCGLIB$$e8962fa.exportInterviews(<generated>) at org.obiba.onyx.webapp.participant.page.ParticipantSearchPage$ActionFragment$7$1.onYesButtonClicked(ParticipantSearchPage.java:668) at org.obiba.onyx.wicket.reusable.ConfirmationDialog$1.onClose(ConfirmationDialog.java:45) at org.obiba.onyx.wicket.reusable.Dialog$7.onClose(Dialog.java:405) at org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow$WindowClosedBehavior.respond(ModalWindow.java:966) at org.apache.wicket.ajax.AbstractDefaultAjaxBehavior.onRequest(AbstractDefaultAjaxBehavior.java:302) at org.apache.wicket.request.target.component.listener.BehaviorRequestTarget.processEvents(BehaviorRequestTarget.java:157) at org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(AbstractRequestCycleProcessor.java:92) at org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1250) at org.apache.wicket.RequestCycle.step(RequestCycle.java:1329) at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1436) at org.apache.wicket.RequestCycle.request(RequestCycle.java:545) at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:486) at org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:319) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489) at java.lang.Thread.run(Thread.java:679) Caused by: java.io.IOException: Server Error at org.obiba.opal.rest.client.magma.RestValueTableWriter.checkResponse(RestValueTableWriter.java:101) at org.obiba.opal.rest.client.magma.RestValueTableWriter.access$100(RestValueTableWriter.java:32) at org.obiba.opal.rest.client.magma.RestValueTableWriter$2.close(RestValueTableWriter.java:87) at org.obiba.magma.support.MultithreadedDatasourceCopier$ConcurrentValueSetWriter.run(MultithreadedDatasourceCopier.java:315) ... 45 more 2014-12-12 06:30:52, … {code} opal.log: {code} 2014-12-11 17:38:09,227 [qtp95230463-28737] INFO org.obiba.magma.support.DatasourceCopier - Copying ValueTable 'ContraIndications' to 'clsa-dcs.ContraIndications' (copyMetadata=true, copyValues=false). 2014-12-11 17:38:13,899 [qtp95230463-28737] INFO org.hibernate.event.internal.DefaultLoadEventListener - HHH000327: Error performing load command : org.hibernate.StaleObjectStateException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect) : [org.obiba.magma.datasource.hibernate.domain.ValueTableState#138] 2014-12-11 17:38:13,903 [qtp95230463-28913] INFO org.obiba.magma.support.DatasourceCopier - Copying ValueTable 'LateralBoneDensity' to 'clsa-dcs.LateralBoneDensity' (copyMetadata=true, copyValues=false). 2014-12-11 17:38:13,907 [qtp95230463-28737] WARN org.obiba.opal.web.magma.ClientErrorDtos - DatasourceCopierIOException java.lang.RuntimeException: org.hibernate.StaleObjectStateException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect) : [org.obiba.magma.datasource.hibernate.domain.ValueTableState#138] at org.obiba.opal.core.service.DataImportServiceImpl.copyValueTables(DataImportServiceImpl.java:142) ~[opal-core-2.2.15.jar:na] at org.obiba.opal.core.service.DataImportServiceImpl.importData(DataImportServiceImpl.java:105) ~[opal-core-2.2.15.jar:na] at org.obiba.opal.web.magma.TableResourceImpl.updateValueSet(TableResourceImpl.java:170) ~[opal-core-ws-2.2.15.jar:na] at sun.reflect.GeneratedMethodAccessor225.invoke(Unknown Source) ~[na:na] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.7.0_51] at java.lang.reflect.Method.invoke(Method.java:606) ~[na:1.7.0_51] at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317) [spring-aop-4.0.3.RELEASE.jar:4.0.3.RELEASE] at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190) [spring-aop-4.0.3.RELEASE.jar:4.0.3.RELEASE] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157) [spring-aop-4.0.3.RELEASE.jar:4.0.3.RELEASE] at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:98) [spring-tx-4.0.3.RELEASE.jar:4.0.3.RELEASE] at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:262) [spring-tx-4.0.3.RELEASE.jar:4.0.3.RELEASE] at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:95) [spring-tx-4.0.3.RELEASE.jar:4.0.3.RELEASE] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) [spring-aop-4.0.3.RELEASE.jar:4.0.3.RELEASE] at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:207) [spring-aop-4.0.3.RELEASE.jar:4.0.3.RELEASE] at com.sun.proxy.$Proxy149.updateValueSet(Unknown Source) [na:na] at sun.reflect.GeneratedMethodAccessor225.invoke(Unknown Source) ~[na:na] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.7.0_51] at java.lang.reflect.Method.invoke(Method.java:606) ~[na:1.7.0_51] at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:137) [resteasy-jaxrs-3.0.6.Final.jar:na] at org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTarget(ResourceMethodInvoker.java:280) [resteasy-jaxrs-3.0.6.Final.jar:na] at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:234) [resteasy-jaxrs-3.0.6.Final.jar:na] at org.jboss.resteasy.core.ResourceLocatorInvoker.invokeOnTargetObject(ResourceLocatorInvoker.java:140) [resteasy-jaxrs-3.0.6.Final.jar:na] at org.jboss.resteasy.core.ResourceLocatorInvoker.invoke(ResourceLocatorInvoker.java:103) [resteasy-jaxrs-3.0.6.Final.jar:na] at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:356) [resteasy-jaxrs-3.0.6.Final.jar:na] at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:179) [resteasy-jaxrs-3.0.6.Final.jar:na] at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:220) [resteasy-jaxrs-3.0.6.Final.jar:na] at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:56) [resteasy-jaxrs-3.0.6.Final.jar:na] at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:51) [resteasy-jaxrs-3.0.6.Final.jar:na] at javax.servlet.http.HttpServlet.service(HttpServlet.java:848) [javax.servlet-3.0.0.v201112011016.jar:na] at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:684) [jetty-servlet-8.1.14.v20131031.jar:8.1.14.v20131031] at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1496) [jetty-servlet-8.1.14.v20131031.jar:8.1.14.v20131031] at org.obiba.shiro.web.filter.AuthenticationFilter.doFilterInternal(AuthenticationFilter.java:88) [obiba-shiro-web-1.6.1.jar:na] at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:108) [spring-web-4.0.3.RELEASE.jar:4.0.3.RELEASE] at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:344) [spring-web-4.0.3.RELEASE.jar:4.0.3.RELEASE] … {code} stdout.log from opal: {code} 2014-12-11 17:38:13,918 ERROR org.obiba.opal.web.provider.ErrorDtoExceptionMapper - System error Internal Server Error: org.springframework.transaction.UnexpectedRollbackException org.springframework.transaction.UnexpectedRollbackException: JTA transaction unexpectedly rolled back (maybe due to a timeout); nested exception is javax.transaction.RollbackException at org.springframework.transaction.jta.JtaTransactionManager.doCommit(JtaTransactionManager.java:1024) ~[spring-tx-4.0.3.RELEASE.jar:4.0.3.RELEASE] at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:757) ~[spring-tx-4.0.3.RELEASE.jar:4.0.3.RELEASE] at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:726) ~[spring-tx-4.0.3.RELEASE.jar:4.0.3.RELEASE] at org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(TransactionAspectSupport.java:478) ~[spring-tx-4.0.3.RELEASE.jar:4.0.3.RELEASE] at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:272) ~[spring-tx-4.0.3.RELEASE.jar:4.0.3.RELEASE] at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:95) ~[spring-tx-4.0.3.RELEASE.jar:4.0.3.RELEASE] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) ~[spring-aop-4.0.3.RELEASE.jar:4.0.3.RELEASE] at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:207) ~[spring-aop-4.0.3.RELEASE.jar:4.0.3.RELEASE] at com.sun.proxy.$Proxy149.updateValueSet(Unknown Source) ~[na:na] at sun.reflect.GeneratedMethodAccessor225.invoke(Unknown Source) ~[na:na] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.7.0_51] at java.lang.reflect.Method.invoke(Method.java:606) ~[na:1.7.0_51] at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:137) ~[resteasy-jaxrs-3.0.6.Final.jar:na] at org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTarget(ResourceMethodInvoker.java:280) ~[resteasy-jaxrs-3.0.6.Final.jar:na] at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:234) ~[resteasy-jaxrs-3.0.6.Final.jar:na] .... {code}
    via by Dwain Elson,
  • I found this interesting issue with session timeouts/logouts and data import. When we start a data import operation (doesn't matter the type), the actual work is done in a separate in a separate thread. At some point in the import process, the credentials/session is checked (actually done in SecuredDatasource.getValueTable). The delay between the start of the job and this moment depends on the amount of rows/data being imported. When the data to import is small, there is no problem, but when the data file is 'big', and i mean more than 50k rows (for example), there is a change the Opal session timed out, or simply the used logged out, and then the import fails. From the design point of view, i would expect the jobs to be really autonomous, and be able to finish without the need of an active session. Because of this late authorization check in SecuredDatasource, that is not the case. Some kind of session heartbeat solution only works for timeouts, but not for logouts, so probably we must to all the permission checks even before starting the job. Here the stack traces for both the timeout and logout: {code} 1747456 [pool-1-thread-3] INFO org.obiba.magma.support.DatasourceCopier - Copying ValueTable '500k' to 'sesidev288.500k' (copyMetadata=true, copyValues=false). 1755398 [pool-1-thread-3] ERROR org.obiba.opal.shell.commands.ImportCommand - Runtime error while importing data java.lang.RuntimeException: org.apache.shiro.session.ExpiredSessionException: Session with id [5601dd9c-072c-44e7-9126-15b8c29ca98a] has expired. Last access time: 2/18/15 11:07 AM. Current time: 2/18/15 11:21 AM. Session timeout is set to 120 seconds (2 minutes) at org.obiba.opal.core.service.DataImportServiceImpl.copyValueTables(DataImportServiceImpl.java:157) at org.obiba.opal.core.service.DataImportServiceImpl.importData(DataImportServiceImpl.java:105) at org.obiba.opal.core.service.DataImportServiceImpl.importData(DataImportServiceImpl.java:87) at org.obiba.opal.shell.commands.ImportCommand.importFromTables(ImportCommand.java:155) at org.obiba.opal.shell.commands.ImportCommand.executeImports(ImportCommand.java:89) at org.obiba.opal.shell.commands.ImportCommand.execute(ImportCommand.java:68) ... Caused by: org.apache.shiro.session.ExpiredSessionException: Session with id [5601dd9c-072c-44e7-9126-15b8c29ca98a] has expired. Last access time: 2/18/15 11:07 AM. Current time: 2/18/15 11:21 AM. Session timeout is set to 120 seconds (2 minutes) at org.apache.shiro.session.mgt.SimpleSession.validate(SimpleSession.java:292) at org.apache.shiro.session.mgt.AbstractValidatingSessionManager.doValidate(AbstractValidatingSessionManager.java:186) at org.apache.shiro.session.mgt.AbstractValidatingSessionManager.validate(AbstractValidatingSessionManager.java:143) at org.apache.shiro.session.mgt.AbstractValidatingSessionManager.doGetSession(AbstractValidatingSessionManager.java:120) at org.apache.shiro.session.mgt.AbstractNativeSessionManager.lookupSession(AbstractNativeSessionManager.java:108) at org.apache.shiro.session.mgt.AbstractNativeSessionManager.lookupRequiredSession(AbstractNativeSessionManager.java:112) at org.apache.shiro.session.mgt.AbstractNativeSessionManager.getAttribute(AbstractNativeSessionManager.java:209) at org.apache.shiro.session.mgt.DelegatingSession.getAttribute(DelegatingSession.java:141) at org.apache.shiro.session.ProxiedSession.getAttribute(ProxiedSession.java:121) at org.apache.shiro.session.ProxiedSession.getAttribute(ProxiedSession.java:121) at org.apache.shiro.session.ProxiedSession.getAttribute(ProxiedSession.java:121) at org.apache.shiro.subject.support.DelegatingSubject.getRunAsPrincipalsStack(DelegatingSubject.java:469) at org.apache.shiro.subject.support.DelegatingSubject.getPrincipals(DelegatingSubject.java:153) at org.apache.shiro.subject.support.DelegatingSubject.hasPrincipals(DelegatingSubject.java:126) at org.apache.shiro.subject.support.DelegatingSubject.isPermitted(DelegatingSubject.java:158) at org.obiba.magma.security.shiro.ShiroAuthorizer.isPermitted(ShiroAuthorizer.java:21) at org.obiba.magma.security.SecuredDatasource.authzReadTable(SecuredDatasource.java:68) at org.obiba.magma.security.SecuredDatasource.getValueTable(SecuredDatasource.java:30) at org.obiba.magma.support.DatasourceCopier.copy(DatasourceCopier.java:214) at org.obiba.magma.support.MultithreadedDatasourceCopier.copyVariables(MultithreadedDatasourceCopier.java:222) at org.obiba.magma.support.MultithreadedDatasourceCopier.write(MultithreadedDatasourceCopier.java:182) at org.obiba.magma.support.MultithreadedDatasourceCopier.copy(MultithreadedDatasourceCopier.java:172) at org.obiba.opal.core.service.CopyValueTablesLockingAction$CopyAction.execute(CopyValueTablesLockingAction.java:159) at org.obiba.opal.core.magma.concurrent.LockingActionTemplate$1.doInTransactionWithoutResult(LockingActionTemplate.java:47) at org.springframework.transaction.support.TransactionCallbackWithoutResult.doInTransaction(TransactionCallbackWithoutResult.java:34) at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:133) at org.obiba.opal.core.magma.concurrent.LockingActionTemplate.doInTransaction(LockingActionTemplate.java:42) at org.obiba.opal.core.magma.concurrent.LockingActionTemplate.execute(LockingActionTemplate.java:31) at org.obiba.opal.core.service.DataImportServiceImpl.copyValueTables(DataImportServiceImpl.java:149) ... 13 more 1755434 [pool-1-thread-3] INFO org.obiba.opal.shell.commands.ImportCommand - Import failed in 13.81 min 1755434 [pool-1-thread-3] INFO org.obiba.opal.shell.service.impl.DefaultCommandJobService - CommandJob 3 finished executing {code} {code} 3647217 [pool-1-thread-5] INFO org.obiba.magma.support.DatasourceCopier - Copying ValueTable '500k' to 'carlos.500k' (copyMetadata=true, copyValues=false). 3654264 [pool-1-thread-5] ERROR org.obiba.opal.shell.commands.ImportCommand - Runtime error while importing data java.lang.RuntimeException: org.apache.shiro.session.UnknownSessionException: There is no session with id [89d982c3-37f4-4356-84ad-d55cc5483215] at org.obiba.opal.core.service.DataImportServiceImpl.copyValueTables(DataImportServiceImpl.java:157) at org.obiba.opal.core.service.DataImportServiceImpl.importData(DataImportServiceImpl.java:105) at org.obiba.opal.core.service.DataImportServiceImpl.importData(DataImportServiceImpl.java:87) at org.obiba.opal.shell.commands.ImportCommand.importFromTables(ImportCommand.java:155) at org.obiba.opal.shell.commands.ImportCommand.executeImports(ImportCommand.java:89) at org.obiba.opal.shell.commands.ImportCommand.execute(ImportCommand.java:68) ... Caused by: org.apache.shiro.session.UnknownSessionException: There is no session with id [89d982c3-37f4-4356-84ad-d55cc5483215] at org.apache.shiro.session.mgt.eis.AbstractSessionDAO.readSession(AbstractSessionDAO.java:170) at org.apache.shiro.session.mgt.eis.CachingSessionDAO.readSession(CachingSessionDAO.java:261) at org.apache.shiro.session.mgt.DefaultSessionManager.retrieveSessionFromDataSource(DefaultSessionManager.java:236) at org.apache.shiro.session.mgt.DefaultSessionManager.retrieveSession(DefaultSessionManager.java:222) at org.apache.shiro.session.mgt.AbstractValidatingSessionManager.doGetSession(AbstractValidatingSessionManager.java:118) at org.apache.shiro.session.mgt.AbstractNativeSessionManager.lookupSession(AbstractNativeSessionManager.java:108) at org.apache.shiro.session.mgt.AbstractNativeSessionManager.lookupRequiredSession(AbstractNativeSessionManager.java:112) at org.apache.shiro.session.mgt.AbstractNativeSessionManager.getAttribute(AbstractNativeSessionManager.java:209) at org.apache.shiro.session.mgt.DelegatingSession.getAttribute(DelegatingSession.java:141) at org.apache.shiro.session.ProxiedSession.getAttribute(ProxiedSession.java:121) at org.apache.shiro.session.ProxiedSession.getAttribute(ProxiedSession.java:121) at org.apache.shiro.session.ProxiedSession.getAttribute(ProxiedSession.java:121) at org.apache.shiro.subject.support.DelegatingSubject.getRunAsPrincipalsStack(DelegatingSubject.java:469) at org.apache.shiro.subject.support.DelegatingSubject.getPrincipals(DelegatingSubject.java:153) at org.apache.shiro.subject.support.DelegatingSubject.hasPrincipals(DelegatingSubject.java:126) at org.apache.shiro.subject.support.DelegatingSubject.isPermitted(DelegatingSubject.java:158) at org.obiba.magma.security.shiro.ShiroAuthorizer.isPermitted(ShiroAuthorizer.java:21) at org.obiba.magma.security.SecuredDatasource.authzReadTable(SecuredDatasource.java:68) at org.obiba.magma.security.SecuredDatasource.getValueTable(SecuredDatasource.java:30) at org.obiba.magma.support.DatasourceCopier.copy(DatasourceCopier.java:214) at org.obiba.magma.support.MultithreadedDatasourceCopier.copyVariables(MultithreadedDatasourceCopier.java:222) at org.obiba.magma.support.MultithreadedDatasourceCopier.write(MultithreadedDatasourceCopier.java:182) at org.obiba.magma.support.MultithreadedDatasourceCopier.copy(MultithreadedDatasourceCopier.java:172) at org.obiba.opal.core.service.CopyValueTablesLockingAction$CopyAction.execute(CopyValueTablesLockingAction.java:159) at org.obiba.opal.core.magma.concurrent.LockingActionTemplate$1.doInTransactionWithoutResult(LockingActionTemplate.java:47) at org.springframework.transaction.support.TransactionCallbackWithoutResult.doInTransaction(TransactionCallbackWithoutResult.java:34) at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:133) at org.obiba.opal.core.magma.concurrent.LockingActionTemplate.doInTransaction(LockingActionTemplate.java:42) at org.obiba.opal.core.magma.concurrent.LockingActionTemplate.execute(LockingActionTemplate.java:31) at org.obiba.opal.core.service.DataImportServiceImpl.copyValueTables(DataImportServiceImpl.java:149) ... 13 more 3654264 [pool-1-thread-5] INFO org.obiba.opal.shell.commands.ImportCommand - Import failed in 12.14 min {code}
    via by Carlos Silva,
  • I found this interesting issue with session timeouts/logouts and data import. When we start a data import operation (doesn't matter the type), the actual work is done in a separate in a separate thread. At some point in the import process, the credentials/session is checked (actually done in SecuredDatasource.getValueTable). The delay between the start of the job and this moment depends on the amount of rows/data being imported. When the data to import is small, there is no problem, but when the data file is 'big', and i mean more than 50k rows (for example), there is a change the Opal session timed out, or simply the used logged out, and then the import fails. From the design point of view, i would expect the jobs to be really autonomous, and be able to finish without the need of an active session. Because of this late authorization check in SecuredDatasource, that is not the case. Some kind of session heartbeat solution only works for timeouts, but not for logouts, so probably we must to all the permission checks even before starting the job. Here the stack traces for both the timeout and logout: {code} 1747456 [pool-1-thread-3] INFO org.obiba.magma.support.DatasourceCopier - Copying ValueTable '500k' to 'sesidev288.500k' (copyMetadata=true, copyValues=false). 1755398 [pool-1-thread-3] ERROR org.obiba.opal.shell.commands.ImportCommand - Runtime error while importing data java.lang.RuntimeException: org.apache.shiro.session.ExpiredSessionException: Session with id [5601dd9c-072c-44e7-9126-15b8c29ca98a] has expired. Last access time: 2/18/15 11:07 AM. Current time: 2/18/15 11:21 AM. Session timeout is set to 120 seconds (2 minutes) at org.obiba.opal.core.service.DataImportServiceImpl.copyValueTables(DataImportServiceImpl.java:157) at org.obiba.opal.core.service.DataImportServiceImpl.importData(DataImportServiceImpl.java:105) at org.obiba.opal.core.service.DataImportServiceImpl.importData(DataImportServiceImpl.java:87) at org.obiba.opal.shell.commands.ImportCommand.importFromTables(ImportCommand.java:155) at org.obiba.opal.shell.commands.ImportCommand.executeImports(ImportCommand.java:89) at org.obiba.opal.shell.commands.ImportCommand.execute(ImportCommand.java:68) ... Caused by: org.apache.shiro.session.ExpiredSessionException: Session with id [5601dd9c-072c-44e7-9126-15b8c29ca98a] has expired. Last access time: 2/18/15 11:07 AM. Current time: 2/18/15 11:21 AM. Session timeout is set to 120 seconds (2 minutes) at org.apache.shiro.session.mgt.SimpleSession.validate(SimpleSession.java:292) at org.apache.shiro.session.mgt.AbstractValidatingSessionManager.doValidate(AbstractValidatingSessionManager.java:186) at org.apache.shiro.session.mgt.AbstractValidatingSessionManager.validate(AbstractValidatingSessionManager.java:143) at org.apache.shiro.session.mgt.AbstractValidatingSessionManager.doGetSession(AbstractValidatingSessionManager.java:120) at org.apache.shiro.session.mgt.AbstractNativeSessionManager.lookupSession(AbstractNativeSessionManager.java:108) at org.apache.shiro.session.mgt.AbstractNativeSessionManager.lookupRequiredSession(AbstractNativeSessionManager.java:112) at org.apache.shiro.session.mgt.AbstractNativeSessionManager.getAttribute(AbstractNativeSessionManager.java:209) at org.apache.shiro.session.mgt.DelegatingSession.getAttribute(DelegatingSession.java:141) at org.apache.shiro.session.ProxiedSession.getAttribute(ProxiedSession.java:121) at org.apache.shiro.session.ProxiedSession.getAttribute(ProxiedSession.java:121) at org.apache.shiro.session.ProxiedSession.getAttribute(ProxiedSession.java:121) at org.apache.shiro.subject.support.DelegatingSubject.getRunAsPrincipalsStack(DelegatingSubject.java:469) at org.apache.shiro.subject.support.DelegatingSubject.getPrincipals(DelegatingSubject.java:153) at org.apache.shiro.subject.support.DelegatingSubject.hasPrincipals(DelegatingSubject.java:126) at org.apache.shiro.subject.support.DelegatingSubject.isPermitted(DelegatingSubject.java:158) at org.obiba.magma.security.shiro.ShiroAuthorizer.isPermitted(ShiroAuthorizer.java:21) at org.obiba.magma.security.SecuredDatasource.authzReadTable(SecuredDatasource.java:68) at org.obiba.magma.security.SecuredDatasource.getValueTable(SecuredDatasource.java:30) at org.obiba.magma.support.DatasourceCopier.copy(DatasourceCopier.java:214) at org.obiba.magma.support.MultithreadedDatasourceCopier.copyVariables(MultithreadedDatasourceCopier.java:222) at org.obiba.magma.support.MultithreadedDatasourceCopier.write(MultithreadedDatasourceCopier.java:182) at org.obiba.magma.support.MultithreadedDatasourceCopier.copy(MultithreadedDatasourceCopier.java:172) at org.obiba.opal.core.service.CopyValueTablesLockingAction$CopyAction.execute(CopyValueTablesLockingAction.java:159) at org.obiba.opal.core.magma.concurrent.LockingActionTemplate$1.doInTransactionWithoutResult(LockingActionTemplate.java:47) at org.springframework.transaction.support.TransactionCallbackWithoutResult.doInTransaction(TransactionCallbackWithoutResult.java:34) at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:133) at org.obiba.opal.core.magma.concurrent.LockingActionTemplate.doInTransaction(LockingActionTemplate.java:42) at org.obiba.opal.core.magma.concurrent.LockingActionTemplate.execute(LockingActionTemplate.java:31) at org.obiba.opal.core.service.DataImportServiceImpl.copyValueTables(DataImportServiceImpl.java:149) ... 13 more 1755434 [pool-1-thread-3] INFO org.obiba.opal.shell.commands.ImportCommand - Import failed in 13.81 min 1755434 [pool-1-thread-3] INFO org.obiba.opal.shell.service.impl.DefaultCommandJobService - CommandJob 3 finished executing {code} {code} 3647217 [pool-1-thread-5] INFO org.obiba.magma.support.DatasourceCopier - Copying ValueTable '500k' to 'carlos.500k' (copyMetadata=true, copyValues=false). 3654264 [pool-1-thread-5] ERROR org.obiba.opal.shell.commands.ImportCommand - Runtime error while importing data java.lang.RuntimeException: org.apache.shiro.session.UnknownSessionException: There is no session with id [89d982c3-37f4-4356-84ad-d55cc5483215] at org.obiba.opal.core.service.DataImportServiceImpl.copyValueTables(DataImportServiceImpl.java:157) at org.obiba.opal.core.service.DataImportServiceImpl.importData(DataImportServiceImpl.java:105) at org.obiba.opal.core.service.DataImportServiceImpl.importData(DataImportServiceImpl.java:87) at org.obiba.opal.shell.commands.ImportCommand.importFromTables(ImportCommand.java:155) at org.obiba.opal.shell.commands.ImportCommand.executeImports(ImportCommand.java:89) at org.obiba.opal.shell.commands.ImportCommand.execute(ImportCommand.java:68) ... Caused by: org.apache.shiro.session.UnknownSessionException: There is no session with id [89d982c3-37f4-4356-84ad-d55cc5483215] at org.apache.shiro.session.mgt.eis.AbstractSessionDAO.readSession(AbstractSessionDAO.java:170) at org.apache.shiro.session.mgt.eis.CachingSessionDAO.readSession(CachingSessionDAO.java:261) at org.apache.shiro.session.mgt.DefaultSessionManager.retrieveSessionFromDataSource(DefaultSessionManager.java:236) at org.apache.shiro.session.mgt.DefaultSessionManager.retrieveSession(DefaultSessionManager.java:222) at org.apache.shiro.session.mgt.AbstractValidatingSessionManager.doGetSession(AbstractValidatingSessionManager.java:118) at org.apache.shiro.session.mgt.AbstractNativeSessionManager.lookupSession(AbstractNativeSessionManager.java:108) at org.apache.shiro.session.mgt.AbstractNativeSessionManager.lookupRequiredSession(AbstractNativeSessionManager.java:112) at org.apache.shiro.session.mgt.AbstractNativeSessionManager.getAttribute(AbstractNativeSessionManager.java:209) at org.apache.shiro.session.mgt.DelegatingSession.getAttribute(DelegatingSession.java:141) at org.apache.shiro.session.ProxiedSession.getAttribute(ProxiedSession.java:121) at org.apache.shiro.session.ProxiedSession.getAttribute(ProxiedSession.java:121) at org.apache.shiro.session.ProxiedSession.getAttribute(ProxiedSession.java:121) at org.apache.shiro.subject.support.DelegatingSubject.getRunAsPrincipalsStack(DelegatingSubject.java:469) at org.apache.shiro.subject.support.DelegatingSubject.getPrincipals(DelegatingSubject.java:153) at org.apache.shiro.subject.support.DelegatingSubject.hasPrincipals(DelegatingSubject.java:126) at org.apache.shiro.subject.support.DelegatingSubject.isPermitted(DelegatingSubject.java:158) at org.obiba.magma.security.shiro.ShiroAuthorizer.isPermitted(ShiroAuthorizer.java:21) at org.obiba.magma.security.SecuredDatasource.authzReadTable(SecuredDatasource.java:68) at org.obiba.magma.security.SecuredDatasource.getValueTable(SecuredDatasource.java:30) at org.obiba.magma.support.DatasourceCopier.copy(DatasourceCopier.java:214) at org.obiba.magma.support.MultithreadedDatasourceCopier.copyVariables(MultithreadedDatasourceCopier.java:222) at org.obiba.magma.support.MultithreadedDatasourceCopier.write(MultithreadedDatasourceCopier.java:182) at org.obiba.magma.support.MultithreadedDatasourceCopier.copy(MultithreadedDatasourceCopier.java:172) at org.obiba.opal.core.service.CopyValueTablesLockingAction$CopyAction.execute(CopyValueTablesLockingAction.java:159) at org.obiba.opal.core.magma.concurrent.LockingActionTemplate$1.doInTransactionWithoutResult(LockingActionTemplate.java:47) at org.springframework.transaction.support.TransactionCallbackWithoutResult.doInTransaction(TransactionCallbackWithoutResult.java:34) at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:133) at org.obiba.opal.core.magma.concurrent.LockingActionTemplate.doInTransaction(LockingActionTemplate.java:42) at org.obiba.opal.core.magma.concurrent.LockingActionTemplate.execute(LockingActionTemplate.java:31) at org.obiba.opal.core.service.DataImportServiceImpl.copyValueTables(DataImportServiceImpl.java:149) ... 13 more 3654264 [pool-1-thread-5] INFO org.obiba.opal.shell.commands.ImportCommand - Import failed in 12.14 min {code}
    via by Carlos Silva,
  • I found this interesting issue with session timeouts/logouts and data import. When we start a data import operation (doesn't matter the type), the actual work is done in a separate in a separate thread. At some point in the import process, the credentials/session is checked (actually done in SecuredDatasource.getValueTable). The delay between the start of the job and this moment depends on the amount of rows/data being imported. When the data to import is small, there is no problem, but when the data file is 'big', and i mean more than 50k rows (for example), there is a change the Opal session timed out, or simply the used logged out, and then the import fails. From the design point of view, i would expect the jobs to be really autonomous, and be able to finish without the need of an active session. Because of this late authorization check in SecuredDatasource, that is not the case. Some kind of session heartbeat solution only works for timeouts, but not for logouts, so probably we must to all the permission checks even before starting the job. Here the stack traces for both the timeout and logout: {code} 1747456 [pool-1-thread-3] INFO org.obiba.magma.support.DatasourceCopier - Copying ValueTable '500k' to 'sesidev288.500k' (copyMetadata=true, copyValues=false). 1755398 [pool-1-thread-3] ERROR org.obiba.opal.shell.commands.ImportCommand - Runtime error while importing data java.lang.RuntimeException: org.apache.shiro.session.ExpiredSessionException: Session with id [5601dd9c-072c-44e7-9126-15b8c29ca98a] has expired. Last access time: 2/18/15 11:07 AM. Current time: 2/18/15 11:21 AM. Session timeout is set to 120 seconds (2 minutes) at org.obiba.opal.core.service.DataImportServiceImpl.copyValueTables(DataImportServiceImpl.java:157) at org.obiba.opal.core.service.DataImportServiceImpl.importData(DataImportServiceImpl.java:105) at org.obiba.opal.core.service.DataImportServiceImpl.importData(DataImportServiceImpl.java:87) at org.obiba.opal.shell.commands.ImportCommand.importFromTables(ImportCommand.java:155) at org.obiba.opal.shell.commands.ImportCommand.executeImports(ImportCommand.java:89) at org.obiba.opal.shell.commands.ImportCommand.execute(ImportCommand.java:68) ... Caused by: org.apache.shiro.session.ExpiredSessionException: Session with id [5601dd9c-072c-44e7-9126-15b8c29ca98a] has expired. Last access time: 2/18/15 11:07 AM. Current time: 2/18/15 11:21 AM. Session timeout is set to 120 seconds (2 minutes) at org.apache.shiro.session.mgt.SimpleSession.validate(SimpleSession.java:292) at org.apache.shiro.session.mgt.AbstractValidatingSessionManager.doValidate(AbstractValidatingSessionManager.java:186) at org.apache.shiro.session.mgt.AbstractValidatingSessionManager.validate(AbstractValidatingSessionManager.java:143) at org.apache.shiro.session.mgt.AbstractValidatingSessionManager.doGetSession(AbstractValidatingSessionManager.java:120) at org.apache.shiro.session.mgt.AbstractNativeSessionManager.lookupSession(AbstractNativeSessionManager.java:108) at org.apache.shiro.session.mgt.AbstractNativeSessionManager.lookupRequiredSession(AbstractNativeSessionManager.java:112) at org.apache.shiro.session.mgt.AbstractNativeSessionManager.getAttribute(AbstractNativeSessionManager.java:209) at org.apache.shiro.session.mgt.DelegatingSession.getAttribute(DelegatingSession.java:141) at org.apache.shiro.session.ProxiedSession.getAttribute(ProxiedSession.java:121) at org.apache.shiro.session.ProxiedSession.getAttribute(ProxiedSession.java:121) at org.apache.shiro.session.ProxiedSession.getAttribute(ProxiedSession.java:121) at org.apache.shiro.subject.support.DelegatingSubject.getRunAsPrincipalsStack(DelegatingSubject.java:469) at org.apache.shiro.subject.support.DelegatingSubject.getPrincipals(DelegatingSubject.java:153) at org.apache.shiro.subject.support.DelegatingSubject.hasPrincipals(DelegatingSubject.java:126) at org.apache.shiro.subject.support.DelegatingSubject.isPermitted(DelegatingSubject.java:158) at org.obiba.magma.security.shiro.ShiroAuthorizer.isPermitted(ShiroAuthorizer.java:21) at org.obiba.magma.security.SecuredDatasource.authzReadTable(SecuredDatasource.java:68) at org.obiba.magma.security.SecuredDatasource.getValueTable(SecuredDatasource.java:30) at org.obiba.magma.support.DatasourceCopier.copy(DatasourceCopier.java:214) at org.obiba.magma.support.MultithreadedDatasourceCopier.copyVariables(MultithreadedDatasourceCopier.java:222) at org.obiba.magma.support.MultithreadedDatasourceCopier.write(MultithreadedDatasourceCopier.java:182) at org.obiba.magma.support.MultithreadedDatasourceCopier.copy(MultithreadedDatasourceCopier.java:172) at org.obiba.opal.core.service.CopyValueTablesLockingAction$CopyAction.execute(CopyValueTablesLockingAction.java:159) at org.obiba.opal.core.magma.concurrent.LockingActionTemplate$1.doInTransactionWithoutResult(LockingActionTemplate.java:47) at org.springframework.transaction.support.TransactionCallbackWithoutResult.doInTransaction(TransactionCallbackWithoutResult.java:34) at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:133) at org.obiba.opal.core.magma.concurrent.LockingActionTemplate.doInTransaction(LockingActionTemplate.java:42) at org.obiba.opal.core.magma.concurrent.LockingActionTemplate.execute(LockingActionTemplate.java:31) at org.obiba.opal.core.service.DataImportServiceImpl.copyValueTables(DataImportServiceImpl.java:149) ... 13 more 1755434 [pool-1-thread-3] INFO org.obiba.opal.shell.commands.ImportCommand - Import failed in 13.81 min 1755434 [pool-1-thread-3] INFO org.obiba.opal.shell.service.impl.DefaultCommandJobService - CommandJob 3 finished executing {code} {code} 3647217 [pool-1-thread-5] INFO org.obiba.magma.support.DatasourceCopier - Copying ValueTable '500k' to 'carlos.500k' (copyMetadata=true, copyValues=false). 3654264 [pool-1-thread-5] ERROR org.obiba.opal.shell.commands.ImportCommand - Runtime error while importing data java.lang.RuntimeException: org.apache.shiro.session.UnknownSessionException: There is no session with id [89d982c3-37f4-4356-84ad-d55cc5483215] at org.obiba.opal.core.service.DataImportServiceImpl.copyValueTables(DataImportServiceImpl.java:157) at org.obiba.opal.core.service.DataImportServiceImpl.importData(DataImportServiceImpl.java:105) at org.obiba.opal.core.service.DataImportServiceImpl.importData(DataImportServiceImpl.java:87) at org.obiba.opal.shell.commands.ImportCommand.importFromTables(ImportCommand.java:155) at org.obiba.opal.shell.commands.ImportCommand.executeImports(ImportCommand.java:89) at org.obiba.opal.shell.commands.ImportCommand.execute(ImportCommand.java:68) ... Caused by: org.apache.shiro.session.UnknownSessionException: There is no session with id [89d982c3-37f4-4356-84ad-d55cc5483215] at org.apache.shiro.session.mgt.eis.AbstractSessionDAO.readSession(AbstractSessionDAO.java:170) at org.apache.shiro.session.mgt.eis.CachingSessionDAO.readSession(CachingSessionDAO.java:261) at org.apache.shiro.session.mgt.DefaultSessionManager.retrieveSessionFromDataSource(DefaultSessionManager.java:236) at org.apache.shiro.session.mgt.DefaultSessionManager.retrieveSession(DefaultSessionManager.java:222) at org.apache.shiro.session.mgt.AbstractValidatingSessionManager.doGetSession(AbstractValidatingSessionManager.java:118) at org.apache.shiro.session.mgt.AbstractNativeSessionManager.lookupSession(AbstractNativeSessionManager.java:108) at org.apache.shiro.session.mgt.AbstractNativeSessionManager.lookupRequiredSession(AbstractNativeSessionManager.java:112) at org.apache.shiro.session.mgt.AbstractNativeSessionManager.getAttribute(AbstractNativeSessionManager.java:209) at org.apache.shiro.session.mgt.DelegatingSession.getAttribute(DelegatingSession.java:141) at org.apache.shiro.session.ProxiedSession.getAttribute(ProxiedSession.java:121) at org.apache.shiro.session.ProxiedSession.getAttribute(ProxiedSession.java:121) at org.apache.shiro.session.ProxiedSession.getAttribute(ProxiedSession.java:121) at org.apache.shiro.subject.support.DelegatingSubject.getRunAsPrincipalsStack(DelegatingSubject.java:469) at org.apache.shiro.subject.support.DelegatingSubject.getPrincipals(DelegatingSubject.java:153) at org.apache.shiro.subject.support.DelegatingSubject.hasPrincipals(DelegatingSubject.java:126) at org.apache.shiro.subject.support.DelegatingSubject.isPermitted(DelegatingSubject.java:158) at org.obiba.magma.security.shiro.ShiroAuthorizer.isPermitted(ShiroAuthorizer.java:21) at org.obiba.magma.security.SecuredDatasource.authzReadTable(SecuredDatasource.java:68) at org.obiba.magma.security.SecuredDatasource.getValueTable(SecuredDatasource.java:30) at org.obiba.magma.support.DatasourceCopier.copy(DatasourceCopier.java:214) at org.obiba.magma.support.MultithreadedDatasourceCopier.copyVariables(MultithreadedDatasourceCopier.java:222) at org.obiba.magma.support.MultithreadedDatasourceCopier.write(MultithreadedDatasourceCopier.java:182) at org.obiba.magma.support.MultithreadedDatasourceCopier.copy(MultithreadedDatasourceCopier.java:172) at org.obiba.opal.core.service.CopyValueTablesLockingAction$CopyAction.execute(CopyValueTablesLockingAction.java:159) at org.obiba.opal.core.magma.concurrent.LockingActionTemplate$1.doInTransactionWithoutResult(LockingActionTemplate.java:47) at org.springframework.transaction.support.TransactionCallbackWithoutResult.doInTransaction(TransactionCallbackWithoutResult.java:34) at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:133) at org.obiba.opal.core.magma.concurrent.LockingActionTemplate.doInTransaction(LockingActionTemplate.java:42) at org.obiba.opal.core.magma.concurrent.LockingActionTemplate.execute(LockingActionTemplate.java:31) at org.obiba.opal.core.service.DataImportServiceImpl.copyValueTables(DataImportServiceImpl.java:149) ... 13 more 3654264 [pool-1-thread-5] INFO org.obiba.opal.shell.commands.ImportCommand - Import failed in 12.14 min {code}
    via by Carlos Silva,
  • I found this interesting issue with session timeouts/logouts and data import. When we start a data import operation (doesn't matter the type), the actual work is done in a separate in a separate thread. At some point in the import process, the credentials/session is checked (actually done in SecuredDatasource.getValueTable). The delay between the start of the job and this moment depends on the amount of rows/data being imported. When the data to import is small, there is no problem, but when the data file is 'big', and i mean more than 50k rows (for example), there is a change the Opal session timed out, or simply the used logged out, and then the import fails. From the design point of view, i would expect the jobs to be really autonomous, and be able to finish without the need of an active session. Because of this late authorization check in SecuredDatasource, that is not the case. Some kind of session heartbeat solution only works for timeouts, but not for logouts, so probably we must to all the permission checks even before starting the job. Here the stack traces for both the timeout and logout: {code} 1747456 [pool-1-thread-3] INFO org.obiba.magma.support.DatasourceCopier - Copying ValueTable '500k' to 'sesidev288.500k' (copyMetadata=true, copyValues=false). 1755398 [pool-1-thread-3] ERROR org.obiba.opal.shell.commands.ImportCommand - Runtime error while importing data java.lang.RuntimeException: org.apache.shiro.session.ExpiredSessionException: Session with id [5601dd9c-072c-44e7-9126-15b8c29ca98a] has expired. Last access time: 2/18/15 11:07 AM. Current time: 2/18/15 11:21 AM. Session timeout is set to 120 seconds (2 minutes) at org.obiba.opal.core.service.DataImportServiceImpl.copyValueTables(DataImportServiceImpl.java:157) at org.obiba.opal.core.service.DataImportServiceImpl.importData(DataImportServiceImpl.java:105) at org.obiba.opal.core.service.DataImportServiceImpl.importData(DataImportServiceImpl.java:87) at org.obiba.opal.shell.commands.ImportCommand.importFromTables(ImportCommand.java:155) at org.obiba.opal.shell.commands.ImportCommand.executeImports(ImportCommand.java:89) at org.obiba.opal.shell.commands.ImportCommand.execute(ImportCommand.java:68) ... Caused by: org.apache.shiro.session.ExpiredSessionException: Session with id [5601dd9c-072c-44e7-9126-15b8c29ca98a] has expired. Last access time: 2/18/15 11:07 AM. Current time: 2/18/15 11:21 AM. Session timeout is set to 120 seconds (2 minutes) at org.apache.shiro.session.mgt.SimpleSession.validate(SimpleSession.java:292) at org.apache.shiro.session.mgt.AbstractValidatingSessionManager.doValidate(AbstractValidatingSessionManager.java:186) at org.apache.shiro.session.mgt.AbstractValidatingSessionManager.validate(AbstractValidatingSessionManager.java:143) at org.apache.shiro.session.mgt.AbstractValidatingSessionManager.doGetSession(AbstractValidatingSessionManager.java:120) at org.apache.shiro.session.mgt.AbstractNativeSessionManager.lookupSession(AbstractNativeSessionManager.java:108) at org.apache.shiro.session.mgt.AbstractNativeSessionManager.lookupRequiredSession(AbstractNativeSessionManager.java:112) at org.apache.shiro.session.mgt.AbstractNativeSessionManager.getAttribute(AbstractNativeSessionManager.java:209) at org.apache.shiro.session.mgt.DelegatingSession.getAttribute(DelegatingSession.java:141) at org.apache.shiro.session.ProxiedSession.getAttribute(ProxiedSession.java:121) at org.apache.shiro.session.ProxiedSession.getAttribute(ProxiedSession.java:121) at org.apache.shiro.session.ProxiedSession.getAttribute(ProxiedSession.java:121) at org.apache.shiro.subject.support.DelegatingSubject.getRunAsPrincipalsStack(DelegatingSubject.java:469) at org.apache.shiro.subject.support.DelegatingSubject.getPrincipals(DelegatingSubject.java:153) at org.apache.shiro.subject.support.DelegatingSubject.hasPrincipals(DelegatingSubject.java:126) at org.apache.shiro.subject.support.DelegatingSubject.isPermitted(DelegatingSubject.java:158) at org.obiba.magma.security.shiro.ShiroAuthorizer.isPermitted(ShiroAuthorizer.java:21) at org.obiba.magma.security.SecuredDatasource.authzReadTable(SecuredDatasource.java:68) at org.obiba.magma.security.SecuredDatasource.getValueTable(SecuredDatasource.java:30) at org.obiba.magma.support.DatasourceCopier.copy(DatasourceCopier.java:214) at org.obiba.magma.support.MultithreadedDatasourceCopier.copyVariables(MultithreadedDatasourceCopier.java:222) at org.obiba.magma.support.MultithreadedDatasourceCopier.write(MultithreadedDatasourceCopier.java:182) at org.obiba.magma.support.MultithreadedDatasourceCopier.copy(MultithreadedDatasourceCopier.java:172) at org.obiba.opal.core.service.CopyValueTablesLockingAction$CopyAction.execute(CopyValueTablesLockingAction.java:159) at org.obiba.opal.core.magma.concurrent.LockingActionTemplate$1.doInTransactionWithoutResult(LockingActionTemplate.java:47) at org.springframework.transaction.support.TransactionCallbackWithoutResult.doInTransaction(TransactionCallbackWithoutResult.java:34) at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:133) at org.obiba.opal.core.magma.concurrent.LockingActionTemplate.doInTransaction(LockingActionTemplate.java:42) at org.obiba.opal.core.magma.concurrent.LockingActionTemplate.execute(LockingActionTemplate.java:31) at org.obiba.opal.core.service.DataImportServiceImpl.copyValueTables(DataImportServiceImpl.java:149) ... 13 more 1755434 [pool-1-thread-3] INFO org.obiba.opal.shell.commands.ImportCommand - Import failed in 13.81 min 1755434 [pool-1-thread-3] INFO org.obiba.opal.shell.service.impl.DefaultCommandJobService - CommandJob 3 finished executing {code} {code} 3647217 [pool-1-thread-5] INFO org.obiba.magma.support.DatasourceCopier - Copying ValueTable '500k' to 'carlos.500k' (copyMetadata=true, copyValues=false). 3654264 [pool-1-thread-5] ERROR org.obiba.opal.shell.commands.ImportCommand - Runtime error while importing data java.lang.RuntimeException: org.apache.shiro.session.UnknownSessionException: There is no session with id [89d982c3-37f4-4356-84ad-d55cc5483215] at org.obiba.opal.core.service.DataImportServiceImpl.copyValueTables(DataImportServiceImpl.java:157) at org.obiba.opal.core.service.DataImportServiceImpl.importData(DataImportServiceImpl.java:105) at org.obiba.opal.core.service.DataImportServiceImpl.importData(DataImportServiceImpl.java:87) at org.obiba.opal.shell.commands.ImportCommand.importFromTables(ImportCommand.java:155) at org.obiba.opal.shell.commands.ImportCommand.executeImports(ImportCommand.java:89) at org.obiba.opal.shell.commands.ImportCommand.execute(ImportCommand.java:68) ... Caused by: org.apache.shiro.session.UnknownSessionException: There is no session with id [89d982c3-37f4-4356-84ad-d55cc5483215] at org.apache.shiro.session.mgt.eis.AbstractSessionDAO.readSession(AbstractSessionDAO.java:170) at org.apache.shiro.session.mgt.eis.CachingSessionDAO.readSession(CachingSessionDAO.java:261) at org.apache.shiro.session.mgt.DefaultSessionManager.retrieveSessionFromDataSource(DefaultSessionManager.java:236) at org.apache.shiro.session.mgt.DefaultSessionManager.retrieveSession(DefaultSessionManager.java:222) at org.apache.shiro.session.mgt.AbstractValidatingSessionManager.doGetSession(AbstractValidatingSessionManager.java:118) at org.apache.shiro.session.mgt.AbstractNativeSessionManager.lookupSession(AbstractNativeSessionManager.java:108) at org.apache.shiro.session.mgt.AbstractNativeSessionManager.lookupRequiredSession(AbstractNativeSessionManager.java:112) at org.apache.shiro.session.mgt.AbstractNativeSessionManager.getAttribute(AbstractNativeSessionManager.java:209) at org.apache.shiro.session.mgt.DelegatingSession.getAttribute(DelegatingSession.java:141) at org.apache.shiro.session.ProxiedSession.getAttribute(ProxiedSession.java:121) at org.apache.shiro.session.ProxiedSession.getAttribute(ProxiedSession.java:121) at org.apache.shiro.session.ProxiedSession.getAttribute(ProxiedSession.java:121) at org.apache.shiro.subject.support.DelegatingSubject.getRunAsPrincipalsStack(DelegatingSubject.java:469) at org.apache.shiro.subject.support.DelegatingSubject.getPrincipals(DelegatingSubject.java:153) at org.apache.shiro.subject.support.DelegatingSubject.hasPrincipals(DelegatingSubject.java:126) at org.apache.shiro.subject.support.DelegatingSubject.isPermitted(DelegatingSubject.java:158) at org.obiba.magma.security.shiro.ShiroAuthorizer.isPermitted(ShiroAuthorizer.java:21) at org.obiba.magma.security.SecuredDatasource.authzReadTable(SecuredDatasource.java:68) at org.obiba.magma.security.SecuredDatasource.getValueTable(SecuredDatasource.java:30) at org.obiba.magma.support.DatasourceCopier.copy(DatasourceCopier.java:214) at org.obiba.magma.support.MultithreadedDatasourceCopier.copyVariables(MultithreadedDatasourceCopier.java:222) at org.obiba.magma.support.MultithreadedDatasourceCopier.write(MultithreadedDatasourceCopier.java:182) at org.obiba.magma.support.MultithreadedDatasourceCopier.copy(MultithreadedDatasourceCopier.java:172) at org.obiba.opal.core.service.CopyValueTablesLockingAction$CopyAction.execute(CopyValueTablesLockingAction.java:159) at org.obiba.opal.core.magma.concurrent.LockingActionTemplate$1.doInTransactionWithoutResult(LockingActionTemplate.java:47) at org.springframework.transaction.support.TransactionCallbackWithoutResult.doInTransaction(TransactionCallbackWithoutResult.java:34) at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:133) at org.obiba.opal.core.magma.concurrent.LockingActionTemplate.doInTransaction(LockingActionTemplate.java:42) at org.obiba.opal.core.magma.concurrent.LockingActionTemplate.execute(LockingActionTemplate.java:31) at org.obiba.opal.core.service.DataImportServiceImpl.copyValueTables(DataImportServiceImpl.java:149) ... 13 more 3654264 [pool-1-thread-5] INFO org.obiba.opal.shell.commands.ImportCommand - Import failed in 12.14 min {code}
    via by Carlos Silva,
    • java.lang.RuntimeException: org.hibernate.StaleObjectStateException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect) : [org.obiba.magma.datasource.hibernate.domain.ValueTableState#138] at org.obiba.opal.core.service.DataImportServiceImpl.copyValueTables(DataImportServiceImpl.java:142)[opal-core-2.2.15.jar:na] at org.obiba.opal.core.service.DataImportServiceImpl.importData(DataImportServiceImpl.java:105)[opal-core-2.2.15.jar:na] at org.obiba.opal.web.magma.TableResourceImpl.updateValueSet(TableResourceImpl.java:170)[opal-core-ws-2.2.15.jar:na] at sun.reflect.GeneratedMethodAccessor225.invoke(Unknown Source)[na:na] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[na:1.7.0_51] at java.lang.reflect.Method.invoke(Method.java:606)[na:1.7.0_51] at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)[spring-aop-4.0.3.RELEASE.jar:4.0.3.RELEASE] at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)[spring-aop-4.0.3.RELEASE.jar:4.0.3.RELEASE] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)[spring-aop-4.0.3.RELEASE.jar:4.0.3.RELEASE] at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:98)[spring-tx-4.0.3.RELEASE.jar:4.0.3.RELEASE] at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:262)[spring-tx-4.0.3.RELEASE.jar:4.0.3.RELEASE] at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:95)[spring-tx-4.0.3.RELEASE.jar:4.0.3.RELEASE] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)[spring-aop-4.0.3.RELEASE.jar:4.0.3.RELEASE] at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:207)[spring-aop-4.0.3.RELEASE.jar:4.0.3.RELEASE] at com.sun.proxy.$Proxy149.updateValueSet(Unknown Source)[na:na] at sun.reflect.GeneratedMethodAccessor225.invoke(Unknown Source)[na:na] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[na:1.7.0_51] at java.lang.reflect.Method.invoke(Method.java:606)[na:1.7.0_51] at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:137)[resteasy-jaxrs-3.0.6.Final.jar:na] at org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTarget(ResourceMethodInvoker.java:280)[resteasy-jaxrs-3.0.6.Final.jar:na] at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:234)[resteasy-jaxrs-3.0.6.Final.jar:na] at org.jboss.resteasy.core.ResourceLocatorInvoker.invokeOnTargetObject(ResourceLocatorInvoker.java:140)[resteasy-jaxrs-3.0.6.Final.jar:na] at org.jboss.resteasy.core.ResourceLocatorInvoker.invoke(ResourceLocatorInvoker.java:103)[resteasy-jaxrs-3.0.6.Final.jar:na] at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:356)[resteasy-jaxrs-3.0.6.Final.jar:na] at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:179)[resteasy-jaxrs-3.0.6.Final.jar:na] at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:220)[resteasy-jaxrs-3.0.6.Final.jar:na] at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:56)[resteasy-jaxrs-3.0.6.Final.jar:na] at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:51)[resteasy-jaxrs-3.0.6.Final.jar:na] at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)[javax.servlet-3.0.0.v201112011016.jar:na] at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:684)[jetty-servlet-8.1.14.v20131031.jar:8.1.14.v20131031] at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1496)[jetty-servlet-8.1.14.v20131031.jar:8.1.14.v20131031] at org.obiba.shiro.web.filter.AuthenticationFilter.doFilterInternal(AuthenticationFilter.java:88)[obiba-shiro-web-1.6.1.jar:na] at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:108)[spring-web-4.0.3.RELEASE.jar:4.0.3.RELEASE] at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:344)[spring-web-4.0.3.RELEASE.jar:4.0.3.RELEASE]
    No Bugmate found.