java.lang.IllegalStateException: No value for key [org.apache.ibatis.session.defaults.DefaultSqlSessionFactory@1b681e13] bound to thread [pool-1-thread-3]

activiti.org | 4 months ago
  1. 0

    ExeceuteJobsRunnable- Excecption caused by StackOverflowError | Activiti Forums

    activiti.org | 4 months ago
    java.lang.IllegalStateException: No value for key [org.apache.ibatis.session.defaults.DefaultSqlSessionFactory@1b681e13] bound to thread [pool-1-thread-3]
  2. 0

    Blog by Savic Prvoslav: Send HTML email from alfresco 3.3 with attachment tutorial and code

    blogspot.com | 11 months ago
    java.lang.IllegalStateException: No value for key [org.apache.ibatis.session.defaults.DefaultSqlSessionFactory@2500091c] bound to thread [pool-5-thread-2]
  3. 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]
  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.apache.ibatis.session.defaults.DefaultSqlSessionFactory@1b681e13] bound to thread [pool-1-thread-3]

      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. MyBatis-Spring
      SqlSessionUtils$SqlSessionSynchronization.suspend
      1. org.mybatis.spring.SqlSessionUtils$SqlSessionSynchronization.suspend(SqlSessionUtils.java:226)
      1 frame
    4. Spring Tx
      TransactionTemplate.execute
      1. org.springframework.transaction.support.AbstractPlatformTransactionManager.doSuspendSynchronization(AbstractPlatformTransactionManager.java:668)
      2. org.springframework.transaction.support.AbstractPlatformTransactionManager.suspend(AbstractPlatformTransactionManager.java:571)
      3. org.springframework.transaction.support.AbstractPlatformTransactionManager.handleExistingTransaction(AbstractPlatformTransactionManager.java:420)
      4. org.springframework.transaction.support.AbstractPlatformTransactionManager.getTransaction(AbstractPlatformTransactionManager.java:349)
      5. org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:130)
      5 frames
    5. Activiti - Spring
      SpringTransactionInterceptor.execute
      1. org.activiti.spring.SpringTransactionInterceptor.execute(SpringTransactionInterceptor.java:45)
      1 frame
    6. Activiti - Engine
      FailedJobListener.execute
      1. org.activiti.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:31)
      2. org.activiti.engine.impl.cfg.CommandExecutorImpl.execute(CommandExecutorImpl.java:40)
      3. org.activiti.engine.impl.jobexecutor.FailedJobListener.execute(FailedJobListener.java:47)
      3 frames
    7. Activiti - Spring
      SpringTransactionContext$4.afterCompletion
      1. org.activiti.spring.SpringTransactionContext$4.afterCompletion(SpringTransactionContext.java:97)
      1 frame
    8. Spring Tx
      TransactionTemplate.execute
      1. org.springframework.transaction.support.TransactionSynchronizationUtils.invokeAfterCompletion(TransactionSynchronizationUtils.java:168)
      2. org.springframework.transaction.support.AbstractPlatformTransactionManager.invokeAfterCompletion(AbstractPlatformTransactionManager.java:997)
      3. org.springframework.transaction.support.AbstractPlatformTransactionManager.triggerAfterCompletion(AbstractPlatformTransactionManager.java:972)
      4. org.springframework.transaction.support.AbstractPlatformTransactionManager.processRollback(AbstractPlatformTransactionManager.java:876)
      5. org.springframework.transaction.support.AbstractPlatformTransactionManager.rollback(AbstractPlatformTransactionManager.java:826)
      6. org.springframework.transaction.support.TransactionTemplate.rollbackOnException(TransactionTemplate.java:164)
      7. org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:137)
      7 frames
    9. Activiti - Spring
      SpringTransactionInterceptor.execute
      1. org.activiti.spring.SpringTransactionInterceptor.execute(SpringTransactionInterceptor.java:45)
      1 frame
    10. Activiti - Engine
      ExecuteJobsRunnable.run
      1. org.activiti.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:31)
      2. org.activiti.engine.impl.cfg.CommandExecutorImpl.execute(CommandExecutorImpl.java:40)
      3. org.activiti.engine.impl.cfg.CommandExecutorImpl.execute(CommandExecutorImpl.java:35)
      4. org.activiti.engine.impl.jobexecutor.ExecuteJobsRunnable.handleMultipleJobs(ExecuteJobsRunnable.java:94)
      5. org.activiti.engine.impl.jobexecutor.ExecuteJobsRunnable.run(ExecuteJobsRunnable.java:49)
      5 frames
    11. Java RT
      Thread.run
      1. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
      2. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      3. java.lang.Thread.run(Thread.java:745)
      3 frames