且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

带有REST客户端的JBoss6(jersey-client)

更新时间:2022-06-18 22:11:00

我相信问题是您正在尝试在Web应用程序中混合使用两种不同的jax-rs实现.对于您的RESTful资源,您正在使用RESTEasy,而在客户端,您想使用Jersey-所有这些都由同一jar使用.但是,Jersey客户依赖于Jersey核心,该核心与RESTEasy冲突.因此,您将不得不依靠RESTEasy客户端API,或者也要在服务器端切换到Jersey.

I believe the problem is that you are trying to mix two different jax-rs implementations in your web app. For your RESTful resource you are using RESTEasy, while on the client side you want to use Jersey - all utilized by the same jar. However the Jersey client depends on Jersey core, which conflicts with RESTEasy. So, you'll either have to rely on RESTEasy client API, or switch to Jersey for your server-side as well.