Installing Liferay 6.2 on JBoss EAP 6.2

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 - 
 
JBoss_Dependency_Jar
 
 
3.  Create a “ module.xml ” file in the same folder with the following content.
 
module xml file
 
 
Step2: JBoss Configuration
 
 We need to modify the standalone.xml file under “ $JBOSS_HOME/standalone/configuration/
 
standalone xml
 
 
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/

More Blog Entries

thumbnail
thumbnail
Blogs
Hi! Can you help me? I tried to do the procedure of your blog entry but when I started the Jboss server it doesn't ran, the log shows the next error:


16:52:57,339 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-7) MSC000001: Failed to start service jboss.module.service."deployment.ROOT.war".main: org.jboss.msc.service.StartException in service jboss.module.service."deployment.ROOT.war".main: JBAS018759: Error al cargar el módulo: deployment.ROOT.war:main
at org.jboss.as.server.moduleservice.ModuleLoadService.start(ModuleLoadService.java:91) [jboss-as-server-7.3.0.Final-redhat-14.jar:7.3.0.Final-redhat-14]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.4.GA-redhat-1.jar:1.0.4.GA-redhat-1]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.4.GA-redhat-1.jar:1.0.4.GA-redhat-1]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_75]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_75]
at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_75]
Caused by: org.jboss.modules.ModuleNotFoundException: com.liferay.portal:main
at org.jboss.modules.Module.addPaths(Module.java:1030) [jboss-modules.jar:1.3.0.Final-redhat-2]
at org.jboss.modules.Module.link(Module.java:1386) [jboss-modules.jar:1.3.0.Final-redhat-2]
at org.jboss.modules.Module.relinkIfNecessary(Module.java:1414) [jboss-modules.jar:1.3.0.Final-redhat-2]
at org.jboss.modules.ModuleLoader.loadModule(ModuleLoader.java:242) [jboss-modules.jar:1.3.0.Final-redhat-2]
at org.jboss.as.server.moduleservice.ModuleLoadService.start(ModuleLoadService.java:70) [jboss-as-server-7.3.0.Final-redhat-14.jar:7.3.0.Final-redhat-14]
... 5 more
I have the same problem trying to deploy liferay 62. ga2 into jbos eap 6.2
can anybody help me pleas
Please drop me an email with the issue you are facing.
my email id : subhasis.it@gmail.com
Hi
I am running liferay portal 6.2-ee-sp11 in a jboss eap 6.4; i am trying to develop a portlet but i cannot get the logging system to work
How do i do it ?