You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "Ruchit Mathur (Jira)" <ji...@apache.org> on 2022/09/23 11:20:00 UTC

[jira] [Created] (NIFI-10536) Getting java.lang.LinkageError when integrating Nifi with Hashicorp Vault

Ruchit Mathur created NIFI-10536:
------------------------------------

             Summary: Getting java.lang.LinkageError when integrating Nifi with Hashicorp Vault
                 Key: NIFI-10536
                 URL: https://issues.apache.org/jira/browse/NIFI-10536
             Project: Apache NiFi
          Issue Type: Bug
          Components: Tools and Build
    Affects Versions: 1.16.1
            Reporter: Ruchit Mathur


Hello,

We configured Nifi with Hashicorp Vault using Encrypt Configuration Tool as mentioned in official Docs. We were able to add Sensitive Properties (Keystore Passwords and Sensitive Key) in our Vault KV Path, but after Restarting Nifi we encountered following errors:-

Please note we are not encountering this Error in Nifi version 1.15.3.

After version 1.15.3 we are getting this error in all Releases.

 
{code:java}
Caused by: java.lang.LinkageError: loader constraint violation: when resolving method 'void org.springframework.http.client.HttpComponentsClientHttpRequestFactory.<init>(org.apache.http.client.HttpClient)' the class loader org.apache.nifi.property.protection.loader.PropertyProtectionURLClassLoader @69c335c4 of the current class, org/springframework/vault/client/ClientHttpRequestFactoryFactory$HttpComponents, and the class loader org.apache.nifi.nar.NarClassLoader @5792c08c for the method's defining class, org/springframework/http/client/HttpComponentsClientHttpRequestFactory, have different Class objects for the type org/apache/http/client/HttpClient used in the signature (org.springframework.vault.client.ClientHttpRequestFactoryFactory$HttpComponents is in unnamed module of loader org.apache.nifi.property.protection.loader.PropertyProtectionURLClassLoader @69c335c4, parent loader org.eclipse.jetty.webapp.WebAppClassLoader @6d4502ca; org.springframework.http.client.HttpComponentsClientHttpRequestFactory is in unnamed module of loader org.apache.nifi.nar.NarClassLoader @5792c08c, parent loader org.apache.nifi.nar.NarClassLoader @46e190ed)
 at org.springframework.vault.client.ClientHttpRequestFactoryFactory$HttpComponents.usingHttpComponents(ClientHttpRequestFactoryFactory.java:333)
 at org.springframework.vault.client.ClientHttpRequestFactoryFactory.create(ClientHttpRequestFactoryFactory.java:130)
 at org.apache.nifi.vault.hashicorp.StandardHashiCorpVaultCommunicationService.<init>(StandardHashiCorpVaultCommunicationService.java:59)
 at org.apache.nifi.properties.AbstractHashiCorpVaultSensitivePropertyProvider.<init>(AbstractHashiCorpVaultSensitivePropertyProvider.java:43)
 at org.apache.nifi.properties.HashiCorpVaultKeyValueSensitivePropertyProvider.<init>(HashiCorpVaultKeyValueSensitivePropertyProvider.java:31)
 at org.apache.nifi.properties.StandardSensitivePropertyProviderFactory.getProvider(StandardSensitivePropertyProviderFactory.java:230)
 at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)
 at java.base/java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:992)
 at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509)
 at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
 at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:921)
 at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
 at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:682)
 at org.apache.nifi.properties.StandardSensitivePropertyProviderFactory.getSupportedProviders(StandardSensitivePropertyProviderFactory.java:152)
 at org.apache.nifi.properties.NiFiPropertiesLoader.load(NiFiPropertiesLoader.java:164)
 at org.apache.nifi.properties.NiFiPropertiesLoader.load(NiFiPropertiesLoader.java:190)
 at org.apache.nifi.properties.NiFiPropertiesLoader.loadDefault(NiFiPropertiesLoader.java:215)
 at org.apache.nifi.properties.NiFiPropertiesLoader.loadDefaultWithKeyFromBootstrap(NiFiPropertiesLoader.java:103)
 at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
 at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 at java.base/java.lang.reflect.Method.invoke(Method.java:568)
 at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154)
 ... 124 common frames omitted
2022-09-23 15:04:15,770 INFO [Thread-0] org.apache.nifi.NiFi Application Server shutdown started
{code}
 



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