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

One bad document title can prevent Solr from indexing other documents

    XMLWordPrintable

Details

    • High
    • Unknown
    • N/A
    • N/A

    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

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

              Dates

                Created:
                Updated:
                Resolved: