Follow these instructions to configure your Liferay portal with Derby DB SGBD :

  • Downloading the jdbc driver

Liferay don’t provide natively a Derby DB jdbc driver. You must download it. Follow these instructions to download it :

  1. Go to the official Apache Derby db download page
  2. Click on the appropriate latest official release
  3. On the distributions part, click on the db-derby-***-bin.zip link as shown below :
    DerbyDB jdbc driver
  4. Unzip the downloaded archive and navigate to “lib” folder
  5. Copy derby.jar and past it under $TOMCAT_HOME/lib/ext
  • Creating the blank database

Connect to your derby DB and create a database called lportal. You can do it by following these commands :

  1. Open a command terminal and navigate to the folder where you want to create your database. In our example, I will create a database under C:\dev\derbyDB. So in your prompt, tape :
  2. Launch the ij tool by taping :
  3. Create a lportal database by taping :
  • Updating portal-ext.properties

Open your portal-ext.properties file and fill with this information:

The default login/password of an Apache Derby Database are sysdba/masterkey.

  • Adding the JVM Argument

With Apache Derby database, we have to tell the server where the database is located. To do that, add the argument  -Dderby.system.home=”<YOUR_DERBY_DATABASE_LOCATION>”  to the jvm.

If you are handling your server under Eclipse, follow these instructions :

  1. On the server view, Double click on your server
  2. On the Overview window, under General Information, click on “Open launch configuration
    Eclipse server open launch configuration3.       Go to Arguments tab, and in the VM arguments section, add this line :
    Eclipse Derby VM Argument

Important: Don’t use ” \” or ”/” at the end of the path to your database.

  • Check the configuration:

During the server start, you can verify that Liferay started with the correct dialect (Apache Derby) by looking for the following line in your server log console/file:

If you go back to your database, you will see that it’s now populated by about 180 data tables that Liferay created on startup.

If you already configured your portal with hsql and want to re-configured it with the DerbyDB Database and add samples data, open portal-setup-wizard.properties file located in the same folder as  portal-ext.properties. Set the setup.wizard.enabled to true and restart your server.