This article documents how to install Liferay Portal 6.2 war on Oracle Glassfish 4.
Resolution
Required Files
- Download the GlassFish 4 server zip file; available on the GlassFish Server Open Source Edition 4.0 download page.
- Download the Liferay Portal 6.2 war available through Liferay's customer portal page.
- Dependencies:
hsql.jar
jta.jar
jtds.jar
junit.jar
jutf7.jar
mail.jar
mysql.jar
persistence.jar
portal-service.jar
portlet.jar
postgresql.jar
script-10.jar
servlet-api.jar
Configuring the Domain
- Unzip the GlassFish 4 server zip file. GlassFish 4 home is found
\..\glassfish4\glassfish
. This folder will be called${GlassFish HOME}
. - Navigate to
${GlassFish HOME}\domains\domain1\lib
. Add all the dependencies to this folder. - Modify the
domain.xml
to set the file encoding, time zone, protocol stack, and increase the default amount of memory available. Navigate to${GlassFish HOME}\domains\domain1\config
and open thedomain.xml
file. Insert the following:-Dfile.encoding=UTF-8 -Djava.net.preferIPv4Stack=true -Dorg.apache.catalina.loader.WebappClassLoader.ENABLE_CLEAR_REFERENCES=false -Duser.timezone=GMT -Xmx1024m -XX:MaxPermSize=512m
- There may be multiple lists of JVM options in the domain.xml file. For example, by default, the domain.xml contains two lists of JVM options. There is one list inside of the element’s element and another inside of the element’s element. In both lists of JVM options, replace any existing options with the new values specified above.
- Delete the
\domain1\docroot\index.html
file.
Installing Liferay Portal
- Start the application server.
- Navigate to http://localhost:4848
- Click Application in the left navigation tree.
- Click Deploy
- Under Packaged File to Be Uploaded to the Server, click Choose File and browse to the location of the Liferay Portal
.war
file. - Enter
"/"
in the Context Root field. - Enter a name in the Application Name field.
- Click OK
- Navigate to http://localhost:8080
Additional Information
See our Official Documentation Guide here: Installing Liferay on Glassfish 4