spring-cloud / spring-cloud-vault

Configuration Integration with HashiCorp Vault
http://cloud.spring.io/spring-cloud-vault/
Apache License 2.0
274 stars 152 forks source link

NoClassDefFoundError after upgrading to Spring Boot 2.4.0 #540

Closed pavankjadda closed 3 years ago

pavankjadda commented 3 years ago

Describe the bug I recently upgraded my project to Spring Boot 2.4.0 and during start up I get the error

Caused by: java.lang.IllegalStateException: Failed to introspect Class [org.springframework.cloud.context.properties.ConfigurationPropertiesBeans] from ClassLoader [jdk.internal.loader.ClassLoaders$AppClassLoader@3654653b]

Caused by: java.lang.NoClassDefFoundError: org.springframework.boot.context.properties.ConfigurationBeanFactoryMetadata

I am using spring-cloud-starter-vault-config 2.2.6.RELEASE version

Sample Here is the Github project that reproduces it. Run the project to see the issue

spencergibb commented 3 years ago

Snapshots are already compatible with boot 2.4

pavankjadda commented 3 years ago

Thanks. When can we expect GA release?

spencergibb commented 3 years ago

https://github.com/spring-cloud/spring-cloud-release/milestones

pavankjadda commented 3 years ago

Okay, I tried using 3.0.0-M4 but still got same error

        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-vault-config</artifactId>
            <version>3.0.0-M4</version>
        </dependency>
spencergibb commented 3 years ago

M4 is not compatible either

pavankjadda commented 3 years ago

Is this the latest snapshot? Because IntelliJ can not find it

<dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-vault-config</artifactId>
            <version>3.0.0-SNAPSHOT</version>
        </dependency>
spencergibb commented 3 years ago

Yes, I can't say why intellij can't find it

pavankjadda commented 3 years ago

Okay, IntelliJ resolves the properties. But the properties are not being replaced during startup. Not sure if this is an issue with Spring Cloud Vault library or Spring Boot. The sample project can be found here

pavankjadda commented 3 years ago

After the dependencies resolved, I still have the issue. Please check StackOverFlow issue