Legacy Knowledge Base
Published Jul. 2, 2025

After installing Connector to Elasticsearch 6 from Marketplace, NullPointerExceptions are thrown

Written By

Adam Zsolnay

How To articles are not official guidelines or officially supporteddocumentation. They are community-contributed content and may not alwaysreflect the latest updates to Liferay DXP. We welcome your feedback toimprove How to articles!

While we make every effort to ensure this Knowledge Base is accurate, itmay not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with anyfeedback or concerns.

Legacy Article

You are viewing an article from our legacy "FastTrack"publication program, made available for informational purposes. Articlesin this program were published without a requirement for independentediting or verification and are provided "as is" withoutguarantee.

Before using any information from this article, independently verify itssuitability for your situation and project.

Issue

  • We installed Liferay Connector to Elasticsearch 6 from Liferay's Marketplace on fix pack 11 patch-level. Now that we moved to fix pack 12, we started to get the below exceptions:
    WARN [liferay/search_writer/SYSTEM_ENGINE-3][ProxyMessageListener:88] java.lang.NullPointerException
    at com.liferay.portal.search.elasticsearch6.internal.ElasticsearchIndexWriter.updateDocument(ElasticsearchIndexWriter.java:249)
    at sun.reflect.GeneratedMethodAccessor291.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)

    /*cut for brevity*/

Environment

  • Liferay DXP 7.1+
  • Connected to standalone Elasticsearch (supported version)

Resolution

  • Reason: In DXP 7.1+, Liferay Connector to Elasticsearch 6 is installed by default and updated through Liferay DXP Fix Packs. Using Liferay Marketplace to update the app on Liferay 7.1+ will cause an error, referring to the Marketplace app description.
  • Resolution (there are two ways):
    a) Replace the core osgi modules to the original ones
    b) Reinstall the portal from scratch
  • Resolution a) Replace the core OSGi modules to the original ones

    • Steps:

      1. Create a vanilla DXP 7.1 bundle patched with fix pack 11 to take the core modules from ('Source')

      2. Revert the Portal to fix pack 11 ('Target')

      3. Replace the core modules of Target to the core modules from Source in:

        LR_home/osgi/core
        LR_home/osgi/marketplace
        LR_home/osgi/target-platform
        LR_home/osgi/test
        LR_home/osgi/configs

        Mind keeping your custom configuration files in LR_home/osgi/configs.

      4. Patch your Portal with fix pack 12

Did this article resolve your issue ?

Legacy Knowledge Base