title: Spring Batch DataSourceTransactionManager fails on Oracle
body: <p>I'm using WebLogic 10.3.3 with Oracle 11g and face a weird problem with Spring Batch as soon as I'm switching from Spring <a href="http://static.springsource.org/spring-batch/apidocs/org/springframework/batch/support/transaction/ResourcelessTransactionManager.html" rel="nofollow">ResourcelessTransactionManager</a> (which is mainly for testing) to the productive <a href="http://static.springsource.org/spring/docs/3.1.2.RELEASE/javadoc-api/org/springframework/jdbc/datasource/DataSourceTransactionManager.html" rel="nofollow">DataSourceTransactionManager</a>. First I used WebLogics default driver <code>oracle.jdbc.xa.client.OracleXADataSource</code> but this one fails because Spring can't set the isolation level - this is also documented <a href="http://docs.oracle.com/cd/E13222_01/wls/docs70/oracle/trxjdbcx.html#1081244" rel="nofollow">here</a>. </p>
  
  <p>I'm fine with that since I don't need global transactions anyway so I switched to <code>oracle.jdbc.driver.OracleDriver</code>. Now I'm getting the error message</p>
  
  <pre><code>ORA-01453: SET TRANSACTION must be first statement of transaction
  </code></pre>
  
  <p>I don't find a lot of information on this, there was a bug but that should have been fixed in Oracle 7 long time ago. It looks like a transaction is started before (?) the actual job gets added to the JobRepository and is not closed properly or something like that.</p>