Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8336823
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T04:06:49+00:00 2026-06-09T04:06:49+00:00

I am trying to export a portion of my db using the db-unit-maven plugin.

  • 0

I am trying to export a portion of my db using the db-unit-maven plugin. I set the ordered flag set to true in my configuration so that I can re-import it avoiding integrity constraint violation. I also specify what tables to export using the tables element inside the configuration. I pasted below an example of what I am trying to do.
However, it exports additional tables that are unrelated in terms of constraints to those manually selected in the configuration. Does <ordered>true</order> cause the list to be ignored? What am I missing?

<plugin>
    <groupId>org.codehaus.mojo</groupId>
    <artifactId>dbunit-maven-plugin</artifactId>
    <version>1.0-beta-3</version>
    <dependencies>
        <dependency>
            <groupId>com.oracle</groupId>
            <artifactId>ojdbc6</artifactId>
            <version>11.2.0.1.0</version>
        </dependency>
    </dependencies>
    <configuration>
        <driver>oracle.jdbc.OracleDriver</driver>
        <url>${it.datasource.url}</url>
        <username>${dbunit.username}</username>
        <password>${dbunit.password}</password>
        <dataTypeFactoryName>org.dbunit.ext.oracle.OracleDataTypeFactory</dataTypeFactoryName>
        <skipOracleRecycleBinTables>true</skipOracleRecycleBinTables>
    </configuration>
    <executions>
        <execution>
            <id>execute</id>
            <phase>package</phase>
            <goals>
                <goal>export</goal>
            </goals>
            <configuration>
                <schema>${dbunit.username}</schema>
                <format>xml</format>
                <dest>target/dbunit/export.xml</dest>
                <tables>
                    <table name="TABLE_1" />
                    <table name="TABLE_2" />
                </tables>
                <ordered>true</ordered>
            </configuration>
        </execution>
    </executions>
</plugin>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T04:06:52+00:00Added an answer on June 9, 2026 at 4:06 am

    It turns out the syntax is wrong. The original pasted above returns a NullPointerException the correct syntax is pasted below and, as far as I can tell, it behaves as expected.

    <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>dbunit-maven-plugin</artifactId>
        <version>1.0-beta-3</version>
        <dependencies>
            <dependency>
                <groupId>com.oracle</groupId>
                <artifactId>ojdbc6</artifactId>
                <version>11.2.0.1.0</version>
            </dependency>
        </dependencies>
        <configuration>
            <driver>oracle.jdbc.OracleDriver</driver>
            <url>${it.datasource.url}</url>
            <username>${dbunit.username}</username>
            <password>${dbunit.password}</password>
            <dataTypeFactoryName>org.dbunit.ext.oracle.OracleDataTypeFactory</dataTypeFactoryName>
            <skipOracleRecycleBinTables>true</skipOracleRecycleBinTables>
        </configuration>
        <executions>
            <execution>
                <id>execute</id>
                <phase>package</phase>
                <goals>
                    <goal>export</goal>
                </goals>
                <configuration>
                    <schema>${dbunit.username}</schema>
                    <format>xml</format>
                    <dest>target/dbunit/export.xml</dest>
                    <tables>
                        <table>
                           <name>TABLE_1</name>
                        </table>
                        <table>
                           <name>TABLE_2</name>
                        </table>
                    </tables>
                    <ordered>true</ordered>
                </configuration>
            </execution>
        </executions>
    </plugin>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to export a profile from WAS 6.1 so that I can give
Im trying to export data from a database into a set format so that
I'm trying to export a product database out of FileMakerPro into a WordPress import
So I am trying to export a function in a DLL that was developed
I'm trying to export the schema of my database so another developer can have
I'm trying to export about 300k records to XLS using a DelayedJob in heroku
I am trying to export result of query to a text file using outfile
I am trying to export a snapshot of a movie using Quicktime. This is
I'm trying to export a record set into Excel but it seems to keep
I'm trying to export classes from a DLL that contain objects such as std::vectors

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.