Issue
- User encounters numerous warning messages regarding the property 'antiJarLocking' when running Liferay 6.2 and upgrading Tomcat 7.0 to Tomcat 8.5 :
org.apache.catalina.startup.SetContextPropertiesRule.begin [SetContextPropertiesRule]{Context} Setting property 'antiJARLocking' to 'true' did not find a matching property.
Environment
- Liferay Portal 6.2
Resolution
- There are two ways to resolve the issue:
- First is to manually delete the antiJARLocking="true" property in all of the below files using these commands:
sed -i '/antiJARLocking="true"/d' $TOMCAT_DIR/webapps/oauth-portlet/META-INF/context.xml
sed -i '/antiJARLocking="true"/d' $TOMCAT_DIR/webapps/sync-web/META-INF/context.xml
sed -i '/antiJARLocking="true"/d' $TOMCAT_DIR/webapps/marketplace-portlet/META-INF/context.xml
sed -i '/antiJARLocking="true"/d' $TOMCAT_DIR/webapps/calendar-portlet/META-INF/context.xml
sed -i '/antiJARLocking="true"/d' $TOMCAT_DIR/webapps/kaleo-web/META-INF/context.xml
sed -i '/antiJARLocking="true"/d' $TOMCAT_DIR/webapps/opensocial-portlet/META-INF/context.xml
sed -i '/antiJARLocking="true"/d' $TOMCAT_DIR/webapps/web-form-portlet/META-INF/context.xml
sed -i '/antiJARLocking="true"/d' $TOMCAT_DIR/webapps/resources-importer-web/META-INF/context.xml
sed -i '/antiJARLocking="true"/d' $TOMCAT_DIR/webapps/notifications-portlet/META-INF/context.xml
sed -i '/antiJARLocking="true"/d' $TOMCAT_DIR/webapps/kaleo-designer-portlet/META-INF/context.xml
sed -i '/antiJARLocking="true"/d' $TOMCAT_DIR/webapps/sync-admin-portlet/META-INF/context.xml
sed -i '/antiJARLocking="true"/d' $TOMCAT_DIR/webapps/kaleo-forms-portlet/META-INF/context.xml - Second and easier way is to create a support ticket asking to get a hotfix for LPS-127995 that would automatically delete the antiJarLocking = "true" property from context.xml file, everytime a LPKG file is deployed.
- First is to manually delete the antiJARLocking="true" property in all of the below files using these commands:
Additional Information
- antiJARLocking is an attribute in Tomcat 7, which has been removed in Tomcat 8.
- Issue is encountered because Tomcat 8 does not use this property.
- For further reference, please see that the Tomcat 7 context configuration specifies antiJARLocking, while the Tomcat 8 documentation does not. The Tomcat 7 docs specifically mention that:
antiJARLockingis a subset ofantiResourceLockingand therefore, to prevent duplicate work and possible issues, only one of these attributes should be set totrueat any one time.