[
https://issues.apache.org/jira/browse/NIFI-10505?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17605703#comment-17605703
]
ASF subversion and git services commented on NIFI-10505:
--------------------------------------------------------
Commit 6398c2deb73460dc6135f7ba9d8d35a7833ad2b3 in nifi's branch
refs/heads/main from David Handermann
[ https://gitbox.apache.org/repos/asf?p=nifi.git;h=6398c2deb7 ]
NIFI-10505 Removed unused HttpClient dependency from nifi-web-api
- Removing org.apache.httpcomponents:httpclient from nifi-web-api avoids
Linkage Errors with Sensitive Property Providers
Signed-off-by: Pierre Villard <[email protected]>
This closes #6423.
> 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
> Priority: Major
> Fix For: 1.18.0
>
> Time Spent: 10m
> Remaining Estimate: 0h
>
> 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)