Issue
- In the application display templates, whenever try to create an asset publisher template, the below error appears on the UI:
- The error appears in the Liferay logs as well:
ERROR [WebContainer : 13][LiferayMethodExceptionEventHandler:54] Unable to execute method processMax {exception=com.liferay.portal.kernel.portlet.PortletContainerException: com.ibm.websphere.servlet.error.ServletErrorReport: java.lang.NoClassDefFoundError: javax.servlet.http.Cookie, className=com.liferay.portal.layoutconfiguration.util.velocity.TemplateProcessor}'
Environment
- Liferay DXP 7.1
Resolution
- The above error appears based on the shared file library configuration. Follow the below steps to configure the shared library properly:
- The following files are required to install Liferay DXP on the WebSphere application server and are available from the Help Center.
1. DXP WAR file
2. OSGi Dependencies ZIP file
3. Dependencies ZIP file (DXP 7.3 and earlier)
Now, create the liferay_shared_libraries directory at[Install Location]/WebSphere/AppServer/profiles/your-profile/
and add the following liferay-dxp-dependencies-[version].zip: Unzip this file and place its contents in the liferay_shared_libraries directory.
Note: Exclude the step to copy the above dependencies on the [Install Location]/WebSphere/AppServer/lib/ext folder.
-
Navigate to
[Install Location]/WebSphere/AppServer/profiles/your-profile/ - Create directory:
app_shared_libraries - Move
portlet.jarfrom[Install Location]/WebSphere/AppServer/lib/extintoapp_shared_libraries - Follow the steps from using a server associated shared library Make sure to choose Classes loaded with local class loader first (parent_Last)
- Save and restart the server