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

Bryan Bende updated NIFI-10599:
-------------------------------
    Description: 
When creating the parent class loader hierarchy, the top most NAR ends up being 
in the chain twice, and one of the times it has a null NarArtifact. This 
doesn't impact generating the manifest for any of the NARs provided by NiFi 
because all of them have the Jetty NAR as a parent which doesn't actually 
provided any extensions, so the Jetty libs are just there twice.

It does however affect a standalone bundle where a controller service API NAR 
doesn't have a parent NAR. In this case the API interface can be loaded from 
the class loader which has a null NAR artifact and gets an NPE trying to 
produce the manifest.
{code:java}
Caused by: java.lang.NullPointerException
    at 
org.apache.nifi.extension.definition.extraction.ExtensionDefinitionFactory.processImplementedInterface
 (ExtensionDefinitionFactory.java:132)
    at 
org.apache.nifi.extension.definition.extraction.ExtensionDefinitionFactory.addProvidedServiceAPIs
 (ExtensionDefinitionFactory.java:102)
    at 
org.apache.nifi.extension.definition.extraction.ExtensionDefinitionFactory.getProvidedServiceAPIs
 (ExtensionDefinitionFactory.java:86)
    at 
org.apache.nifi.extension.definition.extraction.ExtensionDefinitionFactory.createExtensionDefinition
 (ExtensionDefinitionFactory.java:75)
    at 
org.apache.nifi.extension.definition.extraction.ExtensionDefinitionFactory.discoverExtensions
 (ExtensionDefinitionFactory.java:64)
    at org.apache.nifi.NarMojo.generateDocumentation (NarMojo.java:621)
    at org.apache.nifi.NarMojo.execute (NarMojo.java:511) {code}
An example to reproduce the issue is here:

[https://github.com/bbende/nifi-dependency-example]

 

> NAR plugin duplicates class loader dependencies during doc generation
> ---------------------------------------------------------------------
>
>                 Key: NIFI-10599
>                 URL: https://issues.apache.org/jira/browse/NIFI-10599
>             Project: Apache NiFi
>          Issue Type: Bug
>    Affects Versions: nifi-nar-maven-plugin-1.3.4
>            Reporter: Bryan Bende
>            Assignee: Bryan Bende
>            Priority: Major
>             Fix For: nifi-nar-maven-plugin-1.3.6
>
>
> When creating the parent class loader hierarchy, the top most NAR ends up 
> being in the chain twice, and one of the times it has a null NarArtifact. 
> This doesn't impact generating the manifest for any of the NARs provided by 
> NiFi because all of them have the Jetty NAR as a parent which doesn't 
> actually provided any extensions, so the Jetty libs are just there twice.
> It does however affect a standalone bundle where a controller service API NAR 
> doesn't have a parent NAR. In this case the API interface can be loaded from 
> the class loader which has a null NAR artifact and gets an NPE trying to 
> produce the manifest.
> {code:java}
> Caused by: java.lang.NullPointerException
>     at 
> org.apache.nifi.extension.definition.extraction.ExtensionDefinitionFactory.processImplementedInterface
>  (ExtensionDefinitionFactory.java:132)
>     at 
> org.apache.nifi.extension.definition.extraction.ExtensionDefinitionFactory.addProvidedServiceAPIs
>  (ExtensionDefinitionFactory.java:102)
>     at 
> org.apache.nifi.extension.definition.extraction.ExtensionDefinitionFactory.getProvidedServiceAPIs
>  (ExtensionDefinitionFactory.java:86)
>     at 
> org.apache.nifi.extension.definition.extraction.ExtensionDefinitionFactory.createExtensionDefinition
>  (ExtensionDefinitionFactory.java:75)
>     at 
> org.apache.nifi.extension.definition.extraction.ExtensionDefinitionFactory.discoverExtensions
>  (ExtensionDefinitionFactory.java:64)
>     at org.apache.nifi.NarMojo.generateDocumentation (NarMojo.java:621)
>     at org.apache.nifi.NarMojo.execute (NarMojo.java:511) {code}
> An example to reproduce the issue is here:
> [https://github.com/bbende/nifi-dependency-example]
>  



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

Reply via email to