Legacy Knowledge Base
Published Jul. 2, 2025

Unable to reindex the search as "Resource" option under Server Administration is blank

Written By

Sivakumar Perumal

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

  • The "Resource" option (Control Panel → Configuration → Server Administration → Resource) is blank due to which "Execute Reindex all searches" is not possible and the below error is observed on the server console.

    ERROR [default task-98][IncludeTag:128] Current URL /group/control_panel/manage?p_p_id=com_liferay_server_admin_web_portlet_ServerAdminPortlet&p_p_lifecycle=0&p_p_state=maximized&p_p_mode=view&_com_liferay_server_admin_web_portlet_ServerAdminPortlet_mvcRenderCommandName=%2Fserver_admin%2Fview&_com_liferay_server_admin_web_portlet_ServerAdminPortlet_tabs1=resources&_com_liferay_server_admin_web_portlet_ServerAdminPortlet_tabs2= generates exception: java.lang.NullPointerException
    java.lang.NullPointerException
     at com.liferay.portal.kernel.backgroundtask.display.BaseBackgroundTaskDisplay.getBackgroundTaskStatusAttributeLong(BaseBackgroundTaskDisplay.java:133)
     at com.liferay.portal.search.internal.background.task.display.ReindexBackgroundTaskDisplay.getPercentage(ReindexBackgroundTaskDisplay.java:37)
     at com.liferay.portal.kernel.backgroundtask.display.BaseBackgroundTaskDisplay.hasPercentage(BaseBackgroundTaskDisplay.java:77)
     at org.apache.jsp.resources_jsp._jspService(resources_jsp:900)
     at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:111)
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
     at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:411)
     at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:473)
     at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:377)
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)

Environment

  • Liferay DXP 7.0

Resolution

  • "Resource" option will show blank when there is some data present in the lock_ and backgroundtask table related to reindexing and clearing the same would help to access the Resource option.
  • Steps to clear the data present in both tables:
    Go to Control Panel > Configurations > Server Administration > Script, paste the below groovy script one by one and execute.

    a) Remove the reindex lock entry using the following groovy script:

    com.liferay.portal.lock.service.LockLocalServiceUtil.deleteLock(long lockId)
    out.println(Deleted Lock Entry);
    Replace the lockId with the respective Id present in the database.

    b) Remove the reindex BackgroundTask entry using following groovy script:

    com.liferay.portal.background.task.service.BackgroundTaskLocalServiceUtil.deleteBackgroundTask(long backgroundTaskId)
    out.println(Deleted BackgroundTask Entry);

    Replace the backgroundTaskId with the respective Id present in the database.

Additional information

Important Note: Taking a complete back up of the environment before doing any changes would help if anything unexpected happens.

Did this article resolve your issue ?

Legacy Knowledge Base