You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "Koji Kawamura (JIRA)" <ji...@apache.org> on 2017/07/07 09:11:00 UTC

[jira] [Created] (NIFI-4162) PutSQL batch update error message should include the cause

Koji Kawamura created NIFI-4162:
-----------------------------------

             Summary: 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)