-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Description
In what version(s) of Spring for Apache Kafka are you seeing this issue?
3.0.2
Describe the bug
spring-kafka-test fails when running with spring native:
Error: Classes that should be initialized at run time got initialized during image building: ch.qos.logback.classic.Logger was unintentionally initialized at build time. To see why ch.qos.logback.classic.Logger got initialized use --trace-class-initialization=ch.qos.logback.classic.Logger org.springframework.kafka.test.junit.GlobalEmbeddedKafkaTestExecutionListener was unintentionally initialized at build time. To see why org.springframework.kafka.test.junit.GlobalEmbeddedKafkaTestExecutionListener got initialized use --trace-class-initialization=org.springframework.kafka.test.junit.GlobalEmbeddedKafkaTestExecutionListener ch.qos.logback.classic.Level was unintentionally initialized at build time. To see why ch.qos.logback.classic.Level got initialized use --trace-class-initialization=ch.qos.logback.classic.Level ch.qos.logback.core.util.Duration was unintentionally initialized at build time. To see why ch.qos.logback.core.util.Duration got initialized use --trace-class-initialization=ch.qos.logback.core.util.Duration To see how the classes got initialized, use --trace-class-initialization=ch.qos.logback.classic.Logger,org.springframework.kafka.test.junit.GlobalEmbeddedKafkaTestExecutionListener,ch.qos.logback.classic.Level,ch.qos.logback.core.util.Duration
To Reproduce
Start a new spring boot project from initializr and add "org.springframework.kafka:spring-kafka-test" as a dependency as well as id("org.graalvm.buildtools.native") version "0.9.19" plugin
Expected behavior
Able to use kafka-test in tests.
Sample
(https://github.com/nezygis/spring-native-kafka-test)