I’m actually working in project to test quarkus kafka and in the same time I tried CXFclient in quarkus also.
When I run my unit test, I get the following error:
Runtime java.lang.RuntimeException: io.quarkus.builder.BuildException: Build failure: Build failed due to errors [error]: Build step io.quarkiverse.cxf.deployment.QuarkusCxfProcessor#bus threw an exception: java.lang.LinkageError: loader constraint violation: loader io.quarkus.bootstrap.classloading.QuarkusClassLoader @1ad4ff2a wants to load interface org.springframework.core.io.Resource. A different interface with the same name was previously loaded by 'app'. (org.springframework.core.io.Resource is in unnamed module of loader 'app')
knowing that I’m using
import org.springframework.kafka.test.EmbeddedKafkaBroker;
import org.springframework.kafka.test.utils.KafkaTestUtils;
and at the same time in my test there is a call to web service soap
for soap I’m using **<dependency> <groupId>io.quarkiverse.cxf</groupId> <artifactId>quarkus-cxf</artifactId> </dependency> **
What I did is exclude spring-core from all dependencies but after that i had
loader constraint violation: when resolving method 'void org.springframework.core.log.LogAccessor. <init>(org.apache.commons.logging.Log)' the class loader io.quarkus.bootstrap.classloading.QuarkusClassLoader @59f59a0a of the current class, org/springframework/kafka/test/EmbeddedKafkaKraftBroker, and the class loader 'app' fo r the method's defining class, org/springframework/core/log/LogAccessor, have different Class objects for the type org/apache/commons/logging/Log used in the signature (org.springframework.kafka.test.EmbeddedKafkaKraftBroker is in unnamed module of loader io.quarkus.bootstrap.classloading.QuarkusClassLoader @59f59a0a, parent loader 'app'; org.springframework.core.log.LogAccessor is in unnamed module of loader 'app')
I exclude all dependencies of spring-core in the project and also tried remove annotation of quarkus
quarkus.class-loading.removed-resources.**
EmbeddedKafkaBroker broker;