question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

VaultConfiguration - Class Loading Issue

See original GitHub issue

Getting what appears to be a class loading issue when using the latest spring cloud + boot + spring-cloud-starter-vault-config versions:


***************************\nAPPLICATION FAILED TO START\n***************************\n\nDescription:\n\nAn attempt
 was made to call a method that does not exist. The attempt was made from the following location:\n\n 
 org.springframework.cloud.vault.config.VaultConfiguration.createSslConfiguration(VaultConfiguration.java:101)\n\nThe 
 following method did not exist:
 
 'void org.springframework.vault.support.SslConfiguration.<init>(org.springframework.vault.support.SslConfiguration$KeyStoreConfiguration,org.springframework.vault.support.SslConfiguration$KeyStoreConfiguration, java.util.List, java.util.List)'
 
 The method's class, org.springframework.vault.support.SslConfiguration, is available from the following locations:
 
 jar:file:/app.jar!/BOOT-INF/lib/spring-vault-core-2.3.0.jar!/org/springframework/vault/support/SslConfiguration.class

 The class hierarchy was loaded from the following locations:
 
 org.springframework.vault.support.SslConfiguration: 
 jar:file:/app.jar!/BOOT-INF/lib/spring-vault-core-2.3.0.jar!/\n\n\nAction:\n\nCorrect the classpath of your application
 so that it contains a single, compatible version of org.springframework.vault.support.SslConfiguration

Spring Cloud: 2020.0.2 Spring Boot: 2.4.4 Gradle config for vault (org.springframework.cloud:spring-cloud-vault-config:3.0.2 right now): runtimeOnly 'org.springframework.cloud:spring-cloud-starter-vault-config'

I cannot provide our application, unfortunately. I am confused as to why this constructor is being called, since I am unable to find a version of org.springframework.vault.support.SslConfiguration that has this constructor.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
alexduchcommented, Mar 31, 2021

Hi,

I just ran into the same issue, and it turns out the spring-cloud-config-dependencies BOM (version 3.0.3) defines the version of the spring-vault-core as 2.3.0. That BOM is imported in the spring-cloud-dependencies BOM (version 2020.0.2) before the spring-cloud-vault-dependencies BOM (version 3.0.2), and seems to take precedence.

Is this worth reporting in the spring cloud config repository, or at the spring cloud dependencies level ?

Edit: I just found out it was already tackled in spring-cloud/spring-cloud-config#1841

0reactions
mp911decommented, Mar 22, 2021

Thanks a lot for the update.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Spring valut config not loading - Stack Overflow
You didn't specify you Vault properties, but judging by the error you are missing the spring.cloud.vault.host configuration.
Read more >
Getting Started | Vault Configuration - Spring
This guide walks you through the process of using Spring Cloud Vault to build an application that retrieves its configuration properties from HashiCorp ......
Read more >
Secure Secrets With Spring Cloud Config and Vault
Storing secrets in your code is a bad idea. Learn how to use Spring Cloud Config and HashiCorp Vault to make your app...
Read more >
Java Application Demo | Vault - HashiCorp Developer
The demo Java application leverages the Spring Cloud Vault library to communicate with Vault. In the TransitConverter class, the convertToDatabaseColumn method ...
Read more >
An Intro to Spring Cloud Vault - Baeldung
In general, migrating to Vault is a very simple process: just add the required libraries and add a few extra configuration properties to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found