Legacy Knowledge Base
Published Jul. 2, 2025

web content can not be displayed on the left pane with Elasticsearch NullPointerException in log

Written By

Emma Liu

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

  • No web content is displayed either on the left pane or through the web content display widget with the following NullPointerException in log
29/12/2021 06:30:18,799 ERROR [default task-476][ElasticsearchIndexSearcher:165] java.lang.NullPointerException
java.lang.NullPointerException
at com.liferay.portal.search.elasticsearch7.internal.search.engine.adapter.search.SearchSearchResponseAssemblerImpl.setCount(SearchSearchResponseAssemblerImpl.java:163)
at com.liferay.portal.search.elasticsearch7.internal.search.engine.adapter.search.SearchSearchResponseAssemblerImpl.assemble(SearchSearchResponseAssemblerImpl.java:75)
at com.liferay.portal.search.elasticsearch7.internal.search.engine.adapter.search.SearchSearchRequestExecutorImpl.execute(SearchSearchRequestExecutorImpl.java:71)
at com.liferay.portal.search.elasticsearch7.internal.search.engine.adapter.search.ElasticsearchSearchRequestExecutor.executeSearchRequest(ElasticsearchSearchRequestExecutor.java:59)
at com.liferay.portal.search.engine.adapter.search.SearchSearchRequest.accept(SearchSearchRequest.java:45)
at com.liferay.portal.search.engine.adapter.search.SearchSearchRequest.accept(SearchSearchRequest.java:34)
at com.liferay.portal.search.elasticsearch7.internal.search.engine.adapter.ElasticsearchSearchEngineAdapterImpl.execute(ElasticsearchSearchEngineAdapterImpl.java:103)
at com.liferay.portal.search.elasticsearch7.internal.ElasticsearchIndexSearcher.search(ElasticsearchIndexSearcher.java:127)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

Environment

  • Liferay DXP 7.3

Resolution

  • The NullPointerException is related to the Elasticsearch 7 system settings.
  • To resolve this, go to Control Panel -> System Settings -> Elasticsearch 7 page, and check the Track Total Hits​is checkbox.

 

Did this article resolve your issue ?

Legacy Knowledge Base