Announcement Announcement Module
No announcement yet.
Error after upgrading from 2.0 to 2.1 Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Error after upgrading from 2.0 to 2.1

    I upgraded our project to use the latest version of spring batch 2.1 (previously on 2.0)

    After upgrading we get an error whilst persisting our job state, all we have changed in the references to spring batch to 2.1, do we need to configure somewhere a native extractor now?


    18:08:38,423 [] AbstractStep ERROR <execute> - Encountered an error executing the step
    org.springframework.dao.InvalidDataAccessApiUsageE xception: OracleLobCreator needs to work on [oracle.jdbc.OracleConnection], not on [org.apache.commons.dbcp.PoolableConnection]: specify a corresponding NativeJdbcExtractor; nested exception is java.lang.ClassCastException: org.apache.commons.dbcp.PoolableConnection
    at ler$OracleLobCreator.createLob(OracleLobHandler.ja va:357)
    at ler$OracleLobCreator.setClobAsString(OracleLobHand
    at org.springframework.batch.core.repository.dao.Jdbc ExecutionContextDao$1.setValues(JdbcExecutionConte
    at org.springframework.jdbc.core.JdbcTemplate$2.doInP reparedStatement(
    at org.springframework.jdbc.core.JdbcTemplate.execute (
    at org.springframework.jdbc.core.JdbcTemplate.update(
    at org.springframework.jdbc.core.JdbcTemplate.update(
    at org.springframework.batch.core.repository.dao.Jdbc ExecutionContextDao.persistSerializedContext(JdbcE
    at org.springframework.batch.core.repository.dao.Jdbc ExecutionContextDao.updateExecutionContext(JdbcExe
    at SimpleJobRepository.updateExecutionContext(SimpleJ

  • #2
    I'm not sure why there would be a difference if all you changed literally was the Spring Batch jars, so I suspect something else changed. Where does the OracleLobCreator get configured?

    In the end the solution is simple anyway (it is even suggested in the logs): just add a native extractor to the lob creator.


    • #3

      we are facing exactly the same issue after upgrading to 2.1

      Anyone has found a workaround/solution for this?

      Thanks in advance!


      • #4
        Did you add a native extractor to the lob creator? It's not a Spring Batch feature, just one that we use from Spring JDBC.


        • #5
          The problem was that we did not actually inject a lobHandler to the jobrepository (we were upgrading from version 1.0 to 2.1).

          After applying the lobHandler (and setting the native extractor), it works fine.