Announcement Announcement Module
Collapse
No announcement yet.
Error after upgrading from 2.0 to 2.1 Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • 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?

    thanks
    Andrew

    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 org.springframework.jdbc.support.lob.OracleLobHand ler$OracleLobCreator.createLob(OracleLobHandler.ja va:357)
    at org.springframework.jdbc.support.lob.OracleLobHand ler$OracleLobCreator.setClobAsString(OracleLobHand ler.java:265)
    at org.springframework.batch.core.repository.dao.Jdbc ExecutionContextDao$1.setValues(JdbcExecutionConte xtDao.java:197)
    at org.springframework.jdbc.core.JdbcTemplate$2.doInP reparedStatement(JdbcTemplate.java:796)
    at org.springframework.jdbc.core.JdbcTemplate.execute (JdbcTemplate.java:591)
    at org.springframework.jdbc.core.JdbcTemplate.update( JdbcTemplate.java:792)
    at org.springframework.jdbc.core.JdbcTemplate.update( JdbcTemplate.java:850)
    at org.springframework.batch.core.repository.dao.Jdbc ExecutionContextDao.persistSerializedContext(JdbcE xecutionContextDao.java:193)
    at org.springframework.batch.core.repository.dao.Jdbc ExecutionContextDao.updateExecutionContext(JdbcExe cutionContextDao.java:136)
    at org.springframework.batch.core.repository.support. SimpleJobRepository.updateExecutionContext(SimpleJ obRepository.java:178)

  • #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.

    Comment


    • #3
      Hi,

      we are facing exactly the same issue after upgrading to 2.1

      Anyone has found a workaround/solution for this?

      Thanks in advance!

      Comment


      • #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.

        Comment


        • #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.

          Comment

          Working...
          X