You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Amandeep Saini (JIRA)" <ji...@apache.org> on 2012/12/05 00:12:57 UTC
[jira] [Created] (SOLR-4145) Getting a NPE when the result set is
null
Amandeep Saini created SOLR-4145:
------------------------------------
Summary: Getting a NPE when the result set is null
Key: SOLR-4145
URL: https://issues.apache.org/jira/browse/SOLR-4145
Project: Solr
Issue Type: Bug
Affects Versions: 4.0
Reporter: Amandeep Saini
Re: org.apache.solr.handler.dataimport.JdbcDataSource
In line 250, resultSet.getMetaData() is called. However, if the resultSet is null, a NPE is thrown.
In line 254, the null check is done (if (resultSet == null))
The contents of line 250 should occur after the null check.
I am getting the NPE after trying to delete some data in my DB using the DIH. The DIH is probably not meant for that but it would benefit me if it worked and I don't see a big change in the code in order to do it.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
[jira] [Resolved] (SOLR-4145) Getting a NPE when the result set is
null
Posted by "James Dyer (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SOLR-4145?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
James Dyer resolved SOLR-4145.
------------------------------
Resolution: Duplicate
Assignee: James Dyer
I agree that the code seems to have been written with the intention that JdbcDataSource should allow entities do non-selects and handle null resultsets. The use-case is understandable, in my opinion. This can be fixed with SOLR-3409.
> Getting a NPE when the result set is null
> -----------------------------------------
>
> Key: SOLR-4145
> URL: https://issues.apache.org/jira/browse/SOLR-4145
> Project: Solr
> Issue Type: Bug
> Affects Versions: 4.0
> Reporter: Amandeep Saini
> Assignee: James Dyer
>
> Re: org.apache.solr.handler.dataimport.JdbcDataSource
> In line 250, resultSet.getMetaData() is called. However, if the resultSet is null, a NPE is thrown.
> In line 254, the null check is done (if (resultSet == null))
> The contents of line 250 should occur after the null check.
> I am getting the NPE after trying to delete some data in my DB using the DIH. The DIH is probably not meant for that but it would benefit me if it worked and I don't see a big change in the code in order to do it.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org