Announcement Announcement Module
Collapse
No announcement yet.
jdbccursoritemreader issue Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • #16
    I have problem same 'cch'

    Dear all
    please kindly help me solve the problem cursor position change
    I have problem same 'cch'
    about org.springframework.dao.InvalidDataAccessResourceU sageException: Unexpected cursor position change

    I need parallel step

    this problem from

    Job :
    <bean id="taskExecutorAsync" class="org.springframework.core.task.SimpleAsyncTa skExecutor" />


    <job id="TestJob">
    <step id="step1" next="step2">
    <tasklet>
    <chunk
    reader="readerStep1"
    writer="writerStep2"
    commit-interval="100"/>
    </tasklet>
    </step>
    <step id="step2" next="step3">
    <tasklet>
    <chunk
    reader="readerStep2"
    writer="writerStep2"
    commit-interval="100"
    task-executor="taskExecutorAsync"/>
    </tasklet>
    </step>
    <step id="step3">
    <tasklet>
    <chunk
    reader="readerStep3"
    writer="writerStep3"
    commit-interval="100"
    task-executor="taskExecutorAsync"/>
    </tasklet>
    </step>
    </job>

    oracle xa :
    <datasources>
    <xa-datasource>
    <jndi-name>DS_XAOracleDS</jndi-name>
    <!-- uncomment to enable interleaving <interleaving/> -->
    <isSameRM-override-value>false</isSameRM-override-value>
    <xa-datasource-class>oracle.jdbc.xa.client.OracleXADataSource</xa-datasource-class>
    <xa-datasource-property name="URL">jdbc:oracle:thin:@localhost:1521:xe</xa-datasource-property>
    <xa-datasource-property name="User">test</xa-datasource-property>
    <xa-datasource-property name="Password">test</xa-datasource-property>
    <!-- Uses the pingDatabase method to check a connection is still valid before handing it out from the pool -->
    <!--valid-connection-checker-class-name>org.jboss.resource.adapter.jdbc.vendor.Oracle ValidConnectionChecker</valid-connection-checker-class-name-->
    <!-- Checks the Oracle error codes and messages for fatal errors -->
    <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.Oracle ExceptionSorter</exception-sorter-class-name>
    <!-- Oracles XA datasource cannot reuse a connection outside a transaction once enlisted in a global transaction and vice-versa -->
    <no-tx-separate-pools/>

    <!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml (optional) -->
    <metadata>
    <type-mapping>Oracle9i</type-mapping>
    </metadata>
    </xa-datasource>

    Env : Oracle 10g ,SpringBatch 2.0

    Thank you

    Comment


    • #17
      cursor position change

      I can resolve problem about cursor position change can see information below

      5.3.5. Split Flows
      Every scenario described so far has involved a Job that executes its Steps one at a time in a linear
      fashion. In addition to this typical style, the Spring Batch namespace also allows for a job to be
      configured with parallel flows using the 'split' element. As is seen below, the 'split' element contains
      one or more 'flow' elements, where entire separate flows can be defined. A 'split' element may also
      contain any of the previously discussed transition elements such as the 'next' attribute or the 'next',
      'end', 'fail', or 'pause' elements.
      <split id="split1" next="step4">
      <flow>
      <step id="step1" parent="s1" next="step2"/>
      <step id="step2" parent="s2"/>
      </flow>
      <flow>
      <step id="step3" parent="s3"/>
      </flow>
      </split>
      <step id="step4" parent="s4"/>

      Comment


      • #18
        Originally posted by Dave Syer View Post
        You are trying to use a TaskExecutorRepeatTemplate with a cursor reader? Maybe that's the problem (two threads access the cursor simultaneously). Can you post the configuration and explain your use case a bit?
        hi, sorry for hijacking this thread

        i am having same problem

        - reading 40K rows table
        - do some processign with each item (call a service which will retrieve extra data)
        - output the data to a file

        i am getting the Cursor exception... any idea on how can i get around it?

        the expensive logic is done in processor.....

        w/kindest regards
        marco

        Comment

        Working...
        X