java.lang.RuntimeException: Time until giving the session warning should be less than the session timeout. Session Warning is 60000ms, session timeout is 3600ms.

Kuali JIRA | Matt Sargent | 4 years ago
  1. 0

    You should be able to follow the test steps below to test out the timeout warning dialog, however you get the error below when you click on the link... 1. Go to http://env11.rice.kuali.org/kr-krad/sessionPolicy?viewId=Lab-SessionPolicy-TimeoutWarning&methodToCall=setSessionTimeoutpageId=u1 2. Wait 2 minutes 3. Verify the dialog is shown with message 'Due to inactivity, you will be logged out in 1:00 minute(s).' 4. Verify the time counts down from 1 minute to 0 {code} java.lang.RuntimeException: Time until giving the session warning should be less than the session timeout. Session Warning is 60000ms, session timeout is 3600ms. at org.kuali.rice.krad.uif.view.View.performFinalize(View.java:361) at org.kuali.rice.krad.uif.service.impl.ViewHelperServiceImpl.performComponentFinalize(ViewHelperServiceImpl.java:1187) at org.kuali.rice.krad.uif.service.impl.ViewHelperServiceImpl.performFinalize(ViewHelperServiceImpl.java:1055) at org.kuali.rice.krad.uif.service.impl.ViewServiceImpl.performViewLifecycle(ViewServiceImpl.java:194) at org.kuali.rice.krad.uif.service.impl.ViewServiceImpl.buildView(ViewServiceImpl.java:134) at sun.reflect.GeneratedMethodAccessor939.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:318) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150) at net.bull.javamelody.MonitoringSpringInterceptor.invoke(MonitoringSpringInterceptor.java:74) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202) at $Proxy128.buildView(Unknown Source) at org.kuali.rice.krad.web.controller.UifControllerHelper.prepareViewForRendering(UifControllerHelper.java:218) at org.kuali.rice.krad.web.controller.UifControllerHelper.postControllerHandle(UifControllerHelper.java:136) at org.kuali.rice.krad.web.controller.UifControllerHandlerInterceptor.postHandle(UifControllerHandlerInterceptor.java:85) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:911) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:827) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:882) at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:778) at javax.servlet.http.HttpServlet.service(HttpServlet.java:621) at javax.servlet.http.HttpServlet.service(HttpServlet.java:722) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.kuali.rice.krad.web.filter.CharsetFilter.doFilter(CharsetFilter.java:58) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.kuali.rice.kew.web.UserLoginFilter.doFilter(UserLoginFilter.java:89) at org.kuali.rice.kew.web.UserLoginFilter.doFilter(UserLoginFilter.java:77) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.kuali.rice.kew.web.BootstrapFilterChain.doFilter(BootstrapFilter.java:327) at org.kuali.rice.kew.web.DummyLoginFilter.doFilter(DummyLoginFilter.java:96) at org.kuali.rice.kew.web.DummyLoginFilter.doFilter(DummyLoginFilter.java:55) at org.kuali.rice.kew.web.BootstrapFilterChain.doFilter(BootstrapFilter.java:320) at org.kuali.rice.kew.web.BootstrapFilter.doFilter(BootstrapFilter.java:199) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.kuali.rice.krad.web.filter.UifSessionTimeoutFilter.doFilter(UifSessionTimeoutFilter.java:128) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.kuali.rice.core.web.Log4JContextClearingFilter.doFilterInternal(Log4JContextClearingFilter.java:37) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.kuali.rice.krad.web.filter.HideWebInfFilter.doFilter(HideWebInfFilter.java:68) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.springframework.web.filter.AbstractRequestLoggingFilter.doFilterInternal(AbstractRequestLoggingFilter.java:193) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:224) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:987) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:579) at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:309) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:662){code}

    Kuali JIRA | 4 years ago | Matt Sargent
    java.lang.RuntimeException: Time until giving the session warning should be less than the session timeout. Session Warning is 60000ms, session timeout is 3600ms.
  2. 0

    You should be able to follow the test steps below to test out the timeout warning dialog, however you get the error below when you click on the link... 1. Go to http://env11.rice.kuali.org/kr-krad/sessionPolicy?viewId=Lab-SessionPolicy-TimeoutWarning&methodToCall=setSessionTimeoutpageId=u1 2. Wait 2 minutes 3. Verify the dialog is shown with message 'Due to inactivity, you will be logged out in 1:00 minute(s).' 4. Verify the time counts down from 1 minute to 0 {code} java.lang.RuntimeException: Time until giving the session warning should be less than the session timeout. Session Warning is 60000ms, session timeout is 3600ms. at org.kuali.rice.krad.uif.view.View.performFinalize(View.java:361) at org.kuali.rice.krad.uif.service.impl.ViewHelperServiceImpl.performComponentFinalize(ViewHelperServiceImpl.java:1187) at org.kuali.rice.krad.uif.service.impl.ViewHelperServiceImpl.performFinalize(ViewHelperServiceImpl.java:1055) at org.kuali.rice.krad.uif.service.impl.ViewServiceImpl.performViewLifecycle(ViewServiceImpl.java:194) at org.kuali.rice.krad.uif.service.impl.ViewServiceImpl.buildView(ViewServiceImpl.java:134) at sun.reflect.GeneratedMethodAccessor939.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:318) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150) at net.bull.javamelody.MonitoringSpringInterceptor.invoke(MonitoringSpringInterceptor.java:74) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202) at $Proxy128.buildView(Unknown Source) at org.kuali.rice.krad.web.controller.UifControllerHelper.prepareViewForRendering(UifControllerHelper.java:218) at org.kuali.rice.krad.web.controller.UifControllerHelper.postControllerHandle(UifControllerHelper.java:136) at org.kuali.rice.krad.web.controller.UifControllerHandlerInterceptor.postHandle(UifControllerHandlerInterceptor.java:85) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:911) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:827) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:882) at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:778) at javax.servlet.http.HttpServlet.service(HttpServlet.java:621) at javax.servlet.http.HttpServlet.service(HttpServlet.java:722) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.kuali.rice.krad.web.filter.CharsetFilter.doFilter(CharsetFilter.java:58) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.kuali.rice.kew.web.UserLoginFilter.doFilter(UserLoginFilter.java:89) at org.kuali.rice.kew.web.UserLoginFilter.doFilter(UserLoginFilter.java:77) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.kuali.rice.kew.web.BootstrapFilterChain.doFilter(BootstrapFilter.java:327) at org.kuali.rice.kew.web.DummyLoginFilter.doFilter(DummyLoginFilter.java:96) at org.kuali.rice.kew.web.DummyLoginFilter.doFilter(DummyLoginFilter.java:55) at org.kuali.rice.kew.web.BootstrapFilterChain.doFilter(BootstrapFilter.java:320) at org.kuali.rice.kew.web.BootstrapFilter.doFilter(BootstrapFilter.java:199) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.kuali.rice.krad.web.filter.UifSessionTimeoutFilter.doFilter(UifSessionTimeoutFilter.java:128) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.kuali.rice.core.web.Log4JContextClearingFilter.doFilterInternal(Log4JContextClearingFilter.java:37) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.kuali.rice.krad.web.filter.HideWebInfFilter.doFilter(HideWebInfFilter.java:68) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.springframework.web.filter.AbstractRequestLoggingFilter.doFilterInternal(AbstractRequestLoggingFilter.java:193) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:224) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:987) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:579) at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:309) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:662){code}

    Kuali JIRA | 4 years ago | Matt Sargent
    java.lang.RuntimeException: Time until giving the session warning should be less than the session timeout. Session Warning is 60000ms, session timeout is 3600ms.
  3. 0

    How to change the main view of a Vaadin 7 application?

    Stack Overflow | 3 years ago | Dmitri Pisarenko
    java.lang.RuntimeException: Component must be attached to a session when getConnectorId() is called for the first time
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    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}

    JIRA | 2 years ago | Carlos Silva
    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)
  6. 0

    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}

    JIRA | 2 years ago | Carlos Silva
    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)

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.RuntimeException

      Time until giving the session warning should be less than the session timeout. Session Warning is 60000ms, session timeout is 3600ms.

      at org.kuali.rice.krad.uif.view.View.performFinalize()
    2. org.kuali.rice
      ViewServiceImpl.buildView
      1. org.kuali.rice.krad.uif.view.View.performFinalize(View.java:361)
      2. org.kuali.rice.krad.uif.service.impl.ViewHelperServiceImpl.performComponentFinalize(ViewHelperServiceImpl.java:1187)
      3. org.kuali.rice.krad.uif.service.impl.ViewHelperServiceImpl.performFinalize(ViewHelperServiceImpl.java:1055)
      4. org.kuali.rice.krad.uif.service.impl.ViewServiceImpl.performViewLifecycle(ViewServiceImpl.java:194)
      5. org.kuali.rice.krad.uif.service.impl.ViewServiceImpl.buildView(ViewServiceImpl.java:134)
      5 frames
    3. Java RT
      Method.invoke
      1. sun.reflect.GeneratedMethodAccessor939.invoke(Unknown Source)
      2. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      3. java.lang.reflect.Method.invoke(Method.java:597)
      3 frames
    4. Spring AOP
      ReflectiveMethodInvocation.proceed
      1. org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:318)
      2. org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
      3. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
      3 frames
    5. net.bull.javamelody
      MonitoringSpringInterceptor.invoke
      1. net.bull.javamelody.MonitoringSpringInterceptor.invoke(MonitoringSpringInterceptor.java:74)
      1 frame
    6. Spring AOP
      JdkDynamicAopProxy.invoke
      1. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
      2. org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
      2 frames
    7. Unknown
      $Proxy128.buildView
      1. $Proxy128.buildView(Unknown Source)
      1 frame
    8. org.kuali.rice
      UifControllerHandlerInterceptor.postHandle
      1. org.kuali.rice.krad.web.controller.UifControllerHelper.prepareViewForRendering(UifControllerHelper.java:218)
      2. org.kuali.rice.krad.web.controller.UifControllerHelper.postControllerHandle(UifControllerHelper.java:136)
      3. org.kuali.rice.krad.web.controller.UifControllerHandlerInterceptor.postHandle(UifControllerHandlerInterceptor.java:85)
      3 frames
    9. Spring MVC
      FrameworkServlet.doGet
      1. org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:911)
      2. org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:827)
      3. org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:882)
      4. org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:778)
      4 frames
    10. JavaServlet
      HttpServlet.service
      1. javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
      2. javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
      2 frames
    11. Glassfish Core
      ApplicationFilterChain.doFilter
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
      2 frames
    12. org.kuali.rice
      CharsetFilter.doFilter
      1. org.kuali.rice.krad.web.filter.CharsetFilter.doFilter(CharsetFilter.java:58)
      1 frame
    13. Glassfish Core
      ApplicationFilterChain.doFilter
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
      2 frames
    14. org.kuali.rice
      UserLoginFilter.doFilter
      1. org.kuali.rice.kew.web.UserLoginFilter.doFilter(UserLoginFilter.java:89)
      2. org.kuali.rice.kew.web.UserLoginFilter.doFilter(UserLoginFilter.java:77)
      2 frames
    15. Glassfish Core
      ApplicationFilterChain.doFilter
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
      2 frames
    16. org.kuali.rice
      BootstrapFilter.doFilter
      1. org.kuali.rice.kew.web.BootstrapFilterChain.doFilter(BootstrapFilter.java:327)
      2. org.kuali.rice.kew.web.DummyLoginFilter.doFilter(DummyLoginFilter.java:96)
      3. org.kuali.rice.kew.web.DummyLoginFilter.doFilter(DummyLoginFilter.java:55)
      4. org.kuali.rice.kew.web.BootstrapFilterChain.doFilter(BootstrapFilter.java:320)
      5. org.kuali.rice.kew.web.BootstrapFilter.doFilter(BootstrapFilter.java:199)
      5 frames
    17. Glassfish Core
      ApplicationFilterChain.doFilter
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
      2 frames
    18. org.kuali.rice
      UifSessionTimeoutFilter.doFilter
      1. org.kuali.rice.krad.web.filter.UifSessionTimeoutFilter.doFilter(UifSessionTimeoutFilter.java:128)
      1 frame
    19. Glassfish Core
      ApplicationFilterChain.doFilter
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
      2 frames
    20. org.kuali.rice
      Log4JContextClearingFilter.doFilterInternal
      1. org.kuali.rice.core.web.Log4JContextClearingFilter.doFilterInternal(Log4JContextClearingFilter.java:37)
      1 frame
    21. Spring
      OncePerRequestFilter.doFilter
      1. org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
      1 frame
    22. Glassfish Core
      ApplicationFilterChain.doFilter
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
      2 frames
    23. org.kuali.rice
      HideWebInfFilter.doFilter
      1. org.kuali.rice.krad.web.filter.HideWebInfFilter.doFilter(HideWebInfFilter.java:68)
      1 frame
    24. Glassfish Core
      ApplicationFilterChain.doFilter
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
      2 frames
    25. Spring
      OncePerRequestFilter.doFilter
      1. org.springframework.web.filter.AbstractRequestLoggingFilter.doFilterInternal(AbstractRequestLoggingFilter.java:193)
      2. org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
      2 frames
    26. Glassfish Core
      CoyoteAdapter.service
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
      3. org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:224)
      4. org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
      5. org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
      6. org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
      7. org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
      8. org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)
      9. org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
      10. org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
      10 frames
    27. Grizzly HTTP
      JIoEndpoint$SocketProcessor.run
      1. org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:987)
      2. org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:579)
      3. org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:309)
      3 frames
    28. Java RT
      ThreadPoolExecutor$Worker.run
      1. java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
      2. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
      2 frames