java.lang.RuntimeException

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

  • In a controller I return a DeferredResult in order to set up an async request. From an another thread I set the result of DeferredResult, and thus return the result back to the user. The problem lies in that I also use a OpenSessionInViewFilter for Hibernate session management. This filter gives an error now and then indicating that a session is not bound to the current thread. Stack trace is as follows: {code} 29.aug.2013 11:15:57 [http-bio-8080-exec-1] ERROR org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/].[appServlet] - Servlet.service() for servlet appServlet threw exception java.lang.IllegalStateException: No value for key [org.hibernate.internal.SessionFactoryImpl@28af7fd7] bound to thread [http-bio-8080-exec-1] at org.springframework.transaction.support.TransactionSynchronizationManager.unbindResource(TransactionSynchronizationManager.java:209) at org.springframework.orm.hibernate4.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:157) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) 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.ApplicationDispatcher.invoke(ApplicationDispatcher.java:749) at org.apache.catalina.core.ApplicationDispatcher.doDispatch(ApplicationDispatcher.java:660) at org.apache.catalina.core.ApplicationDispatcher.dispatch(ApplicationDispatcher.java:626) at org.apache.catalina.core.AsyncContextImpl$1.run(AsyncContextImpl.java:225) at org.apache.catalina.core.AsyncContextImpl.doInternalDispatch(AsyncContextImpl.java:367) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:217) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118) at org.apache.catalina.connector.CoyoteAdapter.asyncDispatch(CoyoteAdapter.java:299) at org.apache.coyote.http11.AbstractHttp11Processor.asyncDispatch(AbstractHttp11Processor.java:1587) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:583) at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) at java.lang.Thread.run(Thread.java:722) 29.aug.2013 11:15:57 [http-bio-8080-exec-1] ERROR org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/].[appServlet] - Servlet.service() for servlet [appServlet] in context with path [] threw exception [java.lang.RuntimeException: java.lang.IllegalStateException: No value for key [org.hibernate.internal.SessionFactoryImpl@28af7fd7] bound to thread [http-bio-8080-exec-1]] with root cause java.lang.IllegalStateException: No value for key [org.hibernate.internal.SessionFactoryImpl@28af7fd7] bound to thread [http-bio-8080-exec-1] at org.springframework.transaction.support.TransactionSynchronizationManager.unbindResource(TransactionSynchronizationManager.java:209) at org.springframework.orm.hibernate4.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:157) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) 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.ApplicationDispatcher.invoke(ApplicationDispatcher.java:749) at org.apache.catalina.core.ApplicationDispatcher.doDispatch(ApplicationDispatcher.java:660) at org.apache.catalina.core.ApplicationDispatcher.dispatch(ApplicationDispatcher.java:626) at org.apache.catalina.core.AsyncContextImpl$1.run(AsyncContextImpl.java:225) at org.apache.catalina.core.AsyncContextImpl.doInternalDispatch(AsyncContextImpl.java:367) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:217) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118) at org.apache.catalina.connector.CoyoteAdapter.asyncDispatch(CoyoteAdapter.java:299) at org.apache.coyote.http11.AbstractHttp11Processor.asyncDispatch(AbstractHttp11Processor.java:1587) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:583) at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) at java.lang.Thread.run(Thread.java:722) {code}
    via by Stig Runar Vangen,
  • In a controller I return a DeferredResult in order to set up an async request. From an another thread I set the result of DeferredResult, and thus return the result back to the user. The problem lies in that I also use a OpenSessionInViewFilter for Hibernate session management. This filter gives an error now and then indicating that a session is not bound to the current thread. Stack trace is as follows: {code} 29.aug.2013 11:15:57 [http-bio-8080-exec-1] ERROR org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/].[appServlet] - Servlet.service() for servlet appServlet threw exception java.lang.IllegalStateException: No value for key [org.hibernate.internal.SessionFactoryImpl@28af7fd7] bound to thread [http-bio-8080-exec-1] at org.springframework.transaction.support.TransactionSynchronizationManager.unbindResource(TransactionSynchronizationManager.java:209) at org.springframework.orm.hibernate4.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:157) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) 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.ApplicationDispatcher.invoke(ApplicationDispatcher.java:749) at org.apache.catalina.core.ApplicationDispatcher.doDispatch(ApplicationDispatcher.java:660) at org.apache.catalina.core.ApplicationDispatcher.dispatch(ApplicationDispatcher.java:626) at org.apache.catalina.core.AsyncContextImpl$1.run(AsyncContextImpl.java:225) at org.apache.catalina.core.AsyncContextImpl.doInternalDispatch(AsyncContextImpl.java:367) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:217) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118) at org.apache.catalina.connector.CoyoteAdapter.asyncDispatch(CoyoteAdapter.java:299) at org.apache.coyote.http11.AbstractHttp11Processor.asyncDispatch(AbstractHttp11Processor.java:1587) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:583) at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) at java.lang.Thread.run(Thread.java:722) 29.aug.2013 11:15:57 [http-bio-8080-exec-1] ERROR org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/].[appServlet] - Servlet.service() for servlet [appServlet] in context with path [] threw exception [java.lang.RuntimeException: java.lang.IllegalStateException: No value for key [org.hibernate.internal.SessionFactoryImpl@28af7fd7] bound to thread [http-bio-8080-exec-1]] with root cause java.lang.IllegalStateException: No value for key [org.hibernate.internal.SessionFactoryImpl@28af7fd7] bound to thread [http-bio-8080-exec-1] at org.springframework.transaction.support.TransactionSynchronizationManager.unbindResource(TransactionSynchronizationManager.java:209) at org.springframework.orm.hibernate4.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:157) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) 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.ApplicationDispatcher.invoke(ApplicationDispatcher.java:749) at org.apache.catalina.core.ApplicationDispatcher.doDispatch(ApplicationDispatcher.java:660) at org.apache.catalina.core.ApplicationDispatcher.dispatch(ApplicationDispatcher.java:626) at org.apache.catalina.core.AsyncContextImpl$1.run(AsyncContextImpl.java:225) at org.apache.catalina.core.AsyncContextImpl.doInternalDispatch(AsyncContextImpl.java:367) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:217) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118) at org.apache.catalina.connector.CoyoteAdapter.asyncDispatch(CoyoteAdapter.java:299) at org.apache.coyote.http11.AbstractHttp11Processor.asyncDispatch(AbstractHttp11Processor.java:1587) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:583) at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) at java.lang.Thread.run(Thread.java:722) {code}
    via by Stig Runar Vangen,
    • java.lang.RuntimeException: java.lang.IllegalStateException: No value for key [org.hibernate.internal.SessionFactoryImpl@28af7fd7] bound to thread [http-bio-8080-exec-1]] with root cause java.lang.IllegalStateException: No value for key [org.hibernate.internal.SessionFactoryImpl@28af7fd7] bound to thread [http-bio-8080-exec-1] at org.springframework.transaction.support.TransactionSynchronizationManager.unbindResource(TransactionSynchronizationManager.java:209) at org.springframework.orm.hibernate4.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:157) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) 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.ApplicationDispatcher.invoke(ApplicationDispatcher.java:749) at org.apache.catalina.core.ApplicationDispatcher.doDispatch(ApplicationDispatcher.java:660) at org.apache.catalina.core.ApplicationDispatcher.dispatch(ApplicationDispatcher.java:626) at org.apache.catalina.core.AsyncContextImpl$1.run(AsyncContextImpl.java:225) at org.apache.catalina.core.AsyncContextImpl.doInternalDispatch(AsyncContextImpl.java:367) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:217) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118) at org.apache.catalina.connector.CoyoteAdapter.asyncDispatch(CoyoteAdapter.java:299) at org.apache.coyote.http11.AbstractHttp11Processor.asyncDispatch(AbstractHttp11Processor.java:1587) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:583) at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) at java.lang.Thread.run(Thread.java:722)
    No Bugmate found.