Lillie Kittredge created NIFI-9048:
--------------------------------------
Summary: PutFile throws NullPointerException writing to a drive
that is not mapped
Key: NIFI-9048
URL: https://issues.apache.org/jira/browse/NIFI-9048
Project: Apache NiFi
Issue Type: Bug
Components: Core Framework
Affects Versions: 1.11.4
Environment: windows
Reporter: Lillie Kittredge
Repro:
# create a PutFile processor that writes successfully to a directory on a
mapped drive
# change it to write to a nonexistant mapped drive, or remove the user's
permissions to the mapped drive, or run nifi from an elevated prompt so it runs
in to this problem (which is what I ran into in production)
[https://docs.microsoft.com/en-us/troubleshoot/windows-client/networking/mapped-drives-not-available-from-elevated-command]
Actual result:
{code:java}
Line 91780: 2021-08-12 22:26:11,841 ERROR [Timer-Driven Process Thread-27]
o.a.nifi.processors.standard.PutFile
PutFile[id=01721038-e867-1898-09d7-7a52f0b72473] Penalizing
StandardFlowFileRecord[uuid=c7017b89-8f83-4016-b18a-fccfa857504f,claim=,offset=0,name=RF.JOB.QUE.UPDATE.RAPPER_69569_19582,size=0]
and transferring to failure due to java.lang.NullPointerException:
java.lang.NullPointerException Line 91780: 2021-08-12 22:26:11,841 ERROR
[Timer-Driven Process Thread-27] o.a.nifi.processors.standard.PutFile
PutFile[id=01721038-e867-1898-09d7-7a52f0b72473] Penalizing
StandardFlowFileRecord[uuid=c7017b89-8f83-4016-b18a-fccfa857504f,claim=,offset=0,name=RF.JOB.QUE.UPDATE.RAPPER_69569_19582,size=0]
and transferring to failure due to java.lang.NullPointerException:
java.lang.NullPointerException{code}
I wasn't able to get a stack trace out of it.
Expected:
An error message that indicates that the drive is not found. When writing to
the root of the bad drive instead of a directory, you get "java.io.IOError:
java.io.IOException: Unable to get working directory of drive 'X'" which is
much better, if we could get the same error when there's a directory that would
be preferable.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)