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

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

这篇文章有帮助吗?
0 人中有 0 人觉得有帮助