java.lang.IllegalStateException: Already value [org.springframework.jdbc.datasource.ConnectionHolder@90ebfe] for key [org.springframework.jdbc.datasource.DriverManagerDataSource@13043d2] bound to thread [main]

Spring JIRA | Dave Syer | 8 years ago
  1. 0

    SingleColumnJdbcKeyGeneratorIntegrationTests fails in Eclipse. Looks like an ordering issue - some other test isn't cleaning up a thread local? java.lang.IllegalStateException: Already value [org.springframework.jdbc.datasource.ConnectionHolder@90ebfe] for key [org.springframework.jdbc.datasource.DriverManagerDataSource@13043d2] bound to thread [main] at org.springframework.transaction.support.TransactionSynchronizationManager.bindResource(TransactionSynchronizationManager.java:182) at org.springframework.jdbc.datasource.DataSourceTransactionManager.doBegin(DataSourceTransactionManager.java:232) at org.springframework.transaction.support.AbstractPlatformTransactionManager.getTransaction(AbstractPlatformTransactionManager.java:377) at org.springframework.test.context.transaction.TransactionalTestExecutionListener$TransactionContext.startTransaction(TransactionalTestExecutionListener.java:496) at org.springframework.test.context.transaction.TransactionalTestExecutionListener.startNewTransaction(TransactionalTestExecutionListener.java:256) at org.springframework.test.context.transaction.TransactionalTestExecutionListener.beforeTestMethod(TransactionalTestExecutionListener.java:149) at org.springframework.test.context.TestContextManager.beforeTestMethod(TestContextManager.java:292) ...

    Spring JIRA | 8 years ago | Dave Syer
    java.lang.IllegalStateException: Already value [org.springframework.jdbc.datasource.ConnectionHolder@90ebfe] for key [org.springframework.jdbc.datasource.DriverManagerDataSource@13043d2] bound to thread [main]
  2. 0

    SingleColumnJdbcKeyGeneratorIntegrationTests fails in Eclipse. Looks like an ordering issue - some other test isn't cleaning up a thread local? java.lang.IllegalStateException: Already value [org.springframework.jdbc.datasource.ConnectionHolder@90ebfe] for key [org.springframework.jdbc.datasource.DriverManagerDataSource@13043d2] bound to thread [main] at org.springframework.transaction.support.TransactionSynchronizationManager.bindResource(TransactionSynchronizationManager.java:182) at org.springframework.jdbc.datasource.DataSourceTransactionManager.doBegin(DataSourceTransactionManager.java:232) at org.springframework.transaction.support.AbstractPlatformTransactionManager.getTransaction(AbstractPlatformTransactionManager.java:377) at org.springframework.test.context.transaction.TransactionalTestExecutionListener$TransactionContext.startTransaction(TransactionalTestExecutionListener.java:496) at org.springframework.test.context.transaction.TransactionalTestExecutionListener.startNewTransaction(TransactionalTestExecutionListener.java:256) at org.springframework.test.context.transaction.TransactionalTestExecutionListener.beforeTestMethod(TransactionalTestExecutionListener.java:149) at org.springframework.test.context.TestContextManager.beforeTestMethod(TestContextManager.java:292) ...

    Spring JIRA | 8 years ago | Dave Syer
    java.lang.IllegalStateException: Already value [org.springframework.jdbc.datasource.ConnectionHolder@90ebfe] for key [org.springframework.jdbc.datasource.DriverManagerDataSource@13043d2] bound to thread [main]
  3. 0

    nested transactionTemplate

    Stack Overflow | 4 years ago | Jin Kim
    java.lang.IllegalStateException: Already value [org.springframework.jdbc.datasource.ConnectionHolder@e4b2ed] for key [org.apache.tomcat.dbcp.dbcp.BasicDataSource@26cc37d2] bound to thread [http-bio-8084-exec-13]
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    TxSyncMgr::bindResource(..) called twice ...

    springframework | 1 decade ago | don_raka
    java.lang.IllegalStateException: Already a value for key \[org.apache.commons.dbcp.BasicDataSource@17e845a\] bound to thread
  6. 0

    Declarative Transaction:IllegalStateException

    springframework | 1 decade ago | don_raka
    java.lang.IllegalStateException: Already a value for key \[org.apache.commons.dbcp.BasicDataSource@e3849c\] bound to thread

    4 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

      Already value [org.springframework.jdbc.datasource.ConnectionHolder@90ebfe] for key [org.springframework.jdbc.datasource.DriverManagerDataSource@13043d2] bound to thread [main]

      at org.springframework.transaction.support.TransactionSynchronizationManager.bindResource()
    2. Spring Tx
      TransactionSynchronizationManager.bindResource
      1. org.springframework.transaction.support.TransactionSynchronizationManager.bindResource(TransactionSynchronizationManager.java:182)
      1 frame
    3. Spring Framework
      DataSourceTransactionManager.doBegin
      1. org.springframework.jdbc.datasource.DataSourceTransactionManager.doBegin(DataSourceTransactionManager.java:232)
      1 frame
    4. Spring Tx
      AbstractPlatformTransactionManager.getTransaction
      1. org.springframework.transaction.support.AbstractPlatformTransactionManager.getTransaction(AbstractPlatformTransactionManager.java:377)
      1 frame
    5. Spring TestContext
      TestContextManager.beforeTestMethod
      1. org.springframework.test.context.transaction.TransactionalTestExecutionListener$TransactionContext.startTransaction(TransactionalTestExecutionListener.java:496)
      2. org.springframework.test.context.transaction.TransactionalTestExecutionListener.startNewTransaction(TransactionalTestExecutionListener.java:256)
      3. org.springframework.test.context.transaction.TransactionalTestExecutionListener.beforeTestMethod(TransactionalTestExecutionListener.java:149)
      4. org.springframework.test.context.TestContextManager.beforeTestMethod(TestContextManager.java:292)
      4 frames