java.lang.IllegalStateException: Transaction synchronization is not active

Stack Overflow | maenu | 8 months ago
tip
Do you know that we can give you better hits? Get more relevant results from Samebug’s stack trace search.
  1. 0

    Spring Batch and Neo4j: Transaction synchronization is not active

    Stack Overflow | 8 months ago | maenu
    java.lang.IllegalStateException: Transaction synchronization is not active
  2. 0

    Spring @scheduled method not invoked via proxy therefore no transaction

    Stack Overflow | 1 year ago | mbosecke
    java.lang.IllegalStateException: Transaction synchronization is not active

    Root Cause Analysis

    1. java.lang.IllegalStateException

      Transaction synchronization is not active

      at org.springframework.transaction.support.TransactionSynchronizationManager.registerSynchronization()
    2. Spring Tx
      TransactionSynchronizationManager.registerSynchronization
      1. org.springframework.transaction.support.TransactionSynchronizationManager.registerSynchronization(TransactionSynchronizationManager.java:291)[spring-tx-4.3.2.RELEASE.jar:4.3.2.RELEASE]
      1 frame
    3. Spring Batch Core
      TaskletStep$ChunkTransactionCallback.doInTransaction
      1. org.springframework.batch.core.step.tasklet.TaskletStep$ChunkTransactionCallback.doInTransaction(TaskletStep.java:389)[spring-batch-core-3.0.7.RELEASE.jar:3.0.7.RELEASE]
      2. org.springframework.batch.core.step.tasklet.TaskletStep$ChunkTransactionCallback.doInTransaction(TaskletStep.java:330)[spring-batch-core-3.0.7.RELEASE.jar:3.0.7.RELEASE]
      2 frames
    4. Spring Tx
      TransactionTemplate.execute
      1. org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:133)[spring-tx-4.3.2.RELEASE.jar:4.3.2.RELEASE]
      1 frame
    5. Spring Batch Core
      StepContextRepeatCallback.doInIteration
      1. org.springframework.batch.core.step.tasklet.TaskletStep$2.doInChunkContext(TaskletStep.java:271)[spring-batch-core-3.0.7.RELEASE.jar:3.0.7.RELEASE]
      2. org.springframework.batch.core.scope.context.StepContextRepeatCallback.doInIteration(StepContextRepeatCallback.java:81)[spring-batch-core-3.0.7.RELEASE.jar:3.0.7.RELEASE]
      2 frames
    6. Spring Batch Infrastructure
      RepeatTemplate.iterate
      1. org.springframework.batch.repeat.support.RepeatTemplate.getNextResult(RepeatTemplate.java:374)[spring-batch-infrastructure-3.0.7.RELEASE.jar:3.0.7.RELEASE]
      2. org.springframework.batch.repeat.support.RepeatTemplate.executeInternal(RepeatTemplate.java:215)[spring-batch-infrastructure-3.0.7.RELEASE.jar:3.0.7.RELEASE]
      3. org.springframework.batch.repeat.support.RepeatTemplate.iterate(RepeatTemplate.java:144)[spring-batch-infrastructure-3.0.7.RELEASE.jar:3.0.7.RELEASE]
      3 frames
    7. Spring Batch Core
      SimpleJobLauncher$1.run
      1. org.springframework.batch.core.step.tasklet.TaskletStep.doExecute(TaskletStep.java:257)[spring-batch-core-3.0.7.RELEASE.jar:3.0.7.RELEASE]
      2. org.springframework.batch.core.step.AbstractStep.execute(AbstractStep.java:200)[spring-batch-core-3.0.7.RELEASE.jar:3.0.7.RELEASE]
      3. org.springframework.batch.core.job.SimpleStepHandler.handleStep(SimpleStepHandler.java:148)[spring-batch-core-3.0.7.RELEASE.jar:3.0.7.RELEASE]
      4. org.springframework.batch.core.job.AbstractJob.handleStep(AbstractJob.java:392)[spring-batch-core-3.0.7.RELEASE.jar:3.0.7.RELEASE]
      5. org.springframework.batch.core.job.SimpleJob.doExecute(SimpleJob.java:135)[spring-batch-core-3.0.7.RELEASE.jar:3.0.7.RELEASE]
      6. org.springframework.batch.core.job.AbstractJob.execute(AbstractJob.java:306)[spring-batch-core-3.0.7.RELEASE.jar:3.0.7.RELEASE]
      7. org.springframework.batch.core.launch.support.SimpleJobLauncher$1.run(SimpleJobLauncher.java:135)[spring-batch-core-3.0.7.RELEASE.jar:3.0.7.RELEASE]
      7 frames
    8. Spring Core
      SyncTaskExecutor.execute
      1. org.springframework.core.task.SyncTaskExecutor.execute(SyncTaskExecutor.java:50)[spring-core-4.3.2.RELEASE.jar:4.3.2.RELEASE]
      1 frame
    9. Spring Batch Core
      SimpleJobLauncher.run
      1. org.springframework.batch.core.launch.support.SimpleJobLauncher.run(SimpleJobLauncher.java:128)[spring-batch-core-3.0.7.RELEASE.jar:3.0.7.RELEASE]
      1 frame
    10. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[na:1.8.0_05]
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)[na:1.8.0_05]
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[na:1.8.0_05]
      4. java.lang.reflect.Method.invoke(Method.java:483)[na:1.8.0_05]
      4 frames
    11. Spring AOP
      ReflectiveMethodInvocation.proceed
      1. org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:333)[spring-aop-4.3.2.RELEASE.jar:4.3.2.RELEASE]
      2. org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)[spring-aop-4.3.2.RELEASE.jar:4.3.2.RELEASE]
      3. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)[spring-aop-4.3.2.RELEASE.jar:4.3.2.RELEASE]
      3 frames
    12. Spring Batch Core
      SimpleBatchConfiguration$PassthruAdvice.invoke
      1. org.springframework.batch.core.configuration.annotation.SimpleBatchConfiguration$PassthruAdvice.invoke(SimpleBatchConfiguration.java:127)[spring-batch-core-3.0.7.RELEASE.jar:3.0.7.RELEASE]
      1 frame
    13. Spring AOP
      JdkDynamicAopProxy.invoke
      1. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)[spring-aop-4.3.2.RELEASE.jar:4.3.2.RELEASE]
      2. org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:213)[spring-aop-4.3.2.RELEASE.jar:4.3.2.RELEASE]
      2 frames
    14. com.sun.proxy
      $Proxy44.run
      1. com.sun.proxy.$Proxy44.run(Unknown Source)[na:na]
      1 frame
    15. Spring Boot AutoConfigure
      JobLauncherCommandLineRunner.run
      1. org.springframework.boot.autoconfigure.batch.JobLauncherCommandLineRunner.execute(JobLauncherCommandLineRunner.java:216)[spring-boot-autoconfigure-1.4.0.RELEASE.jar:1.4.0.RELEASE]
      2. org.springframework.boot.autoconfigure.batch.JobLauncherCommandLineRunner.executeLocalJobs(JobLauncherCommandLineRunner.java:233)[spring-boot-autoconfigure-1.4.0.RELEASE.jar:1.4.0.RELEASE]
      3. org.springframework.boot.autoconfigure.batch.JobLauncherCommandLineRunner.launchJobFromProperties(JobLauncherCommandLineRunner.java:125)[spring-boot-autoconfigure-1.4.0.RELEASE.jar:1.4.0.RELEASE]
      4. org.springframework.boot.autoconfigure.batch.JobLauncherCommandLineRunner.run(JobLauncherCommandLineRunner.java:119)[spring-boot-autoconfigure-1.4.0.RELEASE.jar:1.4.0.RELEASE]
      4 frames
    16. Spring Boot
      SpringApplication.run
      1. org.springframework.boot.SpringApplication.callRunner(SpringApplication.java:798)[spring-boot-1.4.0.RELEASE.jar:1.4.0.RELEASE]
      2. org.springframework.boot.SpringApplication.callRunners(SpringApplication.java:782)[spring-boot-1.4.0.RELEASE.jar:1.4.0.RELEASE]
      3. org.springframework.boot.SpringApplication.afterRefresh(SpringApplication.java:769)[spring-boot-1.4.0.RELEASE.jar:1.4.0.RELEASE]
      4. org.springframework.boot.SpringApplication.run(SpringApplication.java:314)[spring-boot-1.4.0.RELEASE.jar:1.4.0.RELEASE]
      5. org.springframework.boot.SpringApplication.run(SpringApplication.java:1185)[spring-boot-1.4.0.RELEASE.jar:1.4.0.RELEASE]
      6. org.springframework.boot.SpringApplication.run(SpringApplication.java:1174)[spring-boot-1.4.0.RELEASE.jar:1.4.0.RELEASE]
      6 frames
    17. com.example
      DemoApplication.main
      1. com.example.DemoApplication.main(DemoApplication.java:10)[classes/:na]
      1 frame