[ 
https://issues.apache.org/jira/browse/NIFI-3142?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15903660#comment-15903660
 ] 

ASF GitHub Bot commented on NIFI-3142:
--------------------------------------

Github user jfrazee commented on the issue:

    https://github.com/apache/nifi/pull/1290
  
    @klinvill Do you know what version of NiFi you were running against? The 
NumberFormatException error was fixed in 1.1.0 by 
[NIFI-2887](https://issues.apache.org/jira/browse/NIFI-2887) and a relevant 
segment added to the unit tests. 
[NIFI-3142](https://issues.apache.org/jira/browse/NIFI-3142) suggests you ran 
into this against 1.0.0, and given the time you reported it at NiFi 1.1.0 had 
only been out for a short time so I wouldn't be surprised if you hadn't 
upgraded yet. Is this right? As for the NPE, I'll see if I can reproduce it but 
I don't know if I exactly follow the scenario. Is it an unrecognized segment 
name as in it's just bad HL7 or a segment that's unsupported for a particular 
version?


> ExtractHL7Attributes processor does not route to REL_FAILURE for an exception 
> other than an HL7Exception
> --------------------------------------------------------------------------------------------------------
>
>                 Key: NIFI-3142
>                 URL: https://issues.apache.org/jira/browse/NIFI-3142
>             Project: Apache NiFi
>          Issue Type: Bug
>          Components: Extensions
>    Affects Versions: 1.0.0
>            Reporter: Kirby Linvill
>            Priority: Minor
>              Labels: easyfix
>
> The ExtractHL7Attribute processor will not route a flowfile to REL_FAILURE if 
> processing the flow file throws an exception that is not an HL7Exception. 
> This bug is a result of the try catch block in the onTrigger method. It is 
> easily fixed by changing the catch block to catch a throwable object. Change
> {noformat} 
> try {
>     ...
> } catch (final HL7Exception e) {
>     getLogger().error("Failed to extract attributes from {} due to {}", new 
> Object[]{flowFile, e}, e);
>     session.transfer(flowFile, REL_FAILURE);
>     return;
> }
> {noformat} 
> to 
> {noformat} 
> try {
>     ...
> } catch (final Throwable t) {
>     getLogger().error("Failed to extract attributes from {} due to {}", new 
> Object[]{flowFile, t}, t);
>     session.transfer(flowFile, REL_FAILURE);
>     return;
> }
> {noformat} 



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to