Raible's Wiki

Raible Designs
Wiki Home
News
Recent Changes

AppFuse

Homepage
  - Korean
  - Chinese
  - Italian
  - Japanese

QuickStart Guide
  - Chinese
  - French
  - German
  - Italian
  - Korean
  - Portuguese
  - Spanish
  - Japanese

User Guide
  - Korean
  - Chinese

Tutorials
  - Chinese
  - German
  - Italian
  - Korean
  - Portuguese
  - Spanish

FAQ
  - Korean

Latest Downloads

Other Applications

Struts Resume
Security Example
Struts Menu

Set your name in
UserPreferences


Referenced by
AppFuseSupport




JSPWiki v2.2.33

[RSS]


Hide Menu

AppFuseWithHSQLDB


Difference between current version and version 7:

At line 74 added 1 line.
If you write model objects with Boolean values, you may find that DBUnit fails. A quick fix for this is to add a reference to DBUnits custom data types.
At line 76 added 32 lines.
Unfortunately, the generally accepted remedy does not seemd to work, namely:
{{{
<taskdef name="dbunit" classname="org.dbunit.ant.DbUnitTask" classpathref="dao.test.classpath"
datatypeFactory="ca.ottawa.eiad.eventscal.util.HsqlDataTypeFactory"
/>
}}}
The quick and dirty fix for this seems to be to add the factory whereever it's needed, e.g.
{{{
<target name="db-export" depends="prepare"
description="Exports the current data in the database">
<dbunit driver="${database.driver_class}" url="${database.url}"
datatypeFactory="org.dbunit.ext.hsqldb.HsqldbDataTypeFactory"
userid="${database.username}" password="${database.password}">
<export dest="db-export.xml" format="xml"/>
</dbunit>
</target>
}}}
The db-load target or anything else that uses DBUnit will need a similar quickfix, so a request has been made to the JIRA issue tracker to have this fixed with a global variable for a future release.
You may need to upgrade to DBUnit2.2 for this to work. Don't forget to update your lib.properties :
{{{
#
# DBUnit - http://www.dbunit.org/
#
dbunit.version=2.2
dbunit.dir=${lib.dir}/dbunit-${dbunit.version}
dbunit.jar=${dbunit.dir}/dbunit-${dbunit.version}.jar
}}}

Back to AppFuseWithHSQLDB, or to the Page History.