Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-9945

One bad document title can prevent Solr from indexing other documents

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 5.2.2
    • Fix Version/s: 5.4-rc-1, 5.2.4
    • Component/s: Display, Search - Solr
    • Labels:
      None
    • Development Priority:
      High
    • Difficulty:
      Unknown
    • Documentation:
      N/A
    • Documentation in Release Notes:
      N/A
    • Similar issues:

      Description

      If you put the following in a document title:

      $services.display.title($doc, {'displayerHint': 'default'})
      

      it will trigger a recursive display loop which will prevent Solr from indexing other documents from then on. The log will be full of this:

      2014-01-27 11:05:23,388 [XWiki Solr index thread] ERROR o.x.s.s.i.DefaultSolrIndexer   - Failed to process entry [INDEX Object_property xwiki:XWiki.mchamp^xwiki:XWiki.XWikiUsers[0].department] 
      org.xwiki.search.solr.internal.api.SolrIndexerException: Failed to get input Solr document for entity 'Object_property xwiki:XWiki.mchamp^xwiki:XWiki.XWikiUsers[0].department'
      	at org.xwiki.search.solr.internal.metadata.AbstractSolrMetadataExtractor.getSolrDocument(AbstractSolrMetadataExtractor.java:121) ~[xwiki-platform-search-solr-api-5.2.2.jar:na]
      	at org.xwiki.search.solr.internal.DefaultSolrIndexer.getSolrDocument(DefaultSolrIndexer.java:486) [xwiki-platform-search-solr-api-5.2.2.jar:na]
      	at org.xwiki.search.solr.internal.DefaultSolrIndexer.processBatch(DefaultSolrIndexer.java:399) [xwiki-platform-search-solr-api-5.2.2.jar:na]
      	at org.xwiki.search.solr.internal.DefaultSolrIndexer.runInternal(DefaultSolrIndexer.java:374) [xwiki-platform-search-solr-api-5.2.2.jar:na]
      	at com.xpn.xwiki.util.AbstractXWikiRunnable.run(AbstractXWikiRunnable.java:131) [xwiki-platform-legacy-oldcore-5.2.2.jar:na]
      	at java.lang.Thread.run(Thread.java:662) [na:1.6.0_31]
      java.lang.NullPointerException: null
      

      The NPE is caused because the execution.getContext() returns null. So the recursive display loop leads to a state where the ExecutionContext is not set on the Execution.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                mflorea Marius Dumitru Florea
                Reporter:
                mflorea Marius Dumitru Florea
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: