◂ Back to Profiq blog

How to run Liferay with EnterpriseDB's PPAS as WCM

In case you are evaluating a database for your project(s), you might come across an EnterpriseDB’s Postgres Plus Advanced Server (PPAS). This database is part of an EnterpriseDB (EDB) offering, which is a company providing optimizations, support, performance and security additions and tools (such as Oracle compatibility) for Postgres SQL database.

Lately I had a need to use a database for my Liferay portal other than the one that is bundled within Liferay installation, so I have picked up EnterpriseDB’s PPAS.

Below in my article, in a couple of easy steps, I’m providing a way to configure Liferay 6.2 with an EnterpriseDB’s PPAS as a Web Content Management (WCM) database. I have used Liferay 6.2 CE GA1 bundle with Tomcat app server and Postgres Plus Advanced Server version 9.3.

Please start with following:

Place EDB’s JDBC connector into Liferay libs

PPAS is shipped with many

connectors (ECPG/ODBC/JDBC)

. I will assume that you have installed your PPAS to /opt/ directory in your system. As Liferay connects to database through JDBC connector, it is necessary to copy or link EDB JDBC connector to lib/ext directory in Liferay’s tomcat home:

cp /opt/PostgresPlus/9*/connectors/jdbc/edb-jdbc16.jar lib/ext/edb-jdbc16.jar
        or
ln -s /opt/PostgresPlus/9*/connectors/jdbc/edb-jdbc16.jar lib/ext/edb-jdbc16.jar

This copies or creates a symbolic link to the edb-jdbc16.jar connector which is built on java JDK 1.6. You can choose edb-jdbc14.jar connector which is build on java JDK 1.4, both of them work.

Set Database dialect

Next it is necessary to tell to Liferay what dialect should be used, otherwise Liferay can’t determine dialect as it doesn’t know EnterpriseDB and deployment of Liferay will fail with following error message:

10:05:12,270 INFO  [liferay/convert_process-1][DialectDetector:71] Determine
        dialect for EnterpriseDB 9
10:05:12,272 ERROR [liferay/convert_process-1][DialectDetector:124]
        org.hibernate.HibernateException: Unable to determine Dialect to use
        [name=EnterpriseDB, majorVersion=9]; user must register resolver or
        explicitly set 'hibernate.dialect'

Edit or create portal-ext.properties file under webapps/ROOT/WEB-INF/classes/ and paste:

hibernate.dialect=org.hibernate.dialect.PostgresPlusDialect

Configure JDBC connector to EDB

All prerequisites has been met and we can configure JDBC connector itself. Open again portal-ext.properties file and paste

jdbc.default.driverClassName=com.edb.Driver
jdbc.default.url=jdbc:edb://EDB_SERVER:EDB_PORT/DB_NAME
jdbc.default.username=USERNAME
jdbc.default.password=PASSWORD

Note: Default EDB_PORT is 5444.

Start Liferay

Now you can start Liferay from Tomcat home by running

./bin/startup.sh

You can see info messages indicating usage of PostgresPlus database in logs/catalina.out log file

13:49:09,028 INFO  [localhost-startStop-1][DBFactoryImpl:59]
             Using dialect org.hibernate.dialect.PostgresPlusDialect

and Liferay configuration pages comes with filled database config

Screenshot from 2014-02-05 14:51:07

If you look at Postgres Enterprise Manager, you can see that Liferay has been setup to database you specify (in our case liferay) under public scheme.

Summary

You should be able to run a clean Liferay Portal with an EnterpriseDB’s Postgres Plus Advanced Server now and everything should be ready for you to use Liferay Portal, setup your site, create pages etc.

Enjoy!

janhaj

Written by

janhaj

Comments

Leave a Reply

Online comments are not active during the static migration phase.
AI Function Blog Image

Is The Most Valuable AI Function Asking Better Questions?

How the "Grill Me" method became a key part of Project Weaver's approach to AI-assisted software development. We've shared some of the thinking behind Project Weaver—the internal engineering framework we've developed at profiq to help our teams and AI work together more effectively. Rather than treating AI as a magic code generator, Weaver is built around a simple idea: the better the structure, context, and engineering discipline, the better the outcomes.

Posted 4 weeks ago by Anke Corbin

Weaver Prototype Image

From Vibe-Coded Prototype to Production-Ready App Using Weaver

There's an important distinction between a prototype that demonstrates an idea and a system that can support a real business. Recently, we had the opportunity to explore that distinction firsthand while working with Ginger & Nash on an application called c.h.i.p. using profiq Weaver as an AI assistant.

Posted 5 weeks ago by Anke Corbin

Project Weaver Recap

Quick Recap: Project Weaver Engineering Series

We wanted to do another quick recap of the Weaver journey so far for those of you who are just learning about the project, from the first idea through the latest automation and workflow experiments.

Posted 2 months ago by Anke Corbin

Read the Blog