[ 
https://issues.apache.org/jira/browse/SOLR-6599?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14176122#comment-14176122
 ] 

Anurag Sharma commented on SOLR-6599:
-------------------------------------

Thomas - Any steps to reproduce the issue locally?

> Wrong error logged on DIH connection problem
> --------------------------------------------
>
>                 Key: SOLR-6599
>                 URL: https://issues.apache.org/jira/browse/SOLR-6599
>             Project: Solr
>          Issue Type: Bug
>          Components: contrib - DataImportHandler
>    Affects Versions: 4.10.1
>         Environment: Debian Squeeze, Oracle-java-8, mysql-connector-5.1.28
>            Reporter: Thomas Lamy
>            Priority: Minor
>              Labels: difficulty-medium, impact-low
>
> 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.
> {code}
> 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
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to