Running Liferay on OracleAS 10.1.2

Liferay portal installation on OracleAS 10.1.2 doesn't necessarily follow the installation instructions mentioned in the liferay.com site.

Here are the rough steps to configure Liferay 3.0.6 on OracleAS 10.1.2. J2EE and Web Cache installation.

1. Download the Liferay EAR file. Follow the instructions to update the config files mentioned in the Liferay home pages.

2. Liferay uses different XML parser that is by default configured in OracleAS 10.1.2. To make the container use Xerces parser you need to set up parameters for starting up the container. Make sure you change the "/home/oracle/xerces/xerces-2_9_0" path to reflect your environment.

Edit opmn.xml:
         <ias-component id="OC4J">
            <process-type id="home" module-id="OC4J" status="enabled">
                  <category id="start-parameters">
                     <data id="java-options" value="-server -Doc4j.userThreads=true -Djava.security.policy=$ORACLE_HOME/j2ee/home/config/java2.policy -Djava.awt.headless=true -Xbootclasspath/a:/home/oracle/xerces/xerces-2_9_0/xml-apis.jar -Dorg.xml.sax.driver=org.apache.xerces.parsers.SAXParser -Djavax.xml.parsers.SAXParserFactory=org.apache.xerces.jaxp.SAXParserFactoryImpl -Djavax.xml.parsers.TransformerFactory=org.apache.xalan.processor.TransformerFactoryImpl -Djavax.xml.transform.TransformerFactory=org.apache.xalan.processor.TransformerFactoryImpl"/>

After editing the opmn.xml manually, validate the opmn.xml with command:

$ORACLE_HOME/opmn/bin/opmnctl validate

Reload the changes in opmn with command

$ORACLE_HOME/opmn/bin/opmnctl reload

Update the dcm repository with command:

$ORACLE_HOME/dcm/bin/dcmctl updateconfig

3. Configure OC4J global-web-application.xml:

To avoid this exception:

OracleJSP: oracle.jsp.parse.JspParseException: /html/themes/brochure/templates/init.jsp: Line # 27, <theme:defineObjects />
Error: Tag attempted to define a bean which already exists: themeDisplay

Resolve: Add following in $ORACLE_HOME/j2ee/home/config/global-web-application.xml


4. Copy following jar files to $ORACLE_HOME/j2ee/home/applib


The link to Liferay's JDBC driver can be found from Liferay.com. Xerces parser can be downloaded from Apache.org site.

5. Bounce the OC4J container

6. Deploy Liferay EAR file using OracleAS Enterprise Manager.

Test and make sure everything works. If you have any additions, pls let me know and I'll update the notes here.

Looks like a new version of Liferay 4.x.x just popped out. You might give a shot and try above installation instructions with the latest release as well.


Anonymous said...

Thanks you very much for your guild Harri,
I have a question that: In the XML parser for OC4J, can I set up parameters for starting up the container for another OC4J instanse?
in your guild is:
-process-type id="home" module-id="OC4J" status="enabled">
so can I user for another id such as:
-process-type id="ATMInquiry" module-id="OC4J">

Thanks you in advandced!

Anonymous said...

Hello Harri,

I'm a novice developer for OC4J.
I'm trying to run liferay with OC4J Its giving me following error:
org.xml.sax.SAXNotRecognizedException: http://apache.org/xml/features/validation/dynamic
at oracle.xml.jaxp.JXSAXParserFactory.setFeature(JXSAXParserFactory.java:128)
at org.apache.commons.digester.parser.XercesParser.configureXerces(XercesParser.java:185)

I tried to do the stuff you have mentioned in your blog, but unfortunately I don't see opmn.xml file at {oracle_home}/opmn/conf directory. Whereas I found one in {oracle_home}/j2ee/home/applications/ascontrol/ascontrol/WEB-INF/config/registration. I would be grateful if you can help me out in this. Thanks,Pravin

Harri Kaukovuo said...

As for the first question, yes you can define multiple OC4J instances and define your custom parameters for that instance.

-- Harri

Harri Kaukovuo said...

Pravin, I need to give Liferay a try on You won't see opmn directory if you are running standalone OC4J container.

-- Harri

Anonymous said...

Hello Harri,

Any luck running Liferay on


Rodolfo said...

Hello Harri,
Can I use the same proceddings to OAS 10.1.3?