Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-127268

AntiJARLocking warning appears in console log when starting Liferay 6.2 on Tomcat 8

    Details

      Description

      Liferay Portal 6.2 versions are generally bundled with Tomcat 7.
      However they can also be set up with Tomcat 8 - that configuration works too, but there is a warning displayed for custom plugins referencing a Tomcat property which is deprecated since Tomcat 8.

      Environment:
      Liferay 6.2.x with Tomcat 8.5.57

      Steps to reproduce:

      1. Deploy Liferay 6.2 on Tomcat 8.5.57
      2. Start the bundle.
      3. Deploy the attached portlet (MVCPortlet6210-portlet-6.2.10.1.war).

      Actual result:
      During the deployment of the portlet, the following warning appears in the logs:

      WARNING [localhost-startStop-2] org.apache.catalina.startup.SetContextPropertiesRule.begin [SetContextPropertiesRule]{Context} Setting property 'antiJARLocking' to 'true' did not find a matching property.

      Expected result:
      There are no warnings in the logs related to the 'antiJARLocking' property.

      Tested on:
      6.2.x @65d7a800f1a57b232a127bdcaefb876a9de469f9

      We found that during deployment, a context.xml file is added to the portlet's META-INF folder, which contains the following:

      <Context
       antiJARLocking="true"
       antiResourceLocking="true"
      />

      This file comes from the portal-impl.jar module:

      {tomcat}/webapps/ROOT/web-inf/lib/portal-impl.jar/com/liferay/portal/deploy/dependencies/context.xml

      If the property is removed from the context.xml file in the portal-impl.jar module, and the custom portlet is redeployed, the warning does not appear anymore.

        Attachments

          Activity

            People

            Assignee:
            eric.yan Eric Yan
            Reporter:
            peter.petrekanics Peter Petrekanics
            Participants of an Issue:
            Recent user:
            Peter Petrekanics
            Engineering Assignee:
            Peter Petrekanics
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Days since last comment:
              13 weeks, 2 days ago

                Packages

                Version Package