java.lang.IllegalStateException: No value for key [org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean@29d8019f] bound to thread [http-nio-8080-exec-5]

GitHub | winkumar | 4 months ago
  1. 0

    Try to integrate with spring boot admin, Can't set AsyncWebRequest with concurrent handling in progress Exception happen

    GitHub | 4 months ago | winkumar
    java.lang.IllegalStateException: No value for key [org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean@29d8019f] bound to thread [http-nio-8080-exec-5]
  2. 0

    It's not possible making Callable method in Spring Controller under Undertow

    GitHub | 2 years ago | tryIO
    java.lang.IllegalStateException: No value for key [org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean@166e2c19] bound to thread [XNIO-1 task-2]
  3. 0

    Spring JPA-Rest get call throwing exception

    Stack Overflow | 1 month ago | Biju
    java.lang.IllegalStateException: No value for key [org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean@2418acfc] bound to thread [XNIO-2 task-2]
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Spring @transactional with unit tests giving failure

    Stack Overflow | 10 months ago | S V
    java.lang.IllegalStateException: No value for key [org.hibernate.internal.SessionFactoryImpl@4a7761b1] bound to thread [main]
  6. 0

    A test super class has {{@TransactionConfiguration(transactionManager = "foo", defaultRollback = true)}} which is now deprecated. If I understand the deprecation note correctly I'm supposed to replace this with: {code:java} @Rollback @Transactional(transactionManager = "foo") {code} However, if I do that numerous tests will fail reporting: {noformat} java.lang.IllegalStateException: No value for key [org.apache.commons.dbcp2.BasicDataSource@cfdd1c4] bound to thread [main] at org.springframework.transaction.support.TransactionSynchronizationManager.unbindResource(TransactionSynchronizationManager.java:210) at org.springframework.orm.jpa.JpaTransactionManager.doCleanupAfterCompletion(JpaTransactionManager.java:583) at org.springframework.transaction.support.AbstractPlatformTransactionManager.cleanupAfterCompletion(AbstractPlatformTransactionManager.java:1016) at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:811) at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:730) at org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(TransactionAspectSupport.java:485) at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:291) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:653) at MyClass$$EnhancerBySpringCGLIB$$23d03b7b.getDirectOrderPage(<generated>) at MyTest.testProcessSwitch(MyTest.java:103) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:483) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26) at org.springframework.test.context.junit4.statements.RunBeforeTestMethodCallbacks.evaluate(RunBeforeTestMethodCallbacks.java:74) at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27) at org.springframework.test.context.junit4.statements.RunAfterTestMethodCallbacks.evaluate(RunAfterTestMethodCallbacks.java:85) at org.springframework.test.context.junit4.statements.SpringRepeat.evaluate(SpringRepeat.java:86) at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:241) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:87) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268) at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61) at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:70) at org.junit.runners.ParentRunner.run(ParentRunner.java:363) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:180) at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:86) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:675) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192) java.lang.IllegalStateException: Cannot deactivate transaction synchronization - not active at org.springframework.transaction.support.TransactionSynchronizationManager.clearSynchronization(TransactionSynchronizationManager.java:329) at org.springframework.transaction.support.TransactionSynchronizationManager.clear(TransactionSynchronizationManager.java:464) at org.springframework.transaction.support.AbstractPlatformTransactionManager.cleanupAfterCompletion(AbstractPlatformTransactionManager.java:1013) at org.springframework.transaction.support.AbstractPlatformTransactionManager.processRollback(AbstractPlatformTransactionManager.java:883) at org.springframework.transaction.support.AbstractPlatformTransactionManager.rollback(AbstractPlatformTransactionManager.java:830) at org.springframework.test.context.transaction.TransactionContext.endTransaction(TransactionContext.java:125) at org.springframework.test.context.transaction.TransactionalTestExecutionListener.afterTestMethod(TransactionalTestExecutionListener.java:218) at org.springframework.test.context.TestContextManager.afterTestMethod(TestContextManager.java:313) at org.springframework.test.context.junit4.statements.RunAfterTestMethodCallbacks.evaluate(RunAfterTestMethodCallbacks.java:93) at org.springframework.test.context.junit4.statements.SpringRepeat.evaluate(SpringRepeat.java:86) at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:241) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:87) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268) at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61) at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:70) at org.junit.runners.ParentRunner.run(ParentRunner.java:363) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:180) at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:86) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:675) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192) {noformat} The test super class is defined as {code:java} @Rollback @Transactional(transactionManager = "foo") @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(locations = {"classpath:data-test.xml" }) @DirtiesContext(classMode = ClassMode.AFTER_CLASS) public abstract class DatabaseDrivenTest { {code} Those tests that fail do so regardless of whether I run all tests across a module/project/package or whether I run just a single test. Going back to {{@TransactionConfiguration(transactionManager = "foo", defaultRollback = true)}} fixes that.

    Spring JIRA | 1 year ago | Marcel Stör
    java.lang.IllegalStateException: No value for key [org.apache.commons.dbcp2.BasicDataSource@cfdd1c4] bound to thread [main]

    8 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 value for key [org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean@29d8019f] bound to thread [http-nio-8080-exec-5]

      at org.springframework.transaction.support.TransactionSynchronizationManager.unbindResource()
    2. Spring Tx
      TransactionSynchronizationManager.unbindResource
      1. org.springframework.transaction.support.TransactionSynchronizationManager.unbindResource(TransactionSynchronizationManager.java:210)
      1 frame
    3. Spring ORM
      OpenEntityManagerInViewInterceptor.afterConcurrentHandlingStarted
      1. org.springframework.orm.jpa.support.OpenEntityManagerInViewInterceptor.afterConcurrentHandlingStarted(OpenEntityManagerInViewInterceptor.java:134)
      1 frame
    4. Spring MVC
      FrameworkServlet.doGet
      1. org.springframework.web.servlet.handler.WebRequestHandlerInterceptorAdapter.afterConcurrentHandlingStarted(WebRequestHandlerInterceptorAdapter.java:80)
      2. org.springframework.web.servlet.HandlerExecutionChain.applyAfterConcurrentHandlingStarted(HandlerExecutionChain.java:189)
      3. org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:985)
      4. org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:895)
      5. org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:967)
      6. org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:858)
      6 frames
    5. JavaServlet
      HttpServlet.service
      1. javax.servlet.http.HttpServlet.service(HttpServlet.java:687)
      1 frame
    6. Spring MVC
      FrameworkServlet.service
      1. org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:843)
      1 frame
    7. JavaServlet
      HttpServlet.service
      1. javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
      1 frame
    8. Glassfish Core
      ApplicationFilterChain.doFilter
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:292)
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
      2 frames
    9. Spring
      OncePerRequestFilter.doFilter
      1. org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:101)
      1 frame
    10. Glassfish Core
      ApplicationFilterChain.doFilter
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
      2 frames
    11. Spring
      OncePerRequestFilter.doFilter
      1. org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:101)
      1 frame
    12. Glassfish Core
      ApplicationFilterChain.doFilter
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
      2 frames
    13. Spring Security
      FilterChainProxy.doFilter
      1. org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:207)
      2. org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:176)
      2 frames
    14. Spring
      DelegatingFilterProxy.doFilter
      1. org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
      2. org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:262)
      2 frames
    15. Glassfish Core
      ApplicationFilterChain.doFilter
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
      2 frames
    16. Spring
      OncePerRequestFilter.doFilter
      1. org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:99)
      2. org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
      2 frames
    17. Glassfish Core
      ApplicationFilterChain.doFilter
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
      2 frames
    18. Spring
      OncePerRequestFilter.doFilter
      1. org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:101)
      1 frame
    19. Glassfish Core
      ApplicationFilterChain.doFilter
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
      2 frames
    20. Spring
      OncePerRequestFilter.doFilter
      1. org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:101)
      1 frame
    21. Glassfish Core
      ApplicationFilterChain.doFilter
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
      2 frames
    22. Spring
      OncePerRequestFilter.doFilter
      1. org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:101)
      1 frame
    23. Glassfish Core
      ApplicationFilterChain.doFilter
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
      2 frames
    24. Spring
      OncePerRequestFilter.doFilter
      1. org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:101)
      1 frame
    25. Glassfish Core
      CoyoteAdapter.asyncDispatch
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
      3. org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:720)
      4. org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:584)
      5. org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:523)
      6. org.apache.catalina.core.StandardHostValve.custom(StandardHostValve.java:436)
      7. org.apache.catalina.core.StandardHostValve.status(StandardHostValve.java:301)
      8. org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:178)
      9. org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
      10. org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
      11. org.apache.catalina.connector.CoyoteAdapter.asyncDispatch(CoyoteAdapter.java:388)
      11 frames
    26. Grizzly HTTP
      NioEndpoint$SocketProcessor.run
      1. org.apache.coyote.http11.AbstractHttp11Processor.asyncDispatch(AbstractHttp11Processor.java:1717)
      2. org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:652)
      3. org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1520)
      4. org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1476)
      4 frames
    27. 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
    28. Tomcat Util
      TaskThread$WrappingRunnable.run
      1. org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
      1 frame
    29. Java RT
      Thread.run
      1. java.lang.Thread.run(Thread.java:745)
      1 frame