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

Mark Payne updated NIFI-6055:
-----------------------------
    Resolution: Fixed
        Status: Resolved  (was: Patch Available)

> Improve error handling during auto-loading of NARs
> --------------------------------------------------
>
>                 Key: NIFI-6055
>                 URL: https://issues.apache.org/jira/browse/NIFI-6055
>             Project: Apache NiFi
>          Issue Type: Improvement
>    Affects Versions: 1.9.0
>            Reporter: Bryan Bende
>            Assignee: Bryan Bende
>            Priority: Minor
>             Fix For: 1.10.0
>
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> If you copy in several NARs where one of them has a framework level extension 
> like an authorizers, repository, or state manager, it will produce an 
> exception like the following:
> {code:java}
> 2019-02-19 10:37:20,397 ERROR [NAR Auto-Loader] 
> org.apache.nifi.nar.NarAutoLoaderTask Error loading NARs due to: Attempt was 
> made to load org.apache.nifi.provenance.PersistentProvenanceRepository from 
> org.apache.nifi:nifi-provenance-repository-nar:1.9.0-SNAPSHOT but that class 
> name is already loaded/registered from 
> org.apache.nifi:nifi-provenance-repository-nar:1.9.0 and multiple versions 
> are not supported for this type
> java.lang.IllegalStateException: Attempt was made to load 
> org.apache.nifi.provenance.PersistentProvenanceRepository from 
> org.apache.nifi:nifi-provenance-repository-nar:1.9.0-SNAPSHOT but that class 
> name is already loaded/registered from 
> org.apache.nifi:nifi-provenance-repository-nar:1.9.0 and multiple versions 
> are not supported for this type
>         at 
> org.apache.nifi.nar.StandardExtensionDiscoveringManager.registerServiceClass(StandardExtensionDiscoveringManager.java:289)
>         at 
> org.apache.nifi.nar.StandardExtensionDiscoveringManager.loadExtensions(StandardExtensionDiscoveringManager.java:181)
>         at 
> org.apache.nifi.nar.StandardExtensionDiscoveringManager.discoverExtensions(StandardExtensionDiscoveringManager.java:127)
>         at 
> org.apache.nifi.nar.StandardNarLoader.load(StandardNarLoader.java:110)
>         at 
> org.apache.nifi.nar.NarAutoLoaderTask.run(NarAutoLoaderTask.java:128)
>         at java.lang.Thread.run(Thread.java:748){code}
> The exception itself is not an issue because it is correct that we don't 
> support multiple versions of these types of extensions.
> The issue is that during the auto-loading process we call discoverExtensions 
> on a set of bundles:
> {code:java}
> extensionManager.discoverExtensions(loadedBundles);{code}
> If the above exception happens during this call, it will bounce out and not 
> discover any other extensions that may still be available for loading.
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to