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

ASF subversion and git services commented on NIFI-13819:
--------------------------------------------------------

Commit e399750abeef7b8099d63c49ad326f859069dfee in nifi's branch 
refs/heads/support/nifi-1.x from dan-s1
[ https://gitbox.apache.org/repos/asf?p=nifi.git;h=e399750abe ]

NIFI-13819 Set Row Number and Sheet Name for ExcelReader Exceptions  (#9334)

Signed-off-by: David Handermann <[email protected]>

> Provide row number and sheet name if ExcelReader throws exception when it 
> fails to convert a value
> --------------------------------------------------------------------------------------------------
>
>                 Key: NIFI-13819
>                 URL: https://issues.apache.org/jira/browse/NIFI-13819
>             Project: Apache NiFi
>          Issue Type: Improvement
>            Reporter: Daniel Stieglitz
>            Assignee: Daniel Stieglitz
>            Priority: Minor
>             Fix For: 2.0.0-M5
>
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> While testing NIFI-13726 it was noticed when using the ExcelReader configured 
> with the "Use Starting Row" strategy that the file failed but the message was 
> {code:java}
> org.apache.nifi.processor.exception.ProcessException: Could not parse 
> incoming data
>        ....
> Caused by: org.apache.nifi.serialization.MalformedRecordException: Read next 
> Record from Excel XLSX failed
>         at 
> org.apache.nifi.excel.ExcelRecordReader.nextRecord(ExcelRecordReader.java:86)
>         at 
> org.apache.nifi.serialization.RecordReader.nextRecord(RecordReader.java:50)
>         at 
> java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
>         at java.base/java.lang.reflect.Method.invoke(Method.java:580)
>        ....
> Caused by: java.lang.NumberFormatException: For input string: ""
>         at 
> java.base/java.lang.NumberFormatException.forInputString(NumberFormatException.java:67)
>         at java.base/java.lang.Integer.parseInt(Integer.java:672)
>         at java.base/java.lang.Integer.parseInt(Integer.java:778)
>         at 
> org.apache.nifi.serialization.record.util.DataTypeUtils.toInteger(DataTypeUtils.java:1468)
>         at 
> org.apache.nifi.serialization.record.util.DataTypeUtils.convertType(DataTypeUtils.java:211)
>         at 
> org.apache.nifi.serialization.record.util.DataTypeUtils.convertType(DataTypeUtils.java:174)
> {code}
> which does not point to which row the ExcelReader failed on. It would be 
> helpful to include in the exception message which row the reader failed on.
>    



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to