Uploaded image for project: 'Sakai'
  1. Sakai
  2. SAK-41050

NPE in SiteElasticSearchIndexBuilder.rebuildSiteIndex

    Details

    • Type: Bug
    • Status: CLOSED
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 12.4
    • Fix Version/s: 12.6, 19.0, 20.0 [Tentative]
    • Component/s: Search
    • Labels:
      None
    • 19 status:
      Resolved
    • 12 status:
      Resolved
    • Test Plan:
      Hide

      Please add a Test Plan here.

      Show
      Please add a Test Plan here.

      Description

      03-Dec-2018 11:54:23.359 ERROR [[elasticsearch content indexer default]] org.sakaiproject.search.elasticsearch.SiteElasticSearchIndexBuilder.rebuildSiteIndex An exception occurred while rebuilding the index of 'b125e21b-daf6-4bde-bb99-27ef5a2c086d'
      java.lang.NullPointerException
              at org.sakaiproject.search.elasticsearch.SiteElasticSearchIndexBuilder.rebuildSiteIndex(SiteElasticSearchIndexBuilder.java:249)
              at org.sakaiproject.search.elasticsearch.SiteElasticSearchIndexBuilder$RebuildSiteTask.run(SiteElasticSearchIndexBuilder.java:314)
              at java.util.TimerThread.mainLoop(Timer.java:555)
              at java.util.TimerThread.run(Timer.java:505)
      
      247             for (final EntityContentProducer ecp : producers) {
      248
      249                 for (Iterator<String> i = ecp.getSiteContentIterator(siteId); i.hasNext(); ) {
      250
      251                     if (bulkRequest.numberOfActions() < bulkRequestSize) {
      252                         String reference = i.next();
      253
      254                         if (StringUtils.isNotBlank(ecp.getContent(reference))) {
      255                             //updating was causing issues without a _source, so doing delete and re-add
      256                             try {
      257                                 deleteDocument(ecp.getId(reference), ecp.getSiteId(reference));
      258                                 bulkRequest.add(prepareIndex(reference, ecp, false));
      259                                 numberOfDocs++;
      260                             } catch (Exception e) {
      261                                 getLog().error(e.getMessage(), e);
      262                             }
      263                         }
      264
      

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                ottenhoff Sam Ottenhoff
                Reporter:
                ottenhoff Sam Ottenhoff
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Git Source Code