The following document will provide the steps about installing the “Liferay 6.2 EE” on “JBoss 6.2 EAP” server.
Softwares Required:
- Download and unzip "JBoss6.2 EAP"
- Download latest version of the Liferay Portal .war file
- Download Liferay’s Portal Dependencies
In this example I have used " liferay-portal-6.2-ee-sp9.war " and " jboss-eap-6.2 ".
Installation Steps:
Step1: Set Dependency Jar
1. Create the folder structure “ com/liferay/portal/main ” under “ $JBOSS_HOME/modules/ ”
2. Copy the already downloaded portal dependency jar files into the main folder.
For example – In case of HSQL database, put the hsql.jar file under the “ $JBOSS_HOME/modules/com/Liferay/portal/main ” folder.
Here I have tried with the hsql database. For any other DB, you have put the dependency/connector jar file in the same location and add the entry in the module.xml file.
Refer to the screenshot below -
3. Create a “ module.xml ” file in the same folder with the following content.
Step2: JBoss Configuration
We need to modify the standalone.xml file under “ $JBOSS_HOME/standalone/configuration/ ”
1. Add the following between the </extensions> and <management> tags:
<system-properties>
<property name="org.apache.catalina.connector.URI_ENCODING" value="UTF-8"/>
<property name="org.apache.catalina.connector.USE_BODY_ENCODING_FOR_QUERY_STRING" value="true"/>
</system-properties>
2. Add the attribute deployment-timeout=”240” in the “ deployment-scanner ” tag
<deployment-scanner path="deployments" relative-to="jboss.server.base.dir" scan-interval="5000" deployment-timeout="240"/>
3. Add the following security domain to the security subsystem <security-domains> defined in element <subsystem xmlns="urn:jboss:domain:security:1.2">
<security-domain name="PortalRealm">
<authentication>
<login-module code="com.liferay.portal.security.jaas.PortalLoginModule" flag="required" />
</authentication>
</security-domain>
4. Disable welcome root of the web subsystem’s virtual server default host by specifying enable-welcome-root="false".
<subsystem xmlns="urn:jboss:domain:web:1.5" default-virtual-server="default-host" native="false">
<configuration>
<jsp-configuration development="true"/>
</configuration>
<connector name="http" protocol="HTTP/1.1" scheme="http" socket-binding="http"/>
<virtual-server name="default-host" enable-welcome-root="false">
<alias name="localhost" />
<alias name="example.com" />
</virtual-server>
</subsystem>
5. Add the following <configuration> element inside the web subsystem element <subsystem xmlns="urn:jboss:domain:web:1.5" default-virtual-server="default-host" native="false">
<configuration>
<jsp-configuration development="true"/>
</configuration>
Step3: Configuration and Startup script
Make changes for configuration and startup scripts.
Modify the file standalone.conf.bat on Windows under the $JBOSS_HOME/bin/ folder.
These modifications change the following options:
- Set the file encoding
- Set the user time-zone
- Set the preferred protocol stack
- Increase the default amount of memory available.
On Windows, comment out the initial JAVA_OPTS assignment as demonstrated in the following line:
rem set "JAVA_OPTS=-Xms64M -Xmx512M -XX:MaxPermSize=256M"
Then add the following JAVA_OPTS assignment one line above the "JAVA_OPTS_SET" line found at end of the file:
set "JAVA_OPTS=%JAVA_OPTS% -Dfile.encoding=UTF-8 -Djava.net.preferIPv4Stack=true -Djava.security.manager -Djava.security.policy=$JBOSS_HOME/bin/server.policy -Djboss.home.dir=$JBOSS_HOME -Duser.timezone=GMT -Xmx1024m -XX:MaxPermSize=256m"
Step4: Deploy Liferay war
1. Create a folder “ ROOT.war ” under the “ $JBOSS_HOME/standalone/deployments/ ” location
2. Unzip the Liferay .war file into the ROOT.war folder.
3. Create an empty file named ROOT.war.dodeploy in the same ($JBOSS_HOME/standalone/deployments/) folder.On startup, JBoss detects the presence of this file and deploys it as a web application.
4. Start the JBoss server.
##Trouble shoot:
Sometimes it gives the version issue, which I got for the first time when I tried to install.
Sample error log:
12:54:18,026 INFO [ServerService Thread Pool -- 175][BaseDB:481] Database supports case sensitive queries
12:54:18,056 ERROR [ServerService Thread Pool -- 175][MainServlet:212] java.lang.IllegalStateException: Attempting to deploy an older Liferay Portal version. Current build version is 6210 and attempting to deploy version 6202.
java.lang.IllegalStateException: Attempting to deploy an older Liferay Portal version. Current build version is 6210 and attempting to deploy version 6202.
at com.liferay.portal.tools.DBUpgrader.upgrade(DBUpgrader.java:114)
at com.liferay.portal.events.StartupAction.doRun(StartupAction.java:180)
at com.liferay.portal.ee.license.StartupAction.doRun(Unknown Source)
In this above case to resolve the version issue, I have changed the portal-service.jar file(In the com/liferay/portal/main) with the 6.2.1 portal-serice.jar and updated the module.xml file with the specific version name.

You can check the version(6.2 onwards) related jar file in the following online nexus location -
https://repository.liferay.com/nexus/content/repositories/liferay-releases-ce/com/liferay/portal/