Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-15764

fix possible NPE on Elasticsearch indexing

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 5.9.6-SNAPSHOT
    • Fix Version/s: 5.8.0-HF25, 6.0
    • Component/s: Elasticsearch
    • Tags:
    • Sprint:
      Sprint RepoTeam 5.9.5-2

      Description

      Creating a document then deleting can create case where the indexing command is treated after the document has been deleted.
      This raise a NPE in the json serialization

      15:42:58,259 ERROR [AbstractWork] Exception during work: IndexingWorker(, Progress(?%, ?/0), null)
      org.nuxeo.ecm.core.api.ClientException: Unable to create index request for Document eaf90f8c-daa3-431f-bb13-05b92497b83b
      at org.nuxeo.elasticsearch.core.ElasticSearchIndexingImpl.buildEsIndexingRequest(ElasticSearchIndexingImpl.java:291)
      at org.nuxeo.elasticsearch.core.ElasticSearchIndexingImpl.processIndexCommand(ElasticSearchIndexingImpl.java:193)
      at org.nuxeo.elasticsearch.core.ElasticSearchIndexingImpl.indexNow(ElasticSearchIndexingImpl.java:180)
      at org.nuxeo.elasticsearch.ElasticSearchComponent.indexNow(ElasticSearchComponent.java:329)
      at org.nuxeo.elasticsearch.work.IndexingWorker.doIndexingWork(IndexingWorker.java:66)
      at org.nuxeo.elasticsearch.work.AbstractIndexingWorker.work(AbstractIndexingWorker.java:67)
      at org.nuxeo.ecm.core.work.AbstractWork.runWorkWithTransaction(AbstractWork.java:351)
      at org.nuxeo.ecm.core.work.AbstractWork.runWorkWithTransactionAndCheckExceptions(AbstractWork.java:312)
      at org.nuxeo.ecm.core.work.AbstractWork.run(AbstractWork.java:280)
      at org.nuxeo.ecm.core.work.WorkHolder.run(WorkHolder.java:52)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      at java.lang.Thread.run(Thread.java:745)
      Caused by: java.lang.NullPointerException
      at org.nuxeo.ecm.automation.jaxrs.io.documents.JsonESDocumentWriter.writeDoc(JsonESDocumentWriter.java:60)
      at org.nuxeo.ecm.automation.jaxrs.io.documents.JsonESDocumentWriter.writeESDocument(JsonESDocumentWriter.java:157)
      at org.nuxeo.elasticsearch.core.ElasticSearchIndexingImpl.buildEsIndexingRequest(ElasticSearchIndexingImpl.java:284)
      ... 12 more
      

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: