Hey I've been running into some weird issues myself ... as far as your hsql database url you really should consider doing the following:
jdbc:hsqldb:file:${project.build.dir}/dbunit/db;shutdown=true
Also ... I would think about adding -Dshutdown=true
Hypersonic made a change I think in the 1.8 series that requires the database
to be shut down
to properly commit the data to the file system. I've been having loads of
problems with this myself and it
appears to be the only way to make this work.
> P.S. Here is the error that I get:
> <pre>
> <blockquote>
> $ mvn -Dformat=xml -Durl=jdbc:hsqldb:file:${basedir}/target/dbunit/db
> -Dusername=sa -Dpassword="" -Ddriv
> er="org.hsqldb.jdbcDriver" -Dtype="CLEAN_INSERT"
> -Dsrc=src/test/data/insert.xml dbunit:operation
> [INFO] Scanning for projects...
> [INFO] Searching repository for plugin with prefix: 'dbunit'.
> [INFO]
> ----------------------------------------------------------------------------
> [INFO] Building Place Project Name here
> [INFO] task-segment: [dbunit:operation]
> [INFO]
> ----------------------------------------------------------------------------
> [INFO] [dbunit:operation]
> [INFO]
> ------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Error executing database operation: type
>
> Embedded error: Type must be one of: UPDATE, INSERT, REFRESH, DELETE,
> DELETE_ALL, CLEAN_INSERT, MSSQL_INS
> ERT, or MSSQL_REFRESH but was: type
> [INFO]
> ------------------------------------------------------------------------
> [INFO] For more information, run Maven with the -e switch
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Total time: 2 seconds
> [INFO] Finished at: Wed Oct 24 00:20:43 EDT 2007
> [INFO] Final Memory: 4M/7M
> [INFO]
> ------------------------------------------------------------------------
> </blockquote>
> </pre>
>
>
> leeand00 wrote:
> >
> > Hello,
> >
> > I am trying to use the DBUnit plugin for Maven2 to import some data
> > into a file hsqldb database
> >
> > Versions:
> > - dbunit-maven-plugin - 1.0-beta-1
> > - hsqldb - 1.8.0.7
> >
> >
> > (The idea being that when I run "mvn test-compile::" it will read in
> > my insert.xml file and place it into the file database at
> > ${basedir}/target/dbunit/db, and when the test-compile phase ends, I
> > will wind up with a file containing the contents of the database in
> > ${basedir}/target/dbunit/export.xml
> >
> > I have the following plugin configuration in my pom.xml:
> > <plugins>
> > <!-- BEGIN: dbunit-maven-plugin -->
> > <plugin>
> > <groupId>org.codehaus.mojo</groupId>
> > <artifactId>dbunit-maven-plugin</artifactId>
> > <version>1.0-beta-1</version>
> > <!-- Jar file that has jdbc driver -->
> > <dependencies>
> > <dependency>
> > <groupId>hsqldb</groupId>
> > <artifactId>hsqldb</artifactId>
> > <version>1.8.0.7</version>
> > </dependency>
> > </dependencies>
> >
> > <!-- Common Configurations -->
> > <configuration>
> > <driver>org.hsqldb.jdbcDriver</driver>
> >
> > <url>jdbc:hsqldb:file:${basedir}/target/dbunit/db</url>
> > <username>sa</username>
> > <password></password>
> > </configuration>
> > <executions>
> > <execution>
> > <id>db-import</id>
> > <phase>test-compile</phase>
> > <goals>
> > <goal>operation</goal>
> > </goals>
> > <configuration>
> > <type>CLEAN_INSERT</type>
> >
> > <src>src/test/data/insert.xml</src>
> > <verbose>2</verbose>
> > </configuration>
> > </execution>
> > <execution>
> > <id>db_export</id>
> > <phase>test-compile</phase>
> > <goals>
> > <goal>export</goal>
> > </goals>
> > <!-- Specific Configuration -->
> > <configuration>
> > <format>xml</format>
> >
> > <dest>target/dbunit/export.xml</dest>
> > </configuration>
> > </execution>
> > </executions>
> > </plugin>
> > <!-- END: dbunit-maven-plugin -->
> >
> > I also have the following in my insert.xml file:
> > <?xml version="1.0" encoding="UTF-8"?>
> > <dataset>
> > <motorist id="1"
> > email="[EMAIL PROTECTED]"
> > password="hello"
> > firstname="andy"
> > lastname="leer" />
> >
> > </dataset>
> >
> >
> > After I run "mvn test-compile" I get the following in my export.xml file:
> >
> > <?xml version='1.0' encoding='UTF-8'?>
> > <dataset/>
> >
> > (rather than what I expected)
> >
> > What am I doing wrong?
> > And is there any way to get more feedback from the dbunit-maven-plugin
> > than I am getting back? It says that the goal db-import executed
> > successfully?!?
> >
> > Thank you,
> > Andrew J. Leer
> >
>
> --
> View this message in context:
> http://www.nabble.com/dbunit-maven-plugin-and-hsql-tf4679955.html#a13378839
> Sent from the mojo - user mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list please visit:
>
> http://xircles.codehaus.org/manage_email
>
>
--
David J. Graff
djgraff AT alltel DOT net
GPG Fingerprint: E407 6A73 0725 B2E0 995D AC21 705E 4D51 67C4 7499
signature.asc
Description: OpenPGP digital signature
