[ 
https://issues.apache.org/jira/browse/NIFI-14280?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Peter Turcsanyi updated NIFI-14280:
-----------------------------------
    Status: Patch Available  (was: Open)

> NullPointerException in ListGoogleDrive
> ---------------------------------------
>
>                 Key: NIFI-14280
>                 URL: https://issues.apache.org/jira/browse/NIFI-14280
>             Project: Apache NiFi
>          Issue Type: Bug
>            Reporter: Peter Turcsanyi
>            Assignee: Peter Turcsanyi
>            Priority: Major
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> Google Drive may store files externally and the File size attribute is not 
> available for these files.
> {code:java}
> Size: -
> Storage used: 0 bytes (This file is stored on a third-party server)
> {code}
> E.g. Google Apps Script files are stored in this way.
> {{ListGoogleDrive}} tries to retrieve the size information, as it is 
> mandatory in {{ListableEntity}}, and it leads to NPE.
> {code}
> 2025-02-19 15:16:47,534 ERROR [Timer-Driven Process Thread-8] 
> o.a.n.p.gcp.drive.ListGoogleDrive 
> ListGoogleDrive[id=6be3950d-e493-318f-6cdd-fe87de4e591b] Processing halted: 
> yielding [1 sec]
> java.lang.NullPointerException: Cannot invoke "java.lang.Long.longValue()" 
> because the return value of 
> "com.google.api.services.drive.model.File.getSize()" is null
>       at 
> org.apache.nifi.processors.gcp.drive.ListGoogleDrive.performListing(ListGoogleDrive.java:279)
>       at 
> org.apache.nifi.processor.util.list.AbstractListProcessor.listByNoTracking(AbstractListProcessor.java:460)
>       at 
> org.apache.nifi.processor.util.list.AbstractListProcessor.onTrigger(AbstractListProcessor.java:426)
>       at 
> org.apache.nifi.processor.AbstractProcessor.onTrigger(AbstractProcessor.java:27)
>       at 
> org.apache.nifi.controller.StandardProcessorNode.onTrigger(StandardProcessorNode.java:1272)
>       at 
> org.apache.nifi.controller.tasks.ConnectableTask.invoke(ConnectableTask.java:244)
>       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)
> 2025-02-19 15:16:47,535 WARN [Timer-Driven Process Thread-8] 
> o.a.n.controller.tasks.ConnectableTask Processing halted: uncaught exception 
> in Component [ListGoogleDrive[id=6be3950d-e493-318f-6cdd-fe87de4e591b]]
> java.lang.NullPointerException: Cannot invoke "java.lang.Long.longValue()" 
> because the return value of 
> "com.google.api.services.drive.model.File.getSize()" is null
>       at 
> org.apache.nifi.processors.gcp.drive.ListGoogleDrive.performListing(ListGoogleDrive.java:279)
>       at 
> org.apache.nifi.processor.util.list.AbstractListProcessor.listByNoTracking(AbstractListProcessor.java:460)
>       at 
> org.apache.nifi.processor.util.list.AbstractListProcessor.onTrigger(AbstractListProcessor.java:426)
>       at 
> org.apache.nifi.processor.AbstractProcessor.onTrigger(AbstractProcessor.java:27)
>       at 
> org.apache.nifi.controller.StandardProcessorNode.onTrigger(StandardProcessorNode.java:1272)
>       at 
> org.apache.nifi.controller.tasks.ConnectableTask.invoke(ConnectableTask.java:244)
>       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}



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

Reply via email to