java.lang.IllegalStateException

Atlassian JIRA | Sunny Kalsi | 2 years ago
  1. 0

    Instead of returning that a token is invalid, Crowd throws an StaleStateException when a token is validated (using the REST client's {{validateSSOAuthentication}}) and invalidated (using the REST client's {{invalidateSSOToken}}) in parallel. This has no effect in practise, because the token is still treated as invalid, but it causes exceptions in our logs. The error can be fairly conveniently generated with some minor tweaks to BenchLogins in the crowd-perf repository. Relevant Exception: {noformat} [INFO] [talledLocalContainer] 2015-06-01 16:48:26,354 http-bio-8095-exec-16 ERROR [common.error.jersey.ThrowableExceptionMapper] Uncaught exception thrown by REST service: Batch update returned unexpected row count from update [ 0]; actual row count: 0; expected: 1; nested exception is org.hibernate.StaleStateException: Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1 [INFO] [talledLocalContainer] org.springframework.orm.hibernate4.HibernateOptimisticLockingFailureException: Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1; nested exception is org.h ibernate.StaleStateException: Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1 [INFO] [talledLocalContainer] at org.springframework.orm.hibernate4.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:181) [INFO] [talledLocalContainer] at org.springframework.orm.hibernate4.HibernateTransactionManager.convertHibernateAccessException(HibernateTransactionManager.java:678) [INFO] [talledLocalContainer] at org.springframework.orm.hibernate4.HibernateTransactionManager.doCommit(HibernateTransactionManager.java:560) [INFO] [talledLocalContainer] at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:755) [INFO] [talledLocalContainer] at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:724) [INFO] [talledLocalContainer] at org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(TransactionAspectSupport.java:475) [INFO] [talledLocalContainer] at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:270) [INFO] [talledLocalContainer] at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:94) [INFO] [talledLocalContainer] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) [INFO] [talledLocalContainer] at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) [INFO] [talledLocalContainer] at com.sun.proxy.$Proxy31.validateUserToken(Unknown Source) [INFO] [talledLocalContainer] at com.atlassian.crowd.plugin.rest.service.controller.TokenController.validateToken(TokenController.java:141) [INFO] [talledLocalContainer] at com.atlassian.crowd.plugin.rest.service.resource.TokenResource.validateToken(TokenResource.java:178) [INFO] [talledLocalContainer] at sun.reflect.GeneratedMethodAccessor268.invoke(Unknown Source) [INFO] [talledLocalContainer] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [INFO] [talledLocalContainer] at java.lang.reflect.Method.invoke(Method.java:497) [INFO] [talledLocalContainer] at com.atlassian.plugins.rest.common.interceptor.impl.DispatchProviderHelper$ResponseOutInvoker$1.invoke(DispatchProviderHelper.java:234) [INFO] [talledLocalContainer] at com.atlassian.plugins.rest.common.interceptor.impl.DispatchProviderHelper$1.intercept(DispatchProviderHelper.java:100) [INFO] [talledLocalContainer] at com.atlassian.plugins.rest.common.interceptor.impl.DefaultMethodInvocation.invoke(DefaultMethodInvocation.java:61) [INFO] [talledLocalContainer] at com.atlassian.plugins.rest.common.validation.ValidationInterceptor.intercept(ValidationInterceptor.java:78) [INFO] [talledLocalContainer] at com.atlassian.plugins.rest.common.interceptor.impl.DefaultMethodInvocation.invoke(DefaultMethodInvocation.java:61) [INFO] [talledLocalContainer] at com.atlassian.plugins.rest.common.expand.interceptor.ExpandInterceptor.intercept(ExpandInterceptor.java:38) [INFO] [talledLocalContainer] at com.atlassian.plugins.rest.common.interceptor.impl.DefaultMethodInvocation.invoke(DefaultMethodInvocation.java:61) [INFO] [talledLocalContainer] at com.atlassian.plugins.rest.common.interceptor.impl.DispatchProviderHelper.invokeMethodWithInterceptors(DispatchProviderHelper.java:132) [INFO] [talledLocalContainer] at com.atlassian.plugins.rest.common.interceptor.impl.DispatchProviderHelper$ResponseOutInvoker._dispatch(DispatchProviderHelper.java:230) [INFO] [talledLocalContainer] at com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75) [INFO] [talledLocalContainer] at com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:302) [INFO] [talledLocalContainer] at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147) [INFO] [talledLocalContainer] at com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:108) [INFO] [talledLocalContainer] at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147) [INFO] [talledLocalContainer] at com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:84) [INFO] [talledLocalContainer] at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1511) [INFO] [talledLocalContainer] at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1442) [INFO] [talledLocalContainer] at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1391) [INFO] [talledLocalContainer] at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1381) [INFO] [talledLocalContainer] at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:416) [INFO] [talledLocalContainer] at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:538) [INFO] [talledLocalContainer] at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:716) [INFO] [talledLocalContainer] at javax.servlet.http.HttpServlet.service(HttpServlet.java:727) [INFO] [talledLocalContainer] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303) [INFO] [talledLocalContainer] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) [INFO] [talledLocalContainer] at com.atlassian.crowd.plugin.rest.filter.RestServiceVersionFilter.doFilter(RestServiceVersionFilter.java:86) [INFO] [talledLocalContainer] at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:343) [INFO] [talledLocalContainer] at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:260) [INFO] [talledLocalContainer] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) [INFO] [talledLocalContainer] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) [INFO] [talledLocalContainer] at com.atlassian.crowd.plugin.rest.filter.BasicApplicationAuthenticationFilter.doFilter(BasicApplicationAuthenticationFilter.java:97) [INFO] [talledLocalContainer] at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:343) [INFO] [talledLocalContainer] at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:260) [INFO] [talledLocalContainer] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) [INFO] [talledLocalContainer] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) [INFO] [talledLocalContainer] at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) [INFO] [talledLocalContainer] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) [INFO] [talledLocalContainer] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) [INFO] [talledLocalContainer] at org.springframework.orm.hibernate4.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:151) [INFO] [talledLocalContainer] at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:106) [INFO] [talledLocalContainer] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) [INFO] [talledLocalContainer] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) [INFO] [talledLocalContainer] at com.atlassian.crowd.security.BlockOpenSocialRequestFilter.doFilter(BlockOpenSocialRequestFilter.java:45) [INFO] [talledLocalContainer] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) [INFO] [talledLocalContainer] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) [INFO] [talledLocalContainer] at com.atlassian.crowd.horde.tenant.TenantServletFilter.doFilter(TenantServletFilter.java:74) [INFO] [talledLocalContainer] at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:343) [INFO] [talledLocalContainer] at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:260) [INFO] [talledLocalContainer] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) [INFO] [talledLocalContainer] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) [INFO] [talledLocalContainer] at com.atlassian.crowd.plugin.web.filter.HttpContextFilter.doFilter(HttpContextFilter.java:34) [INFO] [talledLocalContainer] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) [INFO] [talledLocalContainer] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) [INFO] [talledLocalContainer] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220) [INFO] [talledLocalContainer] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122) [INFO] [talledLocalContainer] at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501) [INFO] [talledLocalContainer] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171) [INFO] [talledLocalContainer] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [INFO] [talledLocalContainer] at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950) [INFO] [talledLocalContainer] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116) [INFO] [talledLocalContainer] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408) [INFO] [talledLocalContainer] at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1040) [INFO] [talledLocalContainer] at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:607) [INFO] [talledLocalContainer] at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:316) [INFO] [talledLocalContainer] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [INFO] [talledLocalContainer] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [INFO] [talledLocalContainer] at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [INFO] [talledLocalContainer] at java.lang.Thread.run(Thread.java:745) [INFO] [talledLocalContainer] Caused by: org.hibernate.StaleStateException: Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1 [INFO] [talledLocalContainer] at org.hibernate.jdbc.Expectations$BasicExpectation.checkBatched(Expectations.java:81) [INFO] [talledLocalContainer] at org.hibernate.jdbc.Expectations$BasicExpectation.verifyOutcome(Expectations.java:73) [INFO] [talledLocalContainer] at org.hibernate.engine.jdbc.batch.internal.BatchingBatch.checkRowCounts(BatchingBatch.java:141) [INFO] [talledLocalContainer] at org.hibernate.engine.jdbc.batch.internal.BatchingBatch.performExecution(BatchingBatch.java:118) [INFO] [talledLocalContainer] at org.hibernate.engine.jdbc.batch.internal.BatchingBatch.doExecuteBatch(BatchingBatch.java:101) [INFO] [talledLocalContainer] at org.hibernate.engine.jdbc.batch.internal.AbstractBatchImpl.execute(AbstractBatchImpl.java:157) [INFO] [talledLocalContainer] at org.hibernate.engine.jdbc.internal.JdbcCoordinatorImpl.getBatch(JdbcCoordinatorImpl.java:196) [INFO] [talledLocalContainer] at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:3187) [INFO] [talledLocalContainer] at org.hibernate.persister.entity.AbstractEntityPersister.updateOrInsert(AbstractEntityPersister.java:3138) [INFO] [talledLocalContainer] at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:3468) [INFO] [talledLocalContainer] at org.hibernate.action.internal.EntityUpdateAction.execute(EntityUpdateAction.java:140) [INFO] [talledLocalContainer] at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:395) [INFO] [talledLocalContainer] at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:387) [INFO] [talledLocalContainer] at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:304) [INFO] [talledLocalContainer] at org.hibernate.event.internal.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:349) [INFO] [talledLocalContainer] at org.hibernate.event.internal.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:56) [INFO] [talledLocalContainer] at org.hibernate.internal.SessionImpl.flush(SessionImpl.java:1159) [INFO] [talledLocalContainer] at org.hibernate.internal.SessionImpl.managedFlush(SessionImpl.java:404) [INFO] [talledLocalContainer] at org.hibernate.engine.transaction.internal.jdbc.JdbcTransaction.beforeTransactionCommit(JdbcTransaction.java:101) [INFO] [talledLocalContainer] at org.hibernate.engine.transaction.spi.AbstractTransactionImpl.commit(AbstractTransactionImpl.java:175) [INFO] [talledLocalContainer] at org.springframework.orm.hibernate4.HibernateTransactionManager.doCommit(HibernateTransactionManager.java:552) [INFO] [talledLocalContainer] ... 91 more [INFO] [talledLocalContainer] Jun 01, 2015 4:48:26 PM com.sun.jersey.spi.container.ContainerResponse mapException [INFO] [talledLocalContainer] SEVERE: Exception mapper com.atlassian.plugins.rest.common.error.jersey.ThrowableExceptionMapper@68c52d43 for Throwable org.springframework.orm.hibernate4.HibernateOptimisticLockingFailureException: Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1; nested exception is org.hibernate.StaleStateException: Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1 threw a RuntimeException when attempting to obtain the response [INFO] [talledLocalContainer] Jun 01, 2015 4:48:26 PM com.sun.jersey.spi.container.ContainerResponse logException [INFO] [talledLocalContainer] SEVERE: Mapped exception to response: 500 (Internal Server Error) [INFO] [talledLocalContainer] java.lang.IllegalStateException [INFO] [talledLocalContainer] at com.sun.jersey.server.impl.ThreadLocalHttpContext.getRequest(ThreadLocalHttpContext.java:82) [INFO] [talledLocalContainer] at com.sun.jersey.server.impl.application.WebApplicationImpl$2.invoke(WebApplicationImpl.java:286) [INFO] [talledLocalContainer] at com.sun.proxy.$Proxy49.selectVariant(Unknown Source) [INFO] [talledLocalContainer] at com.atlassian.plugins.rest.common.error.jersey.UncaughtExceptionEntity.variantFor(UncaughtExceptionEntity.java:85) [INFO] [talledLocalContainer] at com.atlassian.plugins.rest.common.error.jersey.ThrowableExceptionMapper.toResponse(ThrowableExceptionMapper.java:49) [INFO] [talledLocalContainer] at com.sun.jersey.spi.container.ContainerResponse.mapException(ContainerResponse.java:463) [INFO] [talledLocalContainer] at com.sun.jersey.spi.container.ContainerResponse.mapMappableContainerException(ContainerResponse.java:400) [INFO] [talledLocalContainer] at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1446) [INFO] [talledLocalContainer] at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1391) [INFO] [talledLocalContainer] at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1381) [INFO] [talledLocalContainer] at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:416) [INFO] [talledLocalContainer] at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:538) [INFO] [talledLocalContainer] at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:716) [INFO] [talledLocalContainer] at javax.servlet.http.HttpServlet.service(HttpServlet.java:727) [INFO] [talledLocalContainer] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303) [INFO] [talledLocalContainer] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) [INFO] [talledLocalContainer] at com.atlassian.crowd.plugin.rest.filter.RestServiceVersionFilter.doFilter(RestServiceVersionFilter.java:86) [INFO] [talledLocalContainer] at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:343) [INFO] [talledLocalContainer] at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:260) [INFO] [talledLocalContainer] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) [INFO] [talledLocalContainer] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) [INFO] [talledLocalContainer] at com.atlassian.crowd.plugin.rest.filter.BasicApplicationAuthenticationFilter.doFilter(BasicApplicationAuthenticationFilter.java:97) [INFO] [talledLocalContainer] at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:343) [INFO] [talledLocalContainer] at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:260) [INFO] [talledLocalContainer] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) [INFO] [talledLocalContainer] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) [INFO] [talledLocalContainer] at com.atlassian.crowd.horde.filters.SysadminPasswordExpiryServletFilter.doFilter(SysadminPasswordExpiryServletFilter.java:51) [INFO] [talledLocalContainer] at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:343) [INFO] [talledLocalContainer] at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:260) [INFO] [talledLocalContainer] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) [INFO] [talledLocalContainer] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) [INFO] [talledLocalContainer] at com.atlassian.crowd.horde.analytics.HttpRequestAnalyticsFilter.doFilter(HttpRequestAnalyticsFilter.java:51) [INFO] [talledLocalContainer] at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:343) [INFO] [talledLocalContainer] at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:260) [INFO] [talledLocalContainer] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) [INFO] [talledLocalContainer] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) [INFO] [talledLocalContainer] at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) [INFO] [talledLocalContainer] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) [INFO] [talledLocalContainer] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) [INFO] [talledLocalContainer] at org.springframework.orm.hibernate4.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:151) [INFO] [talledLocalContainer] at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:106) [INFO] [talledLocalContainer] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) [INFO] [talledLocalContainer] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) [INFO] [talledLocalContainer] at com.atlassian.crowd.security.BlockOpenSocialRequestFilter.doFilter(BlockOpenSocialRequestFilter.java:45) [INFO] [talledLocalContainer] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) [INFO] [talledLocalContainer] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) [INFO] [talledLocalContainer] at com.atlassian.crowd.horde.tenant.TenantServletFilter.doFilter(TenantServletFilter.java:74) [INFO] [talledLocalContainer] at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:343) [INFO] [talledLocalContainer] at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:260) [INFO] [talledLocalContainer] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) [INFO] [talledLocalContainer] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) [INFO] [talledLocalContainer] at com.atlassian.crowd.plugin.web.filter.HttpContextFilter.doFilter(HttpContextFilter.java:34) [INFO] [talledLocalContainer] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) [INFO] [talledLocalContainer] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) [INFO] [talledLocalContainer] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220) [INFO] [talledLocalContainer] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122) [INFO] [talledLocalContainer] at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501) [INFO] [talledLocalContainer] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171) [INFO] [talledLocalContainer] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [INFO] [talledLocalContainer] at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950) [INFO] [talledLocalContainer] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116) [INFO] [talledLocalContainer] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408) [INFO] [talledLocalContainer] at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1040) [INFO] [talledLocalContainer] at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:607) [INFO] [talledLocalContainer] at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:316) [INFO] [talledLocalContainer] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [INFO] [talledLocalContainer] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [INFO] [talledLocalContainer] at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [INFO] [talledLocalContainer] at java.lang.Thread.run(Thread.java:745) {noformat}

    Atlassian JIRA | 2 years ago | Sunny Kalsi
    java.lang.IllegalStateException
  2. 0

    Instead of returning that a token is invalid, Crowd throws an StaleStateException when a token is validated (using the REST client's {{validateSSOAuthentication}}) and invalidated (using the REST client's {{invalidateSSOToken}}) in parallel. This has no effect in practise, because the token is still treated as invalid, but it causes exceptions in our logs. The error can be fairly conveniently generated with some minor tweaks to BenchLogins in the crowd-perf repository. Relevant Exception: {noformat} [INFO] [talledLocalContainer] 2015-06-01 16:48:26,354 http-bio-8095-exec-16 ERROR [common.error.jersey.ThrowableExceptionMapper] Uncaught exception thrown by REST service: Batch update returned unexpected row count from update [ 0]; actual row count: 0; expected: 1; nested exception is org.hibernate.StaleStateException: Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1 [INFO] [talledLocalContainer] org.springframework.orm.hibernate4.HibernateOptimisticLockingFailureException: Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1; nested exception is org.h ibernate.StaleStateException: Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1 [INFO] [talledLocalContainer] at org.springframework.orm.hibernate4.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:181) [INFO] [talledLocalContainer] at org.springframework.orm.hibernate4.HibernateTransactionManager.convertHibernateAccessException(HibernateTransactionManager.java:678) [INFO] [talledLocalContainer] at org.springframework.orm.hibernate4.HibernateTransactionManager.doCommit(HibernateTransactionManager.java:560) [INFO] [talledLocalContainer] at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:755) [INFO] [talledLocalContainer] at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:724) [INFO] [talledLocalContainer] at org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(TransactionAspectSupport.java:475) [INFO] [talledLocalContainer] at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:270) [INFO] [talledLocalContainer] at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:94) [INFO] [talledLocalContainer] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) [INFO] [talledLocalContainer] at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) [INFO] [talledLocalContainer] at com.sun.proxy.$Proxy31.validateUserToken(Unknown Source) [INFO] [talledLocalContainer] at com.atlassian.crowd.plugin.rest.service.controller.TokenController.validateToken(TokenController.java:141) [INFO] [talledLocalContainer] at com.atlassian.crowd.plugin.rest.service.resource.TokenResource.validateToken(TokenResource.java:178) [INFO] [talledLocalContainer] at sun.reflect.GeneratedMethodAccessor268.invoke(Unknown Source) [INFO] [talledLocalContainer] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [INFO] [talledLocalContainer] at java.lang.reflect.Method.invoke(Method.java:497) [INFO] [talledLocalContainer] at com.atlassian.plugins.rest.common.interceptor.impl.DispatchProviderHelper$ResponseOutInvoker$1.invoke(DispatchProviderHelper.java:234) [INFO] [talledLocalContainer] at com.atlassian.plugins.rest.common.interceptor.impl.DispatchProviderHelper$1.intercept(DispatchProviderHelper.java:100) [INFO] [talledLocalContainer] at com.atlassian.plugins.rest.common.interceptor.impl.DefaultMethodInvocation.invoke(DefaultMethodInvocation.java:61) [INFO] [talledLocalContainer] at com.atlassian.plugins.rest.common.validation.ValidationInterceptor.intercept(ValidationInterceptor.java:78) [INFO] [talledLocalContainer] at com.atlassian.plugins.rest.common.interceptor.impl.DefaultMethodInvocation.invoke(DefaultMethodInvocation.java:61) [INFO] [talledLocalContainer] at com.atlassian.plugins.rest.common.expand.interceptor.ExpandInterceptor.intercept(ExpandInterceptor.java:38) [INFO] [talledLocalContainer] at com.atlassian.plugins.rest.common.interceptor.impl.DefaultMethodInvocation.invoke(DefaultMethodInvocation.java:61) [INFO] [talledLocalContainer] at com.atlassian.plugins.rest.common.interceptor.impl.DispatchProviderHelper.invokeMethodWithInterceptors(DispatchProviderHelper.java:132) [INFO] [talledLocalContainer] at com.atlassian.plugins.rest.common.interceptor.impl.DispatchProviderHelper$ResponseOutInvoker._dispatch(DispatchProviderHelper.java:230) [INFO] [talledLocalContainer] at com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75) [INFO] [talledLocalContainer] at com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:302) [INFO] [talledLocalContainer] at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147) [INFO] [talledLocalContainer] at com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:108) [INFO] [talledLocalContainer] at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147) [INFO] [talledLocalContainer] at com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:84) [INFO] [talledLocalContainer] at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1511) [INFO] [talledLocalContainer] at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1442) [INFO] [talledLocalContainer] at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1391) [INFO] [talledLocalContainer] at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1381) [INFO] [talledLocalContainer] at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:416) [INFO] [talledLocalContainer] at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:538) [INFO] [talledLocalContainer] at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:716) [INFO] [talledLocalContainer] at javax.servlet.http.HttpServlet.service(HttpServlet.java:727) [INFO] [talledLocalContainer] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303) [INFO] [talledLocalContainer] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) [INFO] [talledLocalContainer] at com.atlassian.crowd.plugin.rest.filter.RestServiceVersionFilter.doFilter(RestServiceVersionFilter.java:86) [INFO] [talledLocalContainer] at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:343) [INFO] [talledLocalContainer] at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:260) [INFO] [talledLocalContainer] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) [INFO] [talledLocalContainer] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) [INFO] [talledLocalContainer] at com.atlassian.crowd.plugin.rest.filter.BasicApplicationAuthenticationFilter.doFilter(BasicApplicationAuthenticationFilter.java:97) [INFO] [talledLocalContainer] at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:343) [INFO] [talledLocalContainer] at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:260) [INFO] [talledLocalContainer] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) [INFO] [talledLocalContainer] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) [INFO] [talledLocalContainer] at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) [INFO] [talledLocalContainer] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) [INFO] [talledLocalContainer] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) [INFO] [talledLocalContainer] at org.springframework.orm.hibernate4.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:151) [INFO] [talledLocalContainer] at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:106) [INFO] [talledLocalContainer] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) [INFO] [talledLocalContainer] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) [INFO] [talledLocalContainer] at com.atlassian.crowd.security.BlockOpenSocialRequestFilter.doFilter(BlockOpenSocialRequestFilter.java:45) [INFO] [talledLocalContainer] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) [INFO] [talledLocalContainer] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) [INFO] [talledLocalContainer] at com.atlassian.crowd.horde.tenant.TenantServletFilter.doFilter(TenantServletFilter.java:74) [INFO] [talledLocalContainer] at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:343) [INFO] [talledLocalContainer] at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:260) [INFO] [talledLocalContainer] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) [INFO] [talledLocalContainer] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) [INFO] [talledLocalContainer] at com.atlassian.crowd.plugin.web.filter.HttpContextFilter.doFilter(HttpContextFilter.java:34) [INFO] [talledLocalContainer] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) [INFO] [talledLocalContainer] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) [INFO] [talledLocalContainer] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220) [INFO] [talledLocalContainer] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122) [INFO] [talledLocalContainer] at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501) [INFO] [talledLocalContainer] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171) [INFO] [talledLocalContainer] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [INFO] [talledLocalContainer] at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950) [INFO] [talledLocalContainer] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116) [INFO] [talledLocalContainer] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408) [INFO] [talledLocalContainer] at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1040) [INFO] [talledLocalContainer] at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:607) [INFO] [talledLocalContainer] at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:316) [INFO] [talledLocalContainer] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [INFO] [talledLocalContainer] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [INFO] [talledLocalContainer] at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [INFO] [talledLocalContainer] at java.lang.Thread.run(Thread.java:745) [INFO] [talledLocalContainer] Caused by: org.hibernate.StaleStateException: Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1 [INFO] [talledLocalContainer] at org.hibernate.jdbc.Expectations$BasicExpectation.checkBatched(Expectations.java:81) [INFO] [talledLocalContainer] at org.hibernate.jdbc.Expectations$BasicExpectation.verifyOutcome(Expectations.java:73) [INFO] [talledLocalContainer] at org.hibernate.engine.jdbc.batch.internal.BatchingBatch.checkRowCounts(BatchingBatch.java:141) [INFO] [talledLocalContainer] at org.hibernate.engine.jdbc.batch.internal.BatchingBatch.performExecution(BatchingBatch.java:118) [INFO] [talledLocalContainer] at org.hibernate.engine.jdbc.batch.internal.BatchingBatch.doExecuteBatch(BatchingBatch.java:101) [INFO] [talledLocalContainer] at org.hibernate.engine.jdbc.batch.internal.AbstractBatchImpl.execute(AbstractBatchImpl.java:157) [INFO] [talledLocalContainer] at org.hibernate.engine.jdbc.internal.JdbcCoordinatorImpl.getBatch(JdbcCoordinatorImpl.java:196) [INFO] [talledLocalContainer] at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:3187) [INFO] [talledLocalContainer] at org.hibernate.persister.entity.AbstractEntityPersister.updateOrInsert(AbstractEntityPersister.java:3138) [INFO] [talledLocalContainer] at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:3468) [INFO] [talledLocalContainer] at org.hibernate.action.internal.EntityUpdateAction.execute(EntityUpdateAction.java:140) [INFO] [talledLocalContainer] at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:395) [INFO] [talledLocalContainer] at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:387) [INFO] [talledLocalContainer] at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:304) [INFO] [talledLocalContainer] at org.hibernate.event.internal.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:349) [INFO] [talledLocalContainer] at org.hibernate.event.internal.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:56) [INFO] [talledLocalContainer] at org.hibernate.internal.SessionImpl.flush(SessionImpl.java:1159) [INFO] [talledLocalContainer] at org.hibernate.internal.SessionImpl.managedFlush(SessionImpl.java:404) [INFO] [talledLocalContainer] at org.hibernate.engine.transaction.internal.jdbc.JdbcTransaction.beforeTransactionCommit(JdbcTransaction.java:101) [INFO] [talledLocalContainer] at org.hibernate.engine.transaction.spi.AbstractTransactionImpl.commit(AbstractTransactionImpl.java:175) [INFO] [talledLocalContainer] at org.springframework.orm.hibernate4.HibernateTransactionManager.doCommit(HibernateTransactionManager.java:552) [INFO] [talledLocalContainer] ... 91 more [INFO] [talledLocalContainer] Jun 01, 2015 4:48:26 PM com.sun.jersey.spi.container.ContainerResponse mapException [INFO] [talledLocalContainer] SEVERE: Exception mapper com.atlassian.plugins.rest.common.error.jersey.ThrowableExceptionMapper@68c52d43 for Throwable org.springframework.orm.hibernate4.HibernateOptimisticLockingFailureException: Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1; nested exception is org.hibernate.StaleStateException: Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1 threw a RuntimeException when attempting to obtain the response [INFO] [talledLocalContainer] Jun 01, 2015 4:48:26 PM com.sun.jersey.spi.container.ContainerResponse logException [INFO] [talledLocalContainer] SEVERE: Mapped exception to response: 500 (Internal Server Error) [INFO] [talledLocalContainer] java.lang.IllegalStateException [INFO] [talledLocalContainer] at com.sun.jersey.server.impl.ThreadLocalHttpContext.getRequest(ThreadLocalHttpContext.java:82) [INFO] [talledLocalContainer] at com.sun.jersey.server.impl.application.WebApplicationImpl$2.invoke(WebApplicationImpl.java:286) [INFO] [talledLocalContainer] at com.sun.proxy.$Proxy49.selectVariant(Unknown Source) [INFO] [talledLocalContainer] at com.atlassian.plugins.rest.common.error.jersey.UncaughtExceptionEntity.variantFor(UncaughtExceptionEntity.java:85) [INFO] [talledLocalContainer] at com.atlassian.plugins.rest.common.error.jersey.ThrowableExceptionMapper.toResponse(ThrowableExceptionMapper.java:49) [INFO] [talledLocalContainer] at com.sun.jersey.spi.container.ContainerResponse.mapException(ContainerResponse.java:463) [INFO] [talledLocalContainer] at com.sun.jersey.spi.container.ContainerResponse.mapMappableContainerException(ContainerResponse.java:400) [INFO] [talledLocalContainer] at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1446) [INFO] [talledLocalContainer] at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1391) [INFO] [talledLocalContainer] at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1381) [INFO] [talledLocalContainer] at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:416) [INFO] [talledLocalContainer] at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:538) [INFO] [talledLocalContainer] at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:716) [INFO] [talledLocalContainer] at javax.servlet.http.HttpServlet.service(HttpServlet.java:727) [INFO] [talledLocalContainer] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303) [INFO] [talledLocalContainer] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) [INFO] [talledLocalContainer] at com.atlassian.crowd.plugin.rest.filter.RestServiceVersionFilter.doFilter(RestServiceVersionFilter.java:86) [INFO] [talledLocalContainer] at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:343) [INFO] [talledLocalContainer] at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:260) [INFO] [talledLocalContainer] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) [INFO] [talledLocalContainer] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) [INFO] [talledLocalContainer] at com.atlassian.crowd.plugin.rest.filter.BasicApplicationAuthenticationFilter.doFilter(BasicApplicationAuthenticationFilter.java:97) [INFO] [talledLocalContainer] at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:343) [INFO] [talledLocalContainer] at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:260) [INFO] [talledLocalContainer] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) [INFO] [talledLocalContainer] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) [INFO] [talledLocalContainer] at com.atlassian.crowd.horde.filters.SysadminPasswordExpiryServletFilter.doFilter(SysadminPasswordExpiryServletFilter.java:51) [INFO] [talledLocalContainer] at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:343) [INFO] [talledLocalContainer] at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:260) [INFO] [talledLocalContainer] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) [INFO] [talledLocalContainer] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) [INFO] [talledLocalContainer] at com.atlassian.crowd.horde.analytics.HttpRequestAnalyticsFilter.doFilter(HttpRequestAnalyticsFilter.java:51) [INFO] [talledLocalContainer] at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:343) [INFO] [talledLocalContainer] at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:260) [INFO] [talledLocalContainer] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) [INFO] [talledLocalContainer] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) [INFO] [talledLocalContainer] at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) [INFO] [talledLocalContainer] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) [INFO] [talledLocalContainer] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) [INFO] [talledLocalContainer] at org.springframework.orm.hibernate4.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:151) [INFO] [talledLocalContainer] at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:106) [INFO] [talledLocalContainer] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) [INFO] [talledLocalContainer] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) [INFO] [talledLocalContainer] at com.atlassian.crowd.security.BlockOpenSocialRequestFilter.doFilter(BlockOpenSocialRequestFilter.java:45) [INFO] [talledLocalContainer] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) [INFO] [talledLocalContainer] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) [INFO] [talledLocalContainer] at com.atlassian.crowd.horde.tenant.TenantServletFilter.doFilter(TenantServletFilter.java:74) [INFO] [talledLocalContainer] at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:343) [INFO] [talledLocalContainer] at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:260) [INFO] [talledLocalContainer] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) [INFO] [talledLocalContainer] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) [INFO] [talledLocalContainer] at com.atlassian.crowd.plugin.web.filter.HttpContextFilter.doFilter(HttpContextFilter.java:34) [INFO] [talledLocalContainer] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) [INFO] [talledLocalContainer] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) [INFO] [talledLocalContainer] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220) [INFO] [talledLocalContainer] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122) [INFO] [talledLocalContainer] at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501) [INFO] [talledLocalContainer] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171) [INFO] [talledLocalContainer] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [INFO] [talledLocalContainer] at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950) [INFO] [talledLocalContainer] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116) [INFO] [talledLocalContainer] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408) [INFO] [talledLocalContainer] at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1040) [INFO] [talledLocalContainer] at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:607) [INFO] [talledLocalContainer] at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:316) [INFO] [talledLocalContainer] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [INFO] [talledLocalContainer] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [INFO] [talledLocalContainer] at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [INFO] [talledLocalContainer] at java.lang.Thread.run(Thread.java:745) {noformat}

    Atlassian JIRA | 2 years ago | Sunny Kalsi
    java.lang.IllegalStateException
  3. Speed up your debug routine!

    Automated exception search integrated into your IDE

  4. 0

    Causes for IllegalStateException

    Stack Overflow | 4 years ago | Gokul Nath
    java.lang.IllegalStateException

    1 unregistered visitors
    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.IllegalStateException

      No message provided

      at com.sun.jersey.server.impl.ThreadLocalHttpContext.getRequest()
    2. Jersey
      WebApplicationImpl$2.invoke
      1. com.sun.jersey.server.impl.ThreadLocalHttpContext.getRequest(ThreadLocalHttpContext.java:82)
      2. com.sun.jersey.server.impl.application.WebApplicationImpl$2.invoke(WebApplicationImpl.java:286)
      2 frames
    3. com.sun.proxy
      $Proxy49.selectVariant
      1. com.sun.proxy.$Proxy49.selectVariant(Unknown Source)
      1 frame
    4. com.atlassian.plugins
      ThrowableExceptionMapper.toResponse
      1. com.atlassian.plugins.rest.common.error.jersey.UncaughtExceptionEntity.variantFor(UncaughtExceptionEntity.java:85)
      2. com.atlassian.plugins.rest.common.error.jersey.ThrowableExceptionMapper.toResponse(ThrowableExceptionMapper.java:49)
      2 frames
    5. Jersey
      WebApplicationImpl.handleRequest
      1. com.sun.jersey.spi.container.ContainerResponse.mapException(ContainerResponse.java:463)
      2. com.sun.jersey.spi.container.ContainerResponse.mapMappableContainerException(ContainerResponse.java:400)
      3. com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1446)
      4. com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1391)
      5. com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1381)
      5 frames
    6. Jersey
      ServletContainer.service
      1. com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:416)
      2. com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:538)
      3. com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:716)
      3 frames
    7. JavaServlet
      HttpServlet.service
      1. javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
      1 frame
    8. Glassfish Core
      ApplicationFilterChain.doFilter
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
      2 frames
    9. com.atlassian.crowd
      RestServiceVersionFilter.doFilter
      1. com.atlassian.crowd.plugin.rest.filter.RestServiceVersionFilter.doFilter(RestServiceVersionFilter.java:86)
      1 frame
    10. Spring
      DelegatingFilterProxy.doFilter
      1. org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:343)
      2. org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:260)
      2 frames
    11. Glassfish Core
      ApplicationFilterChain.doFilter
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
      2 frames
    12. com.atlassian.crowd
      BasicApplicationAuthenticationFilter.doFilter
      1. com.atlassian.crowd.plugin.rest.filter.BasicApplicationAuthenticationFilter.doFilter(BasicApplicationAuthenticationFilter.java:97)
      1 frame
    13. Spring
      DelegatingFilterProxy.doFilter
      1. org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:343)
      2. org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:260)
      2 frames
    14. Glassfish Core
      ApplicationFilterChain.doFilter
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
      2 frames
    15. com.atlassian.crowd
      SysadminPasswordExpiryServletFilter.doFilter
      1. com.atlassian.crowd.horde.filters.SysadminPasswordExpiryServletFilter.doFilter(SysadminPasswordExpiryServletFilter.java:51)
      1 frame
    16. Spring
      DelegatingFilterProxy.doFilter
      1. org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:343)
      2. org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:260)
      2 frames
    17. Glassfish Core
      ApplicationFilterChain.doFilter
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
      2 frames
    18. com.atlassian.crowd
      HttpRequestAnalyticsFilter.doFilter
      1. com.atlassian.crowd.horde.analytics.HttpRequestAnalyticsFilter.doFilter(HttpRequestAnalyticsFilter.java:51)
      1 frame
    19. Spring
      DelegatingFilterProxy.doFilter
      1. org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:343)
      2. org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:260)
      2 frames
    20. Glassfish Core
      ApplicationFilterChain.doFilter
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
      2 frames
    21. Tomcat WS
      WsFilter.doFilter
      1. org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
      1 frame
    22. Glassfish Core
      ApplicationFilterChain.doFilter
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
      2 frames
    23. Spring ORM
      OpenSessionInViewFilter.doFilterInternal
      1. org.springframework.orm.hibernate4.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:151)
      1 frame
    24. Spring
      OncePerRequestFilter.doFilter
      1. org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:106)
      1 frame
    25. Glassfish Core
      ApplicationFilterChain.doFilter
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
      2 frames
    26. com.atlassian.crowd
      BlockOpenSocialRequestFilter.doFilter
      1. com.atlassian.crowd.security.BlockOpenSocialRequestFilter.doFilter(BlockOpenSocialRequestFilter.java:45)
      1 frame
    27. Glassfish Core
      ApplicationFilterChain.doFilter
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
      2 frames
    28. com.atlassian.crowd
      TenantServletFilter.doFilter
      1. com.atlassian.crowd.horde.tenant.TenantServletFilter.doFilter(TenantServletFilter.java:74)
      1 frame
    29. Spring
      DelegatingFilterProxy.doFilter
      1. org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:343)
      2. org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:260)
      2 frames
    30. Glassfish Core
      ApplicationFilterChain.doFilter
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
      2 frames
    31. com.atlassian.crowd
      HttpContextFilter.doFilter
      1. com.atlassian.crowd.plugin.web.filter.HttpContextFilter.doFilter(HttpContextFilter.java:34)
      1 frame
    32. Glassfish Core
      CoyoteAdapter.service
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
      3. org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
      4. org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
      5. org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501)
      6. org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
      7. org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
      8. org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
      9. org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
      10. org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
      10 frames
    33. Grizzly HTTP
      JIoEndpoint$SocketProcessor.run
      1. org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1040)
      2. org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:607)
      3. org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:316)
      3 frames
    34. Java RT
      ThreadPoolExecutor$Worker.run
      1. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      2. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      2 frames
    35. Tomcat Util
      TaskThread$WrappingRunnable.run
      1. org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
      1 frame
    36. Java RT
      Thread.run
      1. java.lang.Thread.run(Thread.java:745)
      1 frame