Announcement Announcement Module
Collapse
No announcement yet.
SQLException: Exhausted Resultset while executing a batch Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • SQLException: Exhausted Resultset while executing a batch

    Hi guys,

    We are getting a java.sql.SQLException: Exhausted Resultset exception while executing a batch job. We are trying to do a select using a query, do some calculations, and write the result to an output file row by row. We were using Spring's DriverManagerDataSource but then switched to C3P0's ComboPooledDataSource after that error, but it did not help. We are not getting this error all the time. Sometimes, the batch finishes with success (about once in ten trials).

    Our setup :

    Driver : Oracle 10g Thin Driver
    Throttle-limit for the step : 10
    Fetch size for the reader : 1000
    Reader verifyCursorPosition : false (when I set this to true, error changes to InvalidDataAccessResourceUsageException: Unexpected cursor position change)
    Datasource :

    <bean id="dataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource"
    destroy-method="close">
    <property name="user" value="${jdbc.username}" />
    <property name="password" value="${jdbc.password}" />
    <property name="driverClass" value="${jdbc.driverClassName}" />
    <property name="jdbcUrl" value="${jdbc.url}" />
    <property name="initialPoolSize" value="3" />
    <property name="maxPoolSize" value="20" />
    <property name="minPoolSize" value="5" />
    <property name="acquireIncrement" value="1" />
    <property name="acquireRetryAttempts" value="2" />
    <property name="timeout" value="100"/>
    </bean>

    I will appreciate if you could help me about this.

    Thank you.
    Toprak

  • #2
    No stack traces makes it a bit hard to understand what went wrong. Also it would help to know the version of Spring Batch you are using and to see the configuration of the step that fails. My guess is you are using a multi-threaded step and the reader doesn't support concurrent usage, but I don't really know without more information.

    P.S. DriverManagerDataSource is not a connection pool (it says so in the Javadocs), so I wouldn't use it in anger if I were you.

    Comment

    Working...
    X