title: Exception "java.lang.IllegalStateException: Existing transaction detected in JobRepository." after upgrading spring batch from 2.1.1 to 4.1.1 version
body: <p>I have a Junit test case which run a batch job. Previously It was working when I have spring batch version 2.1.2. But once I upgraded to version 4.1.1, am getting below exception </p>
  
  <p><code>java.lang.IllegalStateException: Existing transaction detected in JobRepository. Please fix this and try again (e.g. remove @Transactional annotations from client).</code></p>
  
  <p>I have tried removing <code>@Transactional</code> from test class. But still getting an exception.I guess the error is due to two transactions. But still removal of one didn't fix the error.</p>
  
  <p>Below Annotations used in the test class and it has test methods which call the method which do batch job. I have used Transactional on the test class and the test method run with SpringJUnit4ClassRunner runner. I tried with SpringRunner too.  </p>
  
  <pre><code>@RunWith(SpringJUnit4ClassRunner.class) @DirtiesContext
  @Transactional
  </code></pre>
  
  <p>This method will be called from test method. The method launched the batch job.</p>
  
  <pre><code>@Transactional(propagation = Propagation.NOT_SUPPORTED)
  public Long startExportJob(){
  </code></pre>
  
  <p>My spring core version is 4.3.18. Do I need to upgrade it to 5?
      Help me in solving this. Thanks in advance.</p>