Legacy Knowledge Base
Publicado Sep. 25, 2010

Deploying DXP 7.4 on JBoss EAP 7.4.0

Written By

Kartik Singh

How To articles are not official guidelines or officially supported documentation. They are community-contributed content and may not always reflect the latest updates to Liferay DXP. We welcome your feedback to improve How To articles!

While we make every effort to ensure this Knowledge Base is accurate, it may not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with any feedback or concerns.

Legacy Article

You are viewing an article from our legacy "FastTrack" publication program, made available for informational purposes. Articles in this program were published without a requirement for independent editing or verification and are provided"as is" without guarantee.

Before using any information from this article, independently verify its suitability for your situation and project.

Issue

  • This article outlined the detailed steps to deploy Liferay DXP 7.4 on JBoss EAP.

Environment

  • Liferay DXP 7.4
  • JBoss EAP 7.4.0

Resolution

  1. JBoss_Home/Liferay_Home contains jboss-eap-7.4 folder which is shown below image.
  2. Download the below files from the Help Center:
    1. DXP WAR file
    2. OSGi Dependencies ZIP file
  3. Create an osgi folder in JBoss_Home/Liferay_Home folder and extract the OSGi Dependencies ZIP file that you downloaded into the [JBoss Home/Liferay Home]/osgi folder.
  4. Unzip the DXP WAR file into:-
    Create a ROOT.war folder in [$JBOSS_HOME/Liferay_Home]jboss-eap/standalone/deployments/ and unzip the Dxp war file into [$JBOSS_HOME/Liferay_Home]jboss-eap/standalone/deployments/ROOT.war folder.
  5. Navigate to [$JBOSS_HOME/Liferay_Home]/jboss-eap/standalone/configuration/standalone.xml and make the following modifications:
    1. Configure the servlet container to use Java 8 VM compatibility with JSPs. Locate the default servlet container <servlet-container name="default"> in the <subsystem xmlns="urn:jboss:domain:undertow:12.0" ... element. In the servlet container’s <jsp-config> element, set development, source-vm, and target-vm attributes like this:

      <jsp-config development="true" source-vm="1.8" target-vm="1.8" /
      
    2. Locate the closing </extensions> tag. Directly beneath that closing tag, insert the following system properties, if they don’t already exist:

      <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>
      

    3. Filter out WFLYSRV0059 and WFLYEE0007 messages from the log. In the <subsystem xmlns="urn:jboss:domain:logging:8.0"> element’s <console-handler> tag, add the following <filter-spec> tag directly below the <level name="INFO"/> tag.

      <filter-spec value="not(any(match(&quot;WFLYSRV0059&quot;),match(&quot;WFLYEE0007&quot;)))" />
      

    4. Add a deployment scanner timeout by adding a deployment-timeout="600" setting to the <deployment-scanner> tag in the <subsystem xmlns="urn:jboss:domain:deployment-scanner:2.0"> element. For example,

      <deployment-scanner deployment-timeout="600" path="deployments" relative-to="jboss.server.base.dir" scan-interval="5000" runtime-failure-causes-rollback="${jboss.deployment.scanner.rollback.on.failure:false}"/>
      

    5. Add Liferay’s JAAS security domain to the <subsystem xmlns="urn:jboss:domain:security:2.0">’s <security-domains> element. Here is the domain code to add:

      <security-domain name="PortalRealm">
          <authentication>
              <login-module code="com.liferay.portal.security.jaas.PortalLoginModule" flag="required" />
          </authentication>
      </security-domain>
      

    6. Comment out the welcome content elements from the <subsystem xmlns="urn:jboss:domain:undertow:12.0" ...> element. For example,

      <!--<location name="/" handler="welcome-content"/>-->
      

      and

      <handlers>
          <!--<file name="welcome-content" path="${jboss.home.dir}/welcome-content"/>-->
      </handlers>
  6. Checkpoint:

    Before continuing, verify the following properties have been set in the standalone.xml file:

    1. The new <system-property> is added.
    2. The new <filter-spec> is added.
    3. The <deployment-timeout> is set to 600.
    4. The new <security-domain> is created.
    5. Welcome content is disabled.
  7. Next, configure the JVM and startup scripts:

    In the $JBOSS_HOME/bin/ folder, modify the standalone domain’s configuration script file standalone.conf:

    • Set the file encoding to UTF-8
    • Set the user time zone to GMT
    • Set the preferred protocol stack
    • Increase the default amount of memory available.

     
    Make the following edits to your standalone.conf script.

    1. Below the if [ "x$JAVA_OPTS" = "x" ]; statement, remove the JVM sizing options from the JAVA_OPTS assignment. For example, replace this

      JAVA_OPTS="-Djava.net.preferIPv4Stack=true"
      
    2. Add this Java options setting at the end of the file:

      JAVA_OPTS="$JAVA_OPTS -Dfile.encoding=UTF-8 -Djava.locale.providers=JRE,COMPAT,CLDR -Djava.net.preferIPv4Stack=true -Dlog4j2.formatMsgNoLookups=true -Duser.timezone=GMT -Xms2560m -Xmx2560m -XX:MaxNewSize=1536m -XX:MaxMetaspaceSize=768m -XX:MetaspaceSize=768m -XX:NewSize=1536m -XX:SurvivorRatio=7"
    1. To trigger deployment ROOT.war, create an empty file named ROOT.war.dodeploy in the $JBOSS_HOME/standalone/deployments/ folder.
    2. Start the JBoss application server by navigating to $JBOSS_HOME/bin and running standalone.sh. JBoss detects the ROOT.war.dodeploy file and deploys the web application matching the file prefix (i.e., ROOT.war).jbossjboss
  8. Congratulations! JBoss_Home/Liferay_Home looks like the below image after the server is up.

Additional Information

Did this article resolve your issue ?

Legacy Knowledge Base