title: springboot Upgrade from 2.3.5.RELEASE to 2.4.1- ClassNotFoundException: org.springframework.boot.context.properties.ConfigurationBeanFactoryMetadata
body: <p>I am trying to upgrade my kotlin - gradle project from springboot version 2.3.5.RELEASE to 2.4.1. Looks like there is version mismatch between springboot-2.4.1 and sping-cloud-Hoxton.SR9.</p>
  <p><strong>build.gradle.kts snippet</strong></p>
  <pre><code>    plugins {
          id(&quot;org.springframework.boot&quot;) version &quot;2.4.1&quot;
          id(&quot;io.spring.dependency-management&quot;) version &quot;1.0.10.RELEASE&quot;
      
          kotlin(&quot;jvm&quot;) version &quot;1.4.10&quot;
      kotlin(&quot;plugin.spring&quot;) version &quot;1.4.10&quot;
      kotlin(&quot;plugin.jpa&quot;) version &quot;1.4.10&quot;
      kotlin(&quot;plugin.serialization&quot;) version &quot;1.4.10&quot;
  
      idea
      }
      
      group = &quot;com.xxx&quot;
      version = &quot;&quot;
      java.sourceCompatibility = JavaVersion.VERSION_11
      extra[&quot;springCloudVersion&quot;] = &quot;Hoxton.SR9&quot;
      
      val resilience4jVersion = &quot;1.3.1&quot;
      val queryDslVersion = &quot;4.4.0&quot;
      val springCloudVersion = &quot;Hoxton.SR9&quot;
      val cucumberVersion = &quot;6.7.0&quot;
      val camundaVersion = &quot;7.14.0&quot;
      var jacocoVersion = &quot;0.8.5&quot;
  
  dependencyManagement {
      imports {
          mavenBom(&quot;org.springframework.cloud:spring-cloud-dependencies:$springCloudVersion&quot;)
      }
  }
  
  
  dependencies {
  
      implementation(&quot;org.springframework.cloud:spring-cloud-starter-openfeign&quot;)
      implementation(&quot;org.javers:javers-core:5.12.0&quot;)
      implementation(&quot;io.jsonwebtoken:jjwt-api:0.11.1&quot;)
      implementation(&quot;io.jsonwebtoken:jjwt-impl:0.11.1&quot;)
      implementation(&quot;io.jsonwebtoken:jjwt-jackson:0.11.1&quot;)
  
  
      implementation(&quot;org.springframework.boot:spring-boot-starter-mail&quot;)
      implementation(&quot;org.springframework.boot:spring-boot-starter-data-jpa&quot;)
      implementation(&quot;org.springframework.boot:spring-boot-starter-web&quot;)
      implementation(&quot;org.springframework.boot:spring-boot-starter-hateoas&quot;)
      // Aop dependency
      implementation(&quot;org.springframework.boot:spring-boot-starter-aop&quot;)
      implementation(&quot;com.fasterxml.jackson.module:jackson-module-kotlin&quot;)
      implementation(&quot;org.jetbrains.kotlin:kotlin-reflect&quot;)
      implementation(&quot;org.jetbrains.kotlin:kotlin-stdlib-jdk8&quot;)
      implementation(&quot;org.apache.httpcomponents:httpclient:4.5.12&quot;)
  
      implementation(&quot;org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.5&quot;)
  
      implementation(&quot;com.fasterxml.jackson.core:jackson-databind:2.10.3&quot;)
      implementation(&quot;com.fasterxml.jackson.core:jackson-core:2.10.3&quot;)
      implementation(&quot;org.springframework.boot:spring-boot-starter-actuator&quot;)
      implementation(&quot;javax.xml.bind:jaxb-api:2.3.0&quot;)
  
      implementation(&quot;org.springframework.boot:spring-boot-starter-integration&quot;)
      implementation(&quot;org.springframework.kafka:spring-kafka&quot;)
      implementation(&quot;org.springframework.integration:spring-integration-kafka:3.3.0.RELEASE&quot;)
      implementation(&quot;org.springframework.boot:spring-boot-starter-validation&quot;)
      implementation(&quot;org.springframework.boot:spring-boot-starter-security&quot;)
      implementation(&quot;org.springframework:spring-tx&quot;)
  
      runtimeOnly(&quot;mysql:mysql-connector-java&quot;)
      implementation(&quot;org.mariadb.jdbc:mariadb-java-client:2.6.0&quot;)
  
      implementation(&quot;org.springdoc:springdoc-openapi-kotlin:1.4.3&quot;)
      implementation(&quot;org.springdoc:springdoc-openapi-ui:1.4.3&quot;)
      implementation(&quot;org.springdoc:springdoc-openapi-hateoas:1.4.3&quot;)
  }
  </code></pre>
  <p>When I run the springboot application, I get following exception. The application was working properly before upgrading to the newer version.</p>
  <pre><code>org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'configurationPropertiesBeans' defined in class path resource [org/springframework/cloud/autoconfigure/ConfigurationPropertiesRebinderAutoConfiguration.class]: Post-processing of merged bean definition failed; nested exception is java.lang.IllegalStateException: Failed to introspect Class [org.springframework.cloud.context.properties.ConfigurationPropertiesBeans] from ClassLoader [jdk.internal.loader.ClassLoaders$AppClassLoader@16f65612]
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:586) ~[spring-beans-5.3.2.jar:5.3.2]
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:531) ~[spring-beans-5.3.2.jar:5.3.2]
      at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335) ~[spring-beans-5.3.2.jar:5.3.2]
      at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-5.3.2.jar:5.3.2]
      at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333) ~[spring-beans-5.3.2.jar:5.3.2]
      at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:213) ~[spring-beans-5.3.2.jar:5.3.2]
      at org.springframework.context.support.PostProcessorRegistrationDelegate.registerBeanPostProcessors(PostProcessorRegistrationDelegate.java:244) ~[spring-context-5.3.2.jar:5.3.2]
      at org.springframework.context.support.AbstractApplicationContext.registerBeanPostProcessors(AbstractApplicationContext.java:767) ~[spring-context-5.3.2.jar:5.3.2]
      at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:572) ~[spring-context-5.3.2.jar:5.3.2]
      at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:767) ~[spring-boot-2.4.1.jar:2.4.1]
      at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:759) ~[spring-boot-2.4.1.jar:2.4.1]
      at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:426) ~[spring-boot-2.4.1.jar:2.4.1]
      at org.springframework.boot.SpringApplication.run(SpringApplication.java:326) ~[spring-boot-2.4.1.jar:2.4.1]
      at org.springframework.boot.builder.SpringApplicationBuilder.run(SpringApplicationBuilder.java:144) ~[spring-boot-2.4.1.jar:2.4.1]
      at org.springframework.cloud.bootstrap.BootstrapApplicationListener.bootstrapServiceContext(BootstrapApplicationListener.java:212) ~[spring-cloud-context-2.2.6.RELEASE.jar:2.2.6.RELEASE]
      at org.springframework.cloud.bootstrap.BootstrapApplicationListener.onApplicationEvent(BootstrapApplicationListener.java:117) ~[spring-cloud-context-2.2.6.RELEASE.jar:2.2.6.RELEASE]
      at org.springframework.cloud.bootstrap.BootstrapApplicationListener.onApplicationEvent(BootstrapApplicationListener.java:74) ~[spring-cloud-context-2.2.6.RELEASE.jar:2.2.6.RELEASE]
      at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:172) ~[spring-context-5.3.2.jar:5.3.2]
      at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:165) ~[spring-context-5.3.2.jar:5.3.2]
      at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:139) ~[spring-context-5.3.2.jar:5.3.2]
      at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:127) ~[spring-context-5.3.2.jar:5.3.2]
      at org.springframework.boot.context.event.EventPublishingRunListener.environmentPrepared(EventPublishingRunListener.java:82) ~[spring-boot-2.4.1.jar:2.4.1]
      at org.springframework.boot.SpringApplicationRunListeners.lambda$environmentPrepared$2(SpringApplicationRunListeners.java:63) ~[spring-boot-2.4.1.jar:2.4.1]
      at java.base/java.util.ArrayList.forEach(ArrayList.java:1540) ~[na:na]
      at org.springframework.boot.SpringApplicationRunListeners.doWithListeners(SpringApplicationRunListeners.java:117) ~[spring-boot-2.4.1.jar:2.4.1]
      at org.springframework.boot.SpringApplicationRunListeners.doWithListeners(SpringApplicationRunListeners.java:111) ~[spring-boot-2.4.1.jar:2.4.1]
      at org.springframework.boot.SpringApplicationRunListeners.environmentPrepared(SpringApplicationRunListeners.java:62) ~[spring-boot-2.4.1.jar:2.4.1]
      at org.springframework.boot.SpringApplication.prepareEnvironment(SpringApplication.java:362) ~[spring-boot-2.4.1.jar:2.4.1]
      at org.springframework.boot.SpringApplication.run(SpringApplication.java:320) ~[spring-boot-2.4.1.jar:2.4.1]
      at org.springframework.boot.SpringApplication.run(SpringApplication.java:1309) ~[spring-boot-2.4.1.jar:2.4.1]
      at org.springframework.boot.SpringApplication.run(SpringApplication.java:1298) ~[spring-boot-2.4.1.jar:2.4.1]
      at com.xxxx.MyApplicationKt.main(MyApplication.kt:22) ~[main/:na]
  Caused by: java.lang.IllegalStateException: Failed to introspect Class [org.springframework.cloud.context.properties.ConfigurationPropertiesBeans] from ClassLoader [jdk.internal.loader.ClassLoaders$AppClassLoader@16f65612]
      at org.springframework.util.ReflectionUtils.getDeclaredMethods(ReflectionUtils.java:481) ~[spring-core-5.3.2.jar:5.3.2]
      at org.springframework.util.ReflectionUtils.doWithLocalMethods(ReflectionUtils.java:321) ~[spring-core-5.3.2.jar:5.3.2]
      at org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor.buildPersistenceMetadata(PersistenceAnnotationBeanPostProcessor.java:417) ~[spring-orm-5.3.2.jar:5.3.2]
      at org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor.findPersistenceMetadata(PersistenceAnnotationBeanPostProcessor.java:388) ~[spring-orm-5.3.2.jar:5.3.2]
      at org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor.postProcessMergedBeanDefinition(PersistenceAnnotationBeanPostProcessor.java:335) ~[spring-orm-5.3.2.jar:5.3.2]
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyMergedBeanDefinitionPostProcessors(AbstractAutowireCapableBeanFactory.java:1100) ~[spring-beans-5.3.2.jar:5.3.2]
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:583) ~[spring-beans-5.3.2.jar:5.3.2]
      ... 31 common frames omitted
  Caused by: java.lang.NoClassDefFoundError: org/springframework/boot/context/properties/ConfigurationBeanFactoryMetadata
      at java.base/java.lang.Class.getDeclaredMethods0(Native Method) ~[na:na]
      at java.base/java.lang.Class.privateGetDeclaredMethods(Class.java:3166) ~[na:na]
      at java.base/java.lang.Class.getDeclaredMethods(Class.java:2309) ~[na:na]
      at org.springframework.util.ReflectionUtils.getDeclaredMethods(ReflectionUtils.java:463) ~[spring-core-5.3.2.jar:5.3.2]
      ... 37 common frames omitted
  Caused by: java.lang.ClassNotFoundException: org.springframework.boot.context.properties.ConfigurationBeanFactoryMetadata
      at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581) ~[na:na]
      at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178) ~[na:na]
      at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522) ~[na:na]
      ... 41 common frames omitted
  </code></pre>
  <p>Please help me solving this issue.</p>