Description
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:
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)
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:
extensionManager.discoverExtensions(loadedBundles);
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.
Attachments
Issue Links
- links to