Search code examples
jsonwildfly

Resteasy Client Wildfly 23 - IncompatibleClassChangeError


I use Wildfly 23. I tried to implement a Resteasy Client (Version 4.7.0). Here is my code:

    ResteasyClient client = new ResteasyClientBuilderImpl().build();
    ResteasyWebTarget getEvent = client.target("https:......");
    Response getEventResponse = getEvent.request().get(); ...

But I get this error when "ResteasyClient client = new ResteasyClientBuilderImpl().build();" is invoked:

 Failed to define class org.jboss.resteasy.client.jaxrs.internal.ResteasyClientImpl in Module "deployment.isymnd.war" from Service Module Loader: java.lang.IncompatibleClassChangeError: Failed to link org/jboss/resteasy/client/jaxrs/internal/ResteasyClientImpl (Module "deployment.isymnd.war" from Service Module Loader): Implementing class

Does anyone has an idea what I am doing wrong? Thank you a lot, Nicole


Solution

  • You're using a newer version of the client than WildFly 23 provides. WildFly 23 uses 3.15.1.Final. You should also ensure you're not including the JAR in your deployment.