wakingrufus
08/10/2025, 1:15 PMwakingrufus
08/10/2025, 1:15 PMCaused by: org.springframework.beans.factory.BeanDefinitionStoreException: Failed to process import candidates for configuration class [ExampleApplication]: kotlin/reflect/jvm/ReflectJvmMapping
at org.springframework.context.annotation.ConfigurationClassParser.processImports(ConfigurationClassParser.java:644)
at org.springframework.context.annotation.ConfigurationClassParser.doProcessConfigurationClass(ConfigurationClassParser.java:362)
at org.springframework.context.annotation.ConfigurationClassParser.processConfigurationClass(ConfigurationClassParser.java:283)
at org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:206)
at org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:174)
at org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:442)
at org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanDefinitionRegistry(ConfigurationClassPostProcessor.java:306)
at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanDefinitionRegistryPostProcessors(PostProcessorRegistrationDelegate.java:349)
at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:118)
at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:782)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:600)
at org.springframework.boot.web.server.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:142)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:737)
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:435)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:315)
at org.springframework.boot.test.context.SpringBootContextLoader.lambda$loadContext$2(SpringBootContextLoader.java:144)
at org.springframework.util.function.ThrowingSupplier.get(ThrowingSupplier.java:58)
at org.springframework.util.function.ThrowingSupplier.get(ThrowingSupplier.java:46)
at org.springframework.boot.SpringApplication.withHook(SpringApplication.java:1444)
at org.springframework.boot.test.context.SpringBootContextLoader$ContextLoaderHook.run(SpringBootContextLoader.java:563)
at org.springframework.boot.test.context.SpringBootContextLoader.loadContext(SpringBootContextLoader.java:144)
at org.springframework.boot.test.context.SpringBootContextLoader.loadContext(SpringBootContextLoader.java:110)
at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContextInternal(DefaultCacheAwareContextLoaderDelegate.java:246)
at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.java:157)
... 19 more
Caused by: java.lang.NoClassDefFoundError: kotlin/reflect/jvm/ReflectJvmMapping
at org.springframework.beans.BeanUtils$KotlinDelegate.instantiateClass(BeanUtils.java:909)
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:190)
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:151)
at org.springframework.context.annotation.ConfigurationClassParser.processImports(ConfigurationClassParser.java:613)
... 42 more
wakingrufus
08/10/2025, 1:16 PMplugins {
application
id("org.springframework.boot") version ("4.+")
kotlin("jvm") version ("2.2.0")
}
dependencies {
kotlin("stdlib-jdk8")
kotlin("reflect")
implementation(platform("org.springframework:spring-framework-bom:7.0.0-M7"))
implementation("org.springframework:spring-beans")
implementation("org.springframework:spring-webmvc")
implementation("org.springframework.boot:spring-boot-autoconfigure:4.0.0-M1")
implementation("org.springframework.boot:spring-boot-starter-jetty:4.0.0-M1")
implementation("io.github.oshai:kotlin-logging-jvm:5.1.0")
implementation("ch.qos.logback:logback-classic:1.5.18")
testImplementation("org.springframework.boot:spring-boot-starter-test:4.0.0-M1")
testImplementation("org.springframework.boot:spring-boot-starter-webflux:4.0.0-M1")
testImplementation("org.assertj:assertj-core:3.27.3")
}
wakingrufus
08/10/2025, 1:17 PMimplementation
in front of the kotlin deps lol