java.lang.IllegalStateException: No value for key [org.apache.commons.dbcp.BasicDataSource@630bd3f1] bound to thread [jobLauncherTaskExecutor-1]

Spring JIRA | Svein Erik Løvland | 5 years ago
  1. 0

    Using JpaTransactionManager, with Hibernate 3.5.1-Final as provider. Using <jee:jndi-lookup id=dataSource" jndi-name="${jndi.datasource}"/> commons-dbcp version=1.4 /META-INF/spring/batch/override/bootstrap/manager/execution-context.xml {code} <bean id=jobRepository" class="org.springframework.batch.core.repository.support.JobRepositoryFactoryBean"> <property name="dataSource" ref="dataSource" /> <property name="transactionManager" ref="transactionManager" /> <property name="isolationLevelForCreate" value="ISOLATION_DEFAULT" /> </bean> {code} Might be related to SPR-4041 ? {code} java.lang.IllegalStateException: No value for key [org.apache.commons.dbcp.BasicDataSource@630bd3f1] bound to thread [jobLauncherTaskExecutor-1] at org.springframework.transaction.support.TransactionSynchronizationManager.unbindResource(TransbcpactionSynchronizationManager.java:199) ~[spring-tx-3.0.6.RELEASE.jar:3.0.6.RELEASE] at org.springframework.orm.jpa.JpaTransactionManager.doCleanupAfterCompletion(JpaTransactionManager.java:531) ~[spring-orm-3.0.6.RELEASE.jar:3.0.6.RELEASE] at org.springframework.transaction.support.AbstractPlatformTransactionManager.cleanupAfterCompletion(AbstractPlatformTransactionManager.java:1011) ~[spring-tx-3.0.6.RELEASE.jar:3.0.6.RELEASE] at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:804) ~[spring-tx-3.0.6.RELEASE.jar:3.0.6.RELEASE] at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:723) ~[spring-tx-3.0.6.RELEASE.jar:3.0.6.RELEASE] at org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(TransactionAspectSupport.java:393) ~[spring-tx-3.0.6.RELEASE.jar:3.0.6.RELEASE] at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:120) ~[spring-tx-3.0.6.RELEASE.jar:3.0.6.RELEASE] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) ~[spring-aop-3.0.6.RELEASE.jar:3.0.6.RELEASE] at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202) ~[spring-aop-3.0.6.RELEASE.jar:3.0.6.RELEASE] at $Proxy29.updateExecutionContext(Unknown Source) ~[na:na] at org.springframework.batch.core.step.tasklet.TaskletStep$ChunkTransactionCallback.doInTransaction(TaskletStep.java:429) ~[spring-batch-core-2.1.8.RELEASE.jar:na] at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:130) [spring-tx-3.0.6.RELEASE.jar:3.0.6.RELEASE] at org.springframework.batch.core.step.tasklet.TaskletStep$2.doInChunkContext(TaskletStep.java:264) [spring-batch-core-2.1.8.RELEASE.jar:na] at org.springframework.batch.core.scope.context.StepContextRepeatCallback.doInIteration(StepContextRepeatCallback.java:76) [spring-batch-core-2.1.8.RELEASE.jar:na] at org.springframework.batch.repeat.support.RepeatTemplate.getNextResult(RepeatTemplate.java:367) [spring-batch-infrastructure-2.1.8.RELEASE.jar:na] at org.springframework.batch.repeat.support.RepeatTemplate.executeInternal(RepeatTemplate.java:214) [spring-batch-infrastructure-2.1.8.RELEASE.jar:na] at org.springframework.batch.repeat.support.RepeatTemplate.iterate(RepeatTemplate.java:143) [spring-batch-infrastructure-2.1.8.RELEASE.jar:na] at org.springframework.batch.core.step.tasklet.TaskletStep.doExecute(TaskletStep.java:250) [spring-batch-core-2.1.8.RELEASE.jar:na] at org.springframework.batch.core.step.AbstractStep.execute(AbstractStep.java:195) [spring-batch-core-2.1.8.RELEASE.jar:na] at org.springframework.batch.core.job.SimpleStepHandler.handleStep(SimpleStepHandler.java:135) [spring-batch-core-2.1.8.RELEASE.jar:na] at org.springframework.batch.core.job.flow.JobFlowExecutor.executeStep(JobFlowExecutor.java:61) [spring-batch-core-2.1.8.RELEASE.jar:na] at org.springframework.batch.core.job.flow.support.state.StepState.handle(StepState.java:60) [spring-batch-core-2.1.8.RELEASE.jar:na] at org.springframework.batch.core.job.flow.support.SimpleFlow.resume(SimpleFlow.java:144) [spring-batch-core-2.1.8.RELEASE.jar:na] at org.springframework.batch.core.job.flow.support.SimpleFlow.start(SimpleFlow.java:124) [spring-batch-core-2.1.8.RELEASE.jar:na] at org.springframework.batch.core.job.flow.FlowJob.doExecute(FlowJob.java:135) [spring-batch-core-2.1.8.RELEASE.jar:na] at org.springframework.batch.core.job.AbstractJob.execute(AbstractJob.java:281) [spring-batch-core-2.1.8.RELEASE.jar:na] at org.springframework.batch.core.launch.support.SimpleJobLauncher$1.run(SimpleJobLauncher.java:120) [spring-batch-core-2.1.8.RELEASE.jar:na] at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [na:1.6.0_24] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [na:1.6.0_24] at java.lang.Thread.run(Thread.java:662) [na:1.6.0_24] {code}

    Spring JIRA | 5 years ago | Svein Erik Løvland
    java.lang.IllegalStateException: No value for key [org.apache.commons.dbcp.BasicDataSource@630bd3f1] bound to thread [jobLauncherTaskExecutor-1]
  2. 0

    Using JpaTransactionManager, with Hibernate 3.5.1-Final as provider. Using <jee:jndi-lookup id=dataSource" jndi-name="${jndi.datasource}"/> commons-dbcp version=1.4 /META-INF/spring/batch/override/bootstrap/manager/execution-context.xml {code} <bean id=jobRepository" class="org.springframework.batch.core.repository.support.JobRepositoryFactoryBean"> <property name="dataSource" ref="dataSource" /> <property name="transactionManager" ref="transactionManager" /> <property name="isolationLevelForCreate" value="ISOLATION_DEFAULT" /> </bean> {code} Might be related to SPR-4041 ? {code} java.lang.IllegalStateException: No value for key [org.apache.commons.dbcp.BasicDataSource@630bd3f1] bound to thread [jobLauncherTaskExecutor-1] at org.springframework.transaction.support.TransactionSynchronizationManager.unbindResource(TransbcpactionSynchronizationManager.java:199) ~[spring-tx-3.0.6.RELEASE.jar:3.0.6.RELEASE] at org.springframework.orm.jpa.JpaTransactionManager.doCleanupAfterCompletion(JpaTransactionManager.java:531) ~[spring-orm-3.0.6.RELEASE.jar:3.0.6.RELEASE] at org.springframework.transaction.support.AbstractPlatformTransactionManager.cleanupAfterCompletion(AbstractPlatformTransactionManager.java:1011) ~[spring-tx-3.0.6.RELEASE.jar:3.0.6.RELEASE] at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:804) ~[spring-tx-3.0.6.RELEASE.jar:3.0.6.RELEASE] at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:723) ~[spring-tx-3.0.6.RELEASE.jar:3.0.6.RELEASE] at org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(TransactionAspectSupport.java:393) ~[spring-tx-3.0.6.RELEASE.jar:3.0.6.RELEASE] at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:120) ~[spring-tx-3.0.6.RELEASE.jar:3.0.6.RELEASE] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) ~[spring-aop-3.0.6.RELEASE.jar:3.0.6.RELEASE] at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202) ~[spring-aop-3.0.6.RELEASE.jar:3.0.6.RELEASE] at $Proxy29.updateExecutionContext(Unknown Source) ~[na:na] at org.springframework.batch.core.step.tasklet.TaskletStep$ChunkTransactionCallback.doInTransaction(TaskletStep.java:429) ~[spring-batch-core-2.1.8.RELEASE.jar:na] at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:130) [spring-tx-3.0.6.RELEASE.jar:3.0.6.RELEASE] at org.springframework.batch.core.step.tasklet.TaskletStep$2.doInChunkContext(TaskletStep.java:264) [spring-batch-core-2.1.8.RELEASE.jar:na] at org.springframework.batch.core.scope.context.StepContextRepeatCallback.doInIteration(StepContextRepeatCallback.java:76) [spring-batch-core-2.1.8.RELEASE.jar:na] at org.springframework.batch.repeat.support.RepeatTemplate.getNextResult(RepeatTemplate.java:367) [spring-batch-infrastructure-2.1.8.RELEASE.jar:na] at org.springframework.batch.repeat.support.RepeatTemplate.executeInternal(RepeatTemplate.java:214) [spring-batch-infrastructure-2.1.8.RELEASE.jar:na] at org.springframework.batch.repeat.support.RepeatTemplate.iterate(RepeatTemplate.java:143) [spring-batch-infrastructure-2.1.8.RELEASE.jar:na] at org.springframework.batch.core.step.tasklet.TaskletStep.doExecute(TaskletStep.java:250) [spring-batch-core-2.1.8.RELEASE.jar:na] at org.springframework.batch.core.step.AbstractStep.execute(AbstractStep.java:195) [spring-batch-core-2.1.8.RELEASE.jar:na] at org.springframework.batch.core.job.SimpleStepHandler.handleStep(SimpleStepHandler.java:135) [spring-batch-core-2.1.8.RELEASE.jar:na] at org.springframework.batch.core.job.flow.JobFlowExecutor.executeStep(JobFlowExecutor.java:61) [spring-batch-core-2.1.8.RELEASE.jar:na] at org.springframework.batch.core.job.flow.support.state.StepState.handle(StepState.java:60) [spring-batch-core-2.1.8.RELEASE.jar:na] at org.springframework.batch.core.job.flow.support.SimpleFlow.resume(SimpleFlow.java:144) [spring-batch-core-2.1.8.RELEASE.jar:na] at org.springframework.batch.core.job.flow.support.SimpleFlow.start(SimpleFlow.java:124) [spring-batch-core-2.1.8.RELEASE.jar:na] at org.springframework.batch.core.job.flow.FlowJob.doExecute(FlowJob.java:135) [spring-batch-core-2.1.8.RELEASE.jar:na] at org.springframework.batch.core.job.AbstractJob.execute(AbstractJob.java:281) [spring-batch-core-2.1.8.RELEASE.jar:na] at org.springframework.batch.core.launch.support.SimpleJobLauncher$1.run(SimpleJobLauncher.java:120) [spring-batch-core-2.1.8.RELEASE.jar:na] at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [na:1.6.0_24] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [na:1.6.0_24] at java.lang.Thread.run(Thread.java:662) [na:1.6.0_24] {code}

    Spring JIRA | 5 years ago | Svein Erik Løvland
    java.lang.IllegalStateException: No value for key [org.apache.commons.dbcp.BasicDataSource@630bd3f1] bound to thread [jobLauncherTaskExecutor-1]
  3. 0

    IllegalStateException: No value for key [...orm.jpa.LocalEntityManagerFactoryBean] (Spring forum at Coderanch)

    coderanch.com | 9 months ago
    java.lang.IllegalStateException: No value for key [org.springframework.orm.jpa.LocalEntityManagerFactoryBean@6e646e64] bound to thread [main]
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    IllegalStateException: No value for key [...orm.jpa.LocalEntityManagerFactoryBean] - scriptscoop.com

    scriptscoop.com | 1 year ago
    java.lang.IllegalStateException: No value for key [org.springframework.orm.jpa.LocalEntityManagerFactoryBean@6e646e64] bound to thread [main]
  6. 0

    Drools: User forum - MOVED - EntityManager is closed

    nabble.com | 1 year ago
    java.lang.IllegalStateException: No value for key [org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean@14994b1] bound to thread [http-8080-2]

    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.commons.dbcp.BasicDataSource@630bd3f1] bound to thread [jobLauncherTaskExecutor-1]

      at org.springframework.transaction.support.TransactionSynchronizationManager.unbindResource()
    2. Spring Tx
      TransactionSynchronizationManager.unbindResource
      1. org.springframework.transaction.support.TransactionSynchronizationManager.unbindResource(TransbcpactionSynchronizationManager.java:199)[spring-tx-3.0.6.RELEASE.jar:3.0.6.RELEASE]
      1 frame
    3. Spring ORM
      JpaTransactionManager.doCleanupAfterCompletion
      1. org.springframework.orm.jpa.JpaTransactionManager.doCleanupAfterCompletion(JpaTransactionManager.java:531)[spring-orm-3.0.6.RELEASE.jar:3.0.6.RELEASE]
      1 frame
    4. Spring Tx
      TransactionInterceptor.invoke
      1. org.springframework.transaction.support.AbstractPlatformTransactionManager.cleanupAfterCompletion(AbstractPlatformTransactionManager.java:1011)[spring-tx-3.0.6.RELEASE.jar:3.0.6.RELEASE]
      2. org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:804)[spring-tx-3.0.6.RELEASE.jar:3.0.6.RELEASE]
      3. org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:723)[spring-tx-3.0.6.RELEASE.jar:3.0.6.RELEASE]
      4. org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(TransactionAspectSupport.java:393)[spring-tx-3.0.6.RELEASE.jar:3.0.6.RELEASE]
      5. org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:120)[spring-tx-3.0.6.RELEASE.jar:3.0.6.RELEASE]
      5 frames
    5. Spring AOP
      JdkDynamicAopProxy.invoke
      1. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)[spring-aop-3.0.6.RELEASE.jar:3.0.6.RELEASE]
      2. org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)[spring-aop-3.0.6.RELEASE.jar:3.0.6.RELEASE]
      2 frames
    6. Unknown
      $Proxy29.updateExecutionContext
      1. $Proxy29.updateExecutionContext(Unknown Source)[na:na]
      1 frame
    7. Spring Batch Core
      TaskletStep$ChunkTransactionCallback.doInTransaction
      1. org.springframework.batch.core.step.tasklet.TaskletStep$ChunkTransactionCallback.doInTransaction(TaskletStep.java:429)[spring-batch-core-2.1.8.RELEASE.jar:na]
      1 frame
    8. Spring Tx
      TransactionTemplate.execute
      1. org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:130)[spring-tx-3.0.6.RELEASE.jar:3.0.6.RELEASE]
      1 frame
    9. Spring Batch Core
      StepContextRepeatCallback.doInIteration
      1. org.springframework.batch.core.step.tasklet.TaskletStep$2.doInChunkContext(TaskletStep.java:264)[spring-batch-core-2.1.8.RELEASE.jar:na]
      2. org.springframework.batch.core.scope.context.StepContextRepeatCallback.doInIteration(StepContextRepeatCallback.java:76)[spring-batch-core-2.1.8.RELEASE.jar:na]
      2 frames
    10. Spring Batch Infrastructure
      RepeatTemplate.iterate
      1. org.springframework.batch.repeat.support.RepeatTemplate.getNextResult(RepeatTemplate.java:367)[spring-batch-infrastructure-2.1.8.RELEASE.jar:na]
      2. org.springframework.batch.repeat.support.RepeatTemplate.executeInternal(RepeatTemplate.java:214)[spring-batch-infrastructure-2.1.8.RELEASE.jar:na]
      3. org.springframework.batch.repeat.support.RepeatTemplate.iterate(RepeatTemplate.java:143)[spring-batch-infrastructure-2.1.8.RELEASE.jar:na]
      3 frames
    11. Spring Batch Core
      SimpleJobLauncher$1.run
      1. org.springframework.batch.core.step.tasklet.TaskletStep.doExecute(TaskletStep.java:250)[spring-batch-core-2.1.8.RELEASE.jar:na]
      2. org.springframework.batch.core.step.AbstractStep.execute(AbstractStep.java:195)[spring-batch-core-2.1.8.RELEASE.jar:na]
      3. org.springframework.batch.core.job.SimpleStepHandler.handleStep(SimpleStepHandler.java:135)[spring-batch-core-2.1.8.RELEASE.jar:na]
      4. org.springframework.batch.core.job.flow.JobFlowExecutor.executeStep(JobFlowExecutor.java:61)[spring-batch-core-2.1.8.RELEASE.jar:na]
      5. org.springframework.batch.core.job.flow.support.state.StepState.handle(StepState.java:60)[spring-batch-core-2.1.8.RELEASE.jar:na]
      6. org.springframework.batch.core.job.flow.support.SimpleFlow.resume(SimpleFlow.java:144)[spring-batch-core-2.1.8.RELEASE.jar:na]
      7. org.springframework.batch.core.job.flow.support.SimpleFlow.start(SimpleFlow.java:124)[spring-batch-core-2.1.8.RELEASE.jar:na]
      8. org.springframework.batch.core.job.flow.FlowJob.doExecute(FlowJob.java:135)[spring-batch-core-2.1.8.RELEASE.jar:na]
      9. org.springframework.batch.core.job.AbstractJob.execute(AbstractJob.java:281)[spring-batch-core-2.1.8.RELEASE.jar:na]
      10. org.springframework.batch.core.launch.support.SimpleJobLauncher$1.run(SimpleJobLauncher.java:120)[spring-batch-core-2.1.8.RELEASE.jar:na]
      10 frames
    12. Java RT
      Thread.run
      1. java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)[na:1.6.0_24]
      2. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)[na:1.6.0_24]
      3. java.lang.Thread.run(Thread.java:662)[na:1.6.0_24]
      3 frames