I was reading the code and it looks like it could throw an NPE if java.sql.Statement#execute() returns false which can happen if there are no results (although most drivers return an empty resultset instead):
if (stmt.execute(query)) { resultSet = stmt.getResultSet(); } LOG.trace("Time taken for sql :" + (System.currentTimeMillis() - start)); colNames = readFieldNames(resultSet.getMetaData()); Can you try using the debug mode and paste its response? On Thu, Dec 26, 2013 at 7:29 PM, PeterKerk <vettepa...@hotmail.com> wrote: > Solr 4.3.1 > > When I run the statement in MySQL Workbench or console the statement > executes successfully and returns 2 results. > > FYI: I placed the mysql-connector-java-5.1.27-bin.jar in the \lib folder. > > Also: it should not throw this error even when 0 results are returned right? > > > > -- > View this message in context: > http://lucene.472066.n3.nabble.com/org-apache-solr-handler-dataimport-DataImportHandlerException-Unable-to-execute-query-tp4108227p4108233.html > Sent from the Solr - User mailing list archive at Nabble.com. -- Regards, Shalin Shekhar Mangar.