Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-2680

NullPointerException when doing a delta-import and no pk is specified on sub-entity

    XMLWordPrintableJSON

Details

    Description

      my working sub element:

       
      <entity name="jobexperience" 
      	pk="ID"
      	query="select * from jobexperience je where je.PROFESSIONAL_ID = '${user.USERID_FT}'"
      	deltaQuery="select je.ID as ID from jobexperience je where je.LASTMODIFIEDDATE > '${dataimporter.last_index_time}'"
      	parentDeltaQuery="select je.PROFESSIONAL_ID as ID from jobexperience je where je.ID=${jobexperience.ID}" 
      />
      

      my failing sub element (resulting in NullPointerException):

       
      <entity name="jobexperience"
      	query="select * from jobexperience je where je.PROFESSIONAL_ID = '${user.USERID_FT}'"
      	deltaQuery="select je.ID as ID from jobexperience je where je.LASTMODIFIEDDATE > '${dataimporter.last_index_time}'"
      	parentDeltaQuery="select je.PROFESSIONAL_ID as ID from jobexperience je where je.ID=${jobexperience.ID}" 
      />
      

      Stacktrace:

      SEVERE: Delta Import Failed
      java.lang.NullPointerException
      	at org.apache.solr.handler.dataimport.DocBuilder.findMatchingPkColumn(DocBuilder.java:830)
      	at org.apache.solr.handler.dataimport.DocBuilder.collectDelta(DocBuilder.java:891)
      	at org.apache.solr.handler.dataimport.DocBuilder.collectDelta(DocBuilder.java:870)
      	at org.apache.solr.handler.dataimport.DocBuilder.doDelta(DocBuilder.java:284)
      	at org.apache.solr.handler.dataimport.DocBuilder.execute(DocBuilder.java:178)
      	at org.apache.solr.handler.dataimport.DataImporter.doDeltaImport(DataImporter.java:374)
      	at org.apache.solr.handler.dataimport.DataImporter.runCmd(DataImporter.java:413)
      	at org.apache.solr.handler.dataimport.DataImporter$1.run(DataImporter.java:392)
      

      Attachments

        Issue Links

          Activity

            People

              arafalov Alexandre Rafalovitch
              drijkhof Daniel Rijkhof
              Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: