[
https://issues.apache.org/jira/browse/NIFI-6055?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16775396#comment-16775396
]
ASF subversion and git services commented on NIFI-6055:
-------------------------------------------------------
Commit 4b45e85327bfb47669c09cde0c59c58812365998 in nifi's branch
refs/heads/master from Bryan Bende
[ https://gitbox.apache.org/repos/asf?p=nifi.git;h=4b45e85 ]
NIFI-6055 Improving error handling during auto-loading of NARs and ensuring
only one Jetty NAR is loaded
NIFI-6056 Fixing cassandra bundle so nifi-mock is a test scoped and removing
incorrect usage of ProviderCreation exception from nifi-framework-api
This closes #3322.
Signed-off-by: Mark Payne <[email protected]>
> 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: 10m
> 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)