You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "Joseph Witt (JIRA)" <ji...@apache.org> on 2019/03/12 16:33:00 UTC

[jira] [Updated] (NIFI-6055) Improve error handling during auto-loading of NARs

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

Joseph Witt updated NIFI-6055:
------------------------------
    Fix Version/s: 1.9.1

> 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, 1.9.1
>
>          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)