Legacy Knowledge Base
Published Sep. 10, 2025

Using the "ehcache.multi.vm.config.location" property, the "java.lang.NullPointerException: Configuration Path is Null" error occured

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

  • After configuring the "ehcache.multi.vm.config.location" property in portal-ext.properties, the following errors occurred.
ERROR [SCR Component Actor][ROOT:47] bundle com.liferay.portal.cache.ehcache.impl:4.0.33 (439)[com.liferay.portal.cache.ehcache.internal.MultiVMEhcachePortalCacheManager(2201)] : The activate method has thrown an exception
java.lang.NullPointerException: Configuration path is null
at com.liferay.portal.cache.ehcache.internal.configurator.EhcachePortalCacheManagerConfigurator.getConfigurationObjectValuePair(EhcachePortalCacheManagerConfigurator.java:59) ~[?:?]

ERROR [SystemExecutorServiceUtil-5][ROOT:47] bundle com.liferay.portal.cache.ehcache.impl:4.0.33 (439)[com.liferay.portal.cache.ehcache.internal.MultiVMEhcachePortalCacheManager(2201)] : The activate method has thrown an exception
java.lang.NullPointerException: Configuration path is null

WARN [SystemExecutorServiceUtil-5][ROOT:53] bundle com.liferay.portal.cache.impl:4.0.33 (1371)[com.liferay.portal.cache.internal.MultiVMPoolImpl(6303)] : Could not get service from ref {com.liferay.portal.kernel.cache.PortalCacheManager}={component.id=2201, component.name=com.liferay.portal.cache.ehcache.internal.MultiVMEhcachePortalCacheManager, service.id=2549, portal.cache.manager.name=MULTI_VM_PORTAL_CACHE_MANAGER, service.scope=bundle, service.bundleid=439}

Environment

  • Quarterly Release

Resolution

  • Reason for an error occured:
    • The issue arises due to the incorrect path "/Liferay_Home/liferay-multi-vm.xml" and the use of the same file name, "liferay-multi-vm.xml".
  • Reason for not using the same file name:

    • By default, in Liferay's portal.properties (located within the portal-impl.jar), the following properties are configured:
    # Set the classpath to the location of the Ehcache config file for internal
    # caches. Edit the file specified in the property
    # "ehcache.multi-vm.config.location" to enable clustered cache.
    #
    # Env: LIFERAY_EHCACHE_PERIOD_MULTI_PERIOD_VM_PERIOD_CONFIG_PERIOD_LOCATION
    # Env: LIFERAY_EHCACHE_PERIOD_SINGLE_PERIOD_VM_PERIOD_CONFIG_PERIOD_LOCATION
    #
    ehcache.single.vm.config.location=/ehcache/liferay-single-vm.xml
    ehcache.multi.vm.config.location=/ehcache/liferay-multi-vm.xml
    • The file name liferay-multi-vm.xml is already in use and is present within the following location: osgi/portal/com.liferay.portal.cache.ehcache.impl.jar in the ehcache folder.
    • This conflict causes the issue. Changing the file name ensures there is no overlap with the default configurations provided by Liferay.
    • Additionally, it is a good practice to modify both the package/directory name and the file name to make it clearer and more obvious what changes were made.
  • To resolve the error follow the below steps:
      1. Create a Folder:
        • Navigate to the classes directory at the path: tomcat/webapps/ROOT/WEB-INF/classes.
        • Create a folder such as 'cache' in the "classes" folder
      2. Modify the File Name:
        • Rename the file from liferay-multi-vm.xml to a different name, such as module-multi-vm.xml and paste it into a location: tomcat/webapps/ROOT/WEB-INF/classes/cache.
      3. Add the below property with the correct location using the relative path:
        • Example: ehcache.multi.vm.config.location=cache/module-multi-vm.xml
        • Note: Use the relative path shown in the above example instead of the absolute one.
      4. Restart the server:
        1. Delete the $LIFERAY_HOME/OSGi/state folder.
        2. Delete the $LIFERAY_HOME/Work folder
        3. Delete the tomcat-version/temp folder
        4. Delete the tomcat-version/work folder

      Note:

      1) Try the above action in a lower environment first, if all works well according to you, then only move to the production environment at your discretion.
      2) Keep the backup of your existing environment before performing the above action.
      3) Perform these operations in application server downtime, because these steps require the restart of the server.

Additional Information

Did this article resolve your issue ?

Legacy Knowledge Base