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

Wrong error logged on DIH connection problem

    XMLWordPrintableJSON

Details

    Description

      If I try a full import via DIH from a mysql server which is firewalled or down, I get a misleading error message (see below, only SQL statement shortened).

      I don't know Java very well, but I suspect the connection error is catched, the connection handle is null, which in turn leads to the null pointer exception at the end of the stack trace.

      Full Import failed:java.lang.RuntimeException: java.lang.RuntimeException: org.apache.solr.handler.dataimport.DataImportHandlerException: Unable to execute query: SELECT SenderID, ProviderID, `Name`, RefSenderID, CameraURL, ChatURL, [.....] Processing Document # 1
      	at org.apache.solr.handler.dataimport.DocBuilder.execute(DocBuilder.java:271)
      	at org.apache.solr.handler.dataimport.DataImporter.doFullImport(DataImporter.java:416)
      	at org.apache.solr.handler.dataimport.DataImporter.runCmd(DataImporter.java:480)
      	at org.apache.solr.handler.dataimport.DataImporter$1.run(DataImporter.java:461)
      Caused by: java.lang.RuntimeException: org.apache.solr.handler.dataimport.DataImportHandlerException: Unable to execute query: SELECT SenderID, ProviderID, `Name`, RefSenderID, CameraURL, ChatURL, [...] Processing Document # 1
      	at org.apache.solr.handler.dataimport.DocBuilder.buildDocument(DocBuilder.java:417)
      	at org.apache.solr.handler.dataimport.DocBuilder.doFullDump(DocBuilder.java:330)
      	at org.apache.solr.handler.dataimport.DocBuilder.execute(DocBuilder.java:232)
      	... 3 more
      Caused by: org.apache.solr.handler.dataimport.DataImportHandlerException: Unable to execute query: SELECT SenderID, ProviderID, `Name`, RefSenderID, CameraURL, ChatURL, [...] Processing Document # 1
      	at org.apache.solr.handler.dataimport.DataImportHandlerException.wrapAndThrow(DataImportHandlerException.java:71)
      	at org.apache.solr.handler.dataimport.JdbcDataSource$ResultSetIterator.<init>(JdbcDataSource.java:283)
      	at org.apache.solr.handler.dataimport.JdbcDataSource.getData(JdbcDataSource.java:240)
      	at org.apache.solr.handler.dataimport.JdbcDataSource.getData(JdbcDataSource.java:44)
      	at org.apache.solr.handler.dataimport.SqlEntityProcessor.initQuery(SqlEntityProcessor.java:59)
      	at org.apache.solr.handler.dataimport.SqlEntityProcessor.nextRow(SqlEntityProcessor.java:73)
      	at org.apache.solr.handler.dataimport.EntityProcessorWrapper.nextRow(EntityProcessorWrapper.java:243)
      	at org.apache.solr.handler.dataimport.DocBuilder.buildDocument(DocBuilder.java:476)
      	at org.apache.solr.handler.dataimport.DocBuilder.buildDocument(DocBuilder.java:415)
      	... 5 more
      Caused by: java.lang.NullPointerException
      	at org.apache.solr.handler.dataimport.JdbcDataSource$ResultSetIterator.<init>(JdbcDataSource.java:271)
      	... 12 more
      
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              thomaslamy Thomas Lamy
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: