Jersey 在dropwizard 1.3.1中使用KeyClope 4.3.0.Final

Jersey 在dropwizard 1.3.1中使用KeyClope 4.3.0.Final,jersey,resteasy,dropwizard,keycloak,Jersey,Resteasy,Dropwizard,Keycloak,我在将KeyClope集成到dropwizard时遇到问题。KeyClope需要RestEasy客户端,因此我必须使用依赖项: <dependency> <groupId>org.jboss.resteasy</groupId> <artifactId>resteasy-client</artifactId> <version>3.0.26.Final</version> </dep

我在将KeyClope集成到dropwizard时遇到问题。KeyClope需要RestEasy客户端,因此我必须使用依赖项:

<dependency>
    <groupId>org.jboss.resteasy</groupId>
    <artifactId>resteasy-client</artifactId>
    <version>3.0.26.Final</version>
</dependency>
我得到了一个错误:

java.lang.ClassCastException: org.jboss.resteasy.client.jaxrs.internal.ClientRequestContextImpl cannot be cast to org.glassfish.jersey.client.ClientRequest
当我删除依赖项时,我会得到jercycent和所有httpRequests,但是keydrope生成器失败;当我使用RestEasy依赖项keydrope成功,但是所有其他http请求失败时
以前有人遇到过这个问题吗?有没有一种方法可以控制何时获取resteasy客户端以及何时获取jersey客户端?

解决方案是使用resteasy依赖项,但不使用JerscClientBuilder:

Client httpClient =  new ResteasyClientBuilder().build();
java.lang.ClassCastException: org.jboss.resteasy.client.jaxrs.internal.ClientRequestContextImpl cannot be cast to org.glassfish.jersey.client.ClientRequest
Client httpClient =  new ResteasyClientBuilder().build();