The HSQLDB driver patch for OpenCms

Description

This patch adds a driver for the Hypersonic SQL Database Engine (HSQLDB) 1.8.0 to OpenCms (This is the database used in OpenOffice). This allows OpenCms to run without a database server only using the integrated HSQLDB engine. Running OpenCms with an integrated database may be interesting for the following purposes.

  • Development of OpenCms modules
  • Running unit- and integration-tests
  • Creating stand-alone OpenCms instances
  • Running small OpenCms websites

The patch is available for the 6.2.3 and 7.0.2 version of OpenCms and will hopefully be added to the official distribution when it's ready and tested.

If you want to help out or send in bug reports please send a mail either to the opencms-dev Mailinglist or use my private mail address.

IMPORTANT: The Patch for OpenCms 7 is included in the OpenCms core since Version 7.0.3

Applying the patch

Checkout the required OpenCms version from CVS as described on the OpenCms CVS Development page and download the patch matching your OpenCms version.

Extract the downloaded tarball anywhere you like and copy the contents of the newly created directory hsqldb.patch into the checked out OpenCms source directory. To check if everything went correctly have a look if the folder src/org/opencms/db/hsqldb exists.

Have a look into the folder named "hsqldb-patches" and apply all patches to your source. The patches are in the unified patch format so you can apply them e.g. using the command:

patch -u  modules/org.opencms.legacy.compatibility/resources/manifest.xml \
hsqldb-patches/modules/org.opencms.legacy.compatibility/resources/manifest.xml.patch

Important: There's a folder named "build" inside "hsqldb-patches". These are patches only used by me for development purposes. They are not intended for the distribution but can give you an idea how to tweak the build-system to get unit tests and build running quickly.

Important for OpenCms 7.0.2: The patch for OpenCms 7.0.2 does not contain any patches other than build patches.

After applying all patches you can test out if everything went well by building the OpenCms distribution and running the unit tests (please mind that you have to modify the file test/test.properties before running the tests)

What needs to be tested

  • Does the setup work correctly
  • Do the legacy things like Tasks work
  • Does the old legacy master content work
  • Do all the administration tasks etc. work correctly
  • Does everything else work?! ;)

Known issues

  • The setup wizard always shows a warning that the database already exists.
  • In Version 7.0.2 some unit tests fail but in my case they also fail when using the MySQL driver.I do not consider this to be a problem of this patch.

Downloads

OpenCms 6.2.3

OpenCms 7.0.2