[
https://issues.apache.org/jira/browse/SOLR-1549?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13449018#comment-13449018
]
Alexander Kanarsky commented on SOLR-1549:
------------------------------------------
James, just to clarify the ration behind the patch - in my case it was a MySQL
problem of 'zero' timestamps, when the TIMESTAMP field with zero value was
causing this exception:
SQLException: Cannot convert value '0000-00-00 00:00:00' from column 5 to
TIMESTAMP.
Clearly a data data issue with valid SQL; so I did the patch to skip a few
documents with such timestamps rather than fail the whole full import. However,
I learned later that MySQL connector has a 'zeroDateTimeBehavior' connection
option that could be set to 'convertToNull' rater than default 'exception' so
this solved the problem as well.
But I agree that there are very few cases like that when you might want to
continue in case of SqlException.
> SqlEntityProcessor does not recognize onError attribute
> -------------------------------------------------------
>
> Key: SOLR-1549
> URL: https://issues.apache.org/jira/browse/SOLR-1549
> Project: Solr
> Issue Type: Improvement
> Components: contrib - DataImportHandler
> Affects Versions: 1.4, 1.5
> Reporter: Sascha Szott
> Assignee: James Dyer
> Priority: Minor
> Attachments: SOLR-1549.patch
>
>
> Unfortunately, the SqlEntityProcessor does not recognize the value of an
> entity's onError attribute in DIH's data config file. Therefore, in cases
> where SQL exceptions are thrown somewhere inside the constructor of
> ResultSetIterators (which is an inner class of JdbcDataSource), Solr's import
> exits immediately, even though onError is set to continue or skip.
> In my opinion, use cases exist that will profit from database related
> exception handling inside of Solr (e.g., in cases where the existence of
> certain database tables or views is not predictable).
--
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: [email protected]
For additional commands, e-mail: [email protected]