Derby Installation
- Derby in Embedded mode 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 derby*.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 Derby web site or directly from the Maven Central Repository.
- Once this is done, you need to tell XWiki to use Derby 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:derby:[DATABASE_LOCATION];create=true</property> <property name="connection.driver_class">org.apache.derby.jdbc.EmbeddedDriver</property> <property name="dialect">org.hibernate.dialect.DerbyDialect</property>
For XWiki 1.1M2 and above
Use the following mapping definition in WEB-INF/hibernate.cfg.xml:<mapping resource="xwiki.derby.hbm.xml"/>For XWiki 1.1M1
Place this xwiki.hbm-1.1.xml file in your WEB-INF/classes directory, rename it to "xwiki.derby.hbm.xml" and add the following mapping definition in WEB-INF/hibernate.cfg.xml:<mapping resource="xwiki.derby.hbm.xml"/>For XWiki 1.0 and lower
Place this xwiki.hbm-1.0.xml file in your WEB-INF/classes directory, rename it to "xwiki.derby.hbm.xml" and add the following mapping definition in WEB-INF/hibernate.cfg.xml:<mapping resource="xwiki.derby.hbm.xml"/>
Version 3.2 last modified by VincentMassol on 04/01/2008 at 00:36
Comments: 3