[
https://issues.apache.org/jira/browse/NIFI-13235?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17846599#comment-17846599
]
ASF subversion and git services commented on NIFI-13235:
--------------------------------------------------------
Commit 35a7e8743279a444913c7307fbd1c85588dddee8 in nifi's branch
refs/heads/main from Bryan Bende
[ https://gitbox.apache.org/repos/asf?p=nifi.git;h=35a7e87432 ]
NIFI-13235 Corrected REST API Import Process Group ID Reference
Use the PG id from the entity because component may be null if current user
does not have READ permissions
This closes #8831
Signed-off-by: David Handermann <[email protected]>
> Import from registry to a PG without read permissions causes NPE
> ----------------------------------------------------------------
>
> Key: NIFI-13235
> URL: https://issues.apache.org/jira/browse/NIFI-13235
> Project: Apache NiFi
> Issue Type: Bug
> Affects Versions: 2.0.0-M2
> Reporter: Bryan Bende
> Priority: Minor
> Time Spent: 20m
> Remaining Estimate: 0h
>
> If you are inside a PG where you have WRITE permissions, but not READ
> permissions, and you import a new PG from a registry client, it results in an
> unexpected error page and an NPE in the logs:
> {code:java}
> 2024-05-14 13:41:46,946 ERROR [NiFi Web Server-139]
> o.a.nifi.web.api.config.ThrowableMapper An unexpected error has occurred:
> java.lang.NullPointerException: Cannot invoke
> "org.apache.nifi.web.api.dto.ProcessGroupDTO.getId()" because the return
> value of "org.apache.nifi.web.api.entity.ProcessGroupEntity.getComponent()"
> is null. Returning Internal Server Error response.
> java.lang.NullPointerException: Cannot invoke
> "org.apache.nifi.web.api.dto.ProcessGroupDTO.getId()" because the return
> value of "org.apache.nifi.web.api.entity.ProcessGroupEntity.getComponent()"
> is null
> at
> org.apache.nifi.web.api.ProcessGroupResource.lambda$createProcessGroup$18(ProcessGroupResource.java:1016)
> at
> org.apache.nifi.web.api.ApplicationResource.withWriteLock(ApplicationResource.java:691)
> at
> org.apache.nifi.web.api.ProcessGroupResource.createProcessGroup(ProcessGroupResource.java:988)
> {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)