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

NPE in 'fulltext/extract' management API when fulltext is disabled

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 2023.0, 2021.33
    • Fix Version/s: None
    • Component/s: Bulk

      Description

      When fulltext is disabled (nuxeo.vcs.fulltext.disabled=true), a NPE occurs when triggering a binary fulltext extraction with endpoint /management/fulltext/extract.

      How to reproduce::

      • disable fulltext with the following line in nuxeo.conf:
        nuxeo.vcs.fulltext.disabled=true
        
      • start a Nuxeo instance (>= 2021.33 or >= 2023.0)
      • trigger a fulltext binary extraction with the following commands:
        NXQL="SELECT * FROM Document WHERE ecm:path='/default-domain'"
        curl -X POST -su Administrator:Administrator 'http://localhost:8080/nuxeo/api/v1/management/fulltext/extract' --data-urlencode "query=$NXQL" --data-urlencode "force=true"
        

      Expected result: no extraction is performed as the result of the NXQL query is a document with no main blob
      Actual result: a NPE occurs:

      2024-07-02T16:02:49,896 WARN  [bulk/extractBinaryFulltextPool-00,in:0,inCheckpoint:0,out:0,lastRead:1719961154853,lastTimer:0,wm:0,loop:2,rebalance assigned] [org.nuxeo.lib.stream.computation.AbstractComputation] Computation: bulk/extractBinaryFulltext fails last record: bulk-extractBinaryFulltext-01:+1, retrying ...
      java.lang.NullPointerException: null
      	at org.nuxeo.ecm.core.storage.action.ExtractBinaryFulltextAction$ExtractBinaryFulltextComputation.compute(ExtractBinaryFulltextAction.java:97) ~[nuxeo-core-storage-2021.55.4.jar:?]
      	at org.nuxeo.ecm.core.bulk.action.computation.AbstractBulkComputation.lambda$processBatchOfDocuments$3(AbstractBulkComputation.java:151) ~[nuxeo-core-bulk-2021.55.4.jar:?]
      	at org.nuxeo.runtime.transaction.TransactionHelper.lambda$runInTransaction$4(TransactionHelper.java:642) ~[nuxeo-runtime-jtajca-2021.55.4.jar:?]
      	at org.nuxeo.runtime.transaction.TransactionHelper.runInTransaction(TransactionHelper.java:675) ~[nuxeo-runtime-jtajca-2021.55.4.jar:?]
      

      When fullext is disabled, object fulltextConfiguration is null.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              vdutat Vincent Dutat
              Participants:
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: