HSQL Installation

Follow these instructions:

  • HSQL is a very simple database to configure as you don't need to install nor to start it before being able to use it. It comes as a single JAR file named hsqldb*.jar. If your XWiki WAR doesn't have it in WEB-INF/lib you'll need to download it and copy it there. You can download it from the HSQLDB web site or directly from the Maven Central Repository.
  • Once this is done, you need to tell XWiki to use HSQL and to tell it where the database files will be created. To do this, edit the WEB-INF/hibernate.cfg.xml file where you have expanded the XWiki WAR file and replace the matching properties with the following ones:
<property name="connection.url">jdbc:hsqldb:file:[DATABASE_LOCATION];shutdown=true</property>
<property name="connection.username">sa</property>
<property name="connection.password"></property>
<property name="connection.driver_class">org.hsqldb.jdbcDriver</property>
<property name="dialect">org.hibernate.dialect.HSQLDialect</property>

where [DATABASE_LOCATION] is where you wish to put the HSQL database. For example /apps/xwiki-database/xwiki.

Other optional ideas

  • You can use a remote HSQLDB database instead of embedding it. To do this, just use a URL like * If you want to use your app server facilities to manage your data sources (generally a better strategy), then
    • Put the In
<property name="connection.datasource">java:/comp/env/jdbc/xwiki</property>
<property name="dialect">org.hibernate.dialect.HSQLDialect</property>
    • Then you manage the data source using app server facilities. With Tomcat, for example, you would map the resource link jcbc/xwikiDs to a container-managed data source using the Admin web app or by editing the file conf/Catalina/*/xwiki.xml (i.e. webapp-name + ".xml").

Get Connected