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

David Handermann commented on NIFI-16361:
-----------------------------------------

Thanks [~dstiegli1]. If it is a simple addition to an existing unit test, it 
could be worth adding, but otherwise I wouldn't add a brand new test just for 
something fixed in a newer library version.

> ExcelReader and SplitExcel fail on wrongly formatted cell.
> ----------------------------------------------------------
>
>                 Key: NIFI-16361
>                 URL: https://issues.apache.org/jira/browse/NIFI-16361
>             Project: Apache NiFi
>          Issue Type: Bug
>            Reporter: Philipp Korniets
>            Assignee: Daniel Stieglitz
>            Priority: Major
>         Attachments: numeric-empty-repro.xlsx
>
>
> {code:java}
> 2026-09-17 14:47:13,870 WARN [Timer-Driven Process Thread-4] 
> o.a.n.controller.tasks.ConnectableTask Processing halted: uncaught exception 
> in Component [SplitExcel[id=afd5a7ec-01a0-1000-1e4c-3db1dd039f6a]] 
> java.lang.NumberFormatException: empty String at 
> java.base/jdk.internal.math.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:1842)
>  at 
> java.base/jdk.internal.math.FloatingDecimal.parseDouble(FloatingDecimal.java:110)
>  at java.base/java.lang.Double.parseDouble(Double.java:792) at 
> com.github.pjfanning.xlsx.impl.NumberUtil.parseDouble(NumberUtil.java:10) at 
> com.github.pjfanning.xlsx.impl.StreamingCell.getNumericCellValue(StreamingCell.java:205)
>  at org.apache.poi.ss.util.CellUtil.copyCell(CellUtil.java:419) at 
> org.apache.nifi.processors.excel.SplitExcel.copyRows(SplitExcel.java:280) at 
> org.apache.nifi.processors.excel.SplitExcel.handleXSSF(SplitExcel.java:257) 
> at 
> org.apache.nifi.processors.excel.SplitExcel.lambda$onTrigger$0(SplitExcel.java:194)
>  at 
> org.apache.nifi.controller.repository.StandardProcessSession.read(StandardProcessSession.java:2859)
>  at 
> org.apache.nifi.controller.repository.WeakHashMapProcessSessionFactory$FactoryRetainingProcessSession.read(WeakHashMapProcessSessionFactory.java:260)
>  at 
> org.apache.nifi.processors.excel.SplitExcel.onTrigger(SplitExcel.java:191) at 
> org.apache.nifi.processor.AbstractProcessor.onTrigger(AbstractProcessor.java:27)
>  at 
> org.apache.nifi.controller.StandardProcessorNode.onTrigger(StandardProcessorNode.java:1293)
>  at 
> org.apache.nifi.controller.tasks.ConnectableTask.invoke(ConnectableTask.java:237)
>  at 
> org.apache.nifi.controller.scheduling.AbstractTimeBasedSchedulingAgent.lambda$doScheduleOnce$0(AbstractTimeBasedSchedulingAgent.java:59)
>  at org.apache.nifi.engine.FlowEngine.lambda$wrap$1(FlowEngine.java:105) at 
> java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:572)
>  at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317) at 
> java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
>  at 
> java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
>  at 
> java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
>  at java.base/java.lang.Thread.run(Thread.java:1583){code}
> AI Explanation:
> The execution path is:
> SplitExcel.copyRows()
> → CellUtil.copyCell()
> → sourceCell.getNumericCellValue()
> → NumberUtil.parseDouble("")
> → NumberFormatException
>  
> The attached workbook contains cells encoded like:
> <c s="29" t="n"><v/></c>
>  
>  
> That representation says “numeric cell,” but the value is an empty string. 
> Apache POI therefore requests a numeric value, and the streaming XLSX 
> implementation attempts:
> Double.parseDouble("")
>  
>  



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

Reply via email to