David Handermann created NIFI-10505:
---------------------------------------

             Summary: HashiCorp Vault Sensitive Property Provider Fails on Start
                 Key: NIFI-10505
                 URL: https://issues.apache.org/jira/browse/NIFI-10505
             Project: Apache NiFi
          Issue Type: Bug
    Affects Versions: 1.17.0
            Reporter: David Handermann
            Assignee: David Handermann


After configuring HashiCorp Vault as the Sensitive Property Provider for 
application properties using encrypt-config.sh, startup fails while attempting 
to retrieve values.

The problem appears to be related to HTTP client library selection, 
specifically with Apache HttpComponents classes.

{noformat}
Caused by: org.springframework.beans.BeanInstantiationException: Failed to 
instantiate [org.apache.nifi.util.NiFiProperties]: Factory method 
'loadDefaultWithKeyFromBootstrap' threw exception; nested exception is 
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 
@2e243122 of the current class, 
org/springframework/vault/client/ClientHttpRequestFactoryFactory$HttpComponents,
 and the class loader org.apache.nifi.nar.NarClassLoader @7161457 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 
@2e243122, parent loader org.eclipse.jetty.webapp.WebAppClassLoader @78861d9e; 
org.springframework.http.client.HttpComponentsClientHttpRequestFactory is in 
unnamed module of loader org.apache.nifi.nar.NarClassLoader @7161457, parent 
loader org.apache.nifi.nar.NarClassLoader @56cc9f29)
        at 
org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:185)
        at 
org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:653)
        ... 124 common frames omitted
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 
@2e243122 of the current class, 
org/springframework/vault/client/ClientHttpRequestFactoryFactory$HttpComponents,
 and the class loader org.apache.nifi.nar.NarClassLoader @7161457 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 
@2e243122, parent loader org.eclipse.jetty.webapp.WebAppClassLoader @78861d9e; 
org.springframework.http.client.HttpComponentsClientHttpRequestFactory is in 
unnamed module of loader org.apache.nifi.nar.NarClassLoader @7161457, parent 
loader org.apache.nifi.nar.NarClassLoader @56cc9f29)
        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)
{noformat}




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

Reply via email to