Menu

#397 Streamed export does not work when it launched from Ant

v2.5.*
closed-fixed
2.5.4
5
2017-04-02
2017-01-19
No

When an export is triggered from Ant, even the resultSetTableFactory is set to ForwardOnlyResultSetTableFactory the process ignores this setting and uses CachedResultSetTableFactory anyway.

<property name="http://www.dbunit.org/properties/resultSetTableFactory" value="org.dbunit.database.ForwardOnlyResultSetTableFactory"></property>

This makes it impossible to export big tables with dbunit launched from Ant.

However the code sample given in the FAQ works fine:
http://dbunit.sourceforge.net/faq.html#streaming
... so launching the export using the Java API the recommended way works, indeed uses streaming mode.

Likely the problem is caused by this code:
getDatabaseDataSet() is called with forwardonly=false here:
https://sourceforge.net/p/dbunit/code.git/ci/master/tree/dbunit/src/main/java/org/dbunit/ant/Export.java#l244

then:
https://sourceforge.net/p/dbunit/code.git/ci/master/tree/dbunit/src/main/java/org/dbunit/ant/AbstractStep.java#l91

Discussion

  • Jeff Jensen

    Jeff Jensen - 2017-04-02

    Thanks for the patch zdenek-z.
    Committed for 2.5.4.

     
  • Jeff Jensen

    Jeff Jensen - 2017-04-02
    • status: open --> closed-fixed
    • assigned_to: Jeff Jensen
    • Fixed Release: (not fixed) --> 2.5.4
     

Log in to post a comment.

MongoDB Logo MongoDB