We have a RestEasy-based JAX-RS application serving URLs to clients that now has a requirement to call another API that uses OData4j. When I tried to use ODataConsumer in this application to consume the response from the other API, I get
java.lang.ClassCastException: com.sun.jersey.server.impl.provider.RuntimeDelegateImpl
cannot be cast to org.jboss.resteasy.spi.ResteasyProviderFactory
None of the methods specified in results from google search seem to solve the issue. Before reaching this point, it was complaining that Jersey could not find Jackson and I made Jackson JARs available as providedCompile (use Gradle). Is this problem happening because the OData4j is trying to use Jersey as provider while my application is already using RestEasy. I understand that RestEasy and OData4j integration is not easy.
Is there a way for OData4j to be made to pick RestEasy and not Jersey as I think it will solve this issue?