Skip to content

NPE Encountered While Loading Elasticsearch Entities During Application Startup #651

@puru-khedre

Description

@puru-khedre

Issue:

On Moqui start by ./gradlew run, I attempt to load the Elasticsearch entities by setting startup-add-missing="true", but it results in an NPE. After investigating, I found that the failure happens because Moqui’s elasticFacade is not yet initialized at the time of loading these entities.

Root Cause:

Moqui requires the elasticFacade to be initialized in order to load the Elasticsearch entities, but this facade is not initialized at the point where the entities are being loaded. Specifically, the elasticFacade is initialized after the postFacadeInit() call, but the entities are loaded before that, leading to the NPE.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions