[
https://issues.apache.org/jira/browse/NIFI-4162?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16077923#comment-16077923
]
ASF subversion and git services commented on NIFI-4162:
-------------------------------------------------------
Commit 50c364a793e8605f0b6f2e48ef5e0e08cfcf817d in nifi's branch
refs/heads/master from [~ijokarumawak]
[ https://git-wip-us.apache.org/repos/asf?p=nifi.git;h=50c364a ]
NIFI-4162: PutSQL batch update error message should include the cause
Signed-off-by: Pierre Villard <[email protected]>
This closes #1992.
> PutSQL batch update error message should include the cause
> ----------------------------------------------------------
>
> Key: NIFI-4162
> URL: https://issues.apache.org/jira/browse/NIFI-4162
> Project: Apache NiFi
> Issue Type: Bug
> Components: Extensions
> Affects Versions: 1.0.0
> Reporter: Koji Kawamura
> Assignee: Koji Kawamura
>
> When PutSQL executes SQL as batch mode and an exception is thrown, it logs
> following error message:
> {code}
> 2017-07-07 18:01:38,646 ERROR [Timer-Driven Process Thread-1]
> o.apache.nifi.processors.standard.PutSQL
> PutSQL[id=1c3d2a94-015d-1000-397a-250d18d9f4ad] Failed to update database due
> to a failed batch update. There were a total of 1 FlowFiles that failed, 0
> that succeeded, and 0 that were not execute and will be routed to retry;
> {code}
> It doesn't use the thrown Exception, so it's difficult for user to understand
> what caused the error. The exception contains useful information. If we
> logged the exception, user can see following log:
> {code}
> 2017-07-07 18:05:17,155 ERROR [Timer-Driven Process Thread-4]
> o.apache.nifi.processors.standard.PutSQL
> PutSQL[id=1c3d2a94-015d-1000-397a-250d18d9f4ad] Failed to update database due
> to a failed batch update, java.sql.BatchUpdateException: Duplicate entry '1'
> for key 'PRIMARY'. There were a total of 1 FlowFiles that failed, 0 that
> succeeded, and 0 that were not execute and will be routed to retry; :
> java.sql.BatchUpdateException: Duplicate entry '1' for key 'PRIMARY'
> {code}
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)