Legacy Knowledge Base
Published Jul. 2, 2025

Unable to save Instance Settings modifications

Written By

Sorin Pop

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

  • When I make some configuration change in instance settings and click save, the page breaks (menus are gone) and the changes are not stored.
  • In the logs I see a stacktrace is thrown, with parts like these:
       ERROR [http-nio-8080-exec-4][PortletServlet:112] javax.portlet.PortletException: com.liferay.portal.kernel.exception.ModelListenerException: java.lang.NullPointerException
javax.portlet.PortletException: com.liferay.portal.kernel.exception.ModelListenerException: java.lang.NullPointerException
at com.liferay.portal.kernel.portlet.bridges.mvc.BaseMVCActionCommand.processAction(BaseMVCActionCommand.java:69)
Caused by: java.lang.NullPointerException
at com.liferay.portal.model.impl.UserImpl.getGroupId(UserImpl.java:512)
at com.liferay.calendar.internal.model.listener.UserModelListener.onAfterUpdate(UserModelListener.java:68)
... 231 more

Environment

  • DXP 7.1
  • DXP 7.2

Resolution

  • This is caused by an invalid row in the calendarresource table, pertaining to the hidden default user liferay creates when it first starts up. We currently do not know how this row was inserted. According to the current knowledge, normal portal operation and functionality cannot cause the creation of such a row.
  • The row can be found with a select like this:
SELECT * FROM CalendarResource
WHERE classNameId = (SELECT classNameId FROM ClassName_ WHERE value = 'com.liferay.portal.kernel.model.User')
AND classPK = (SELECT userId FROM User_ WHERE emailAddress = 'default@liferay.com');
  • The solution is to remove that row, with a Groovy script like this:
import com.liferay.calendar.service.CalendarResourceLocalServiceUtil;

CalendarResourceLocalServiceUtil.deleteCalendarResource(10101275);

where 10101275 should be replaced with whatever is the calendarResourceId returned by the SELECT query above. Make sure to try it first on a pre-production environment, and also make a database backup before, to stay on the safe side. If you are unsure or encounter any difficulties why applying this solution, please open a ticket with Support and refer to this article.

Did this article resolve your issue ?

Legacy Knowledge Base