Websphere 8.5上的JAX-RS Jersey客户端 [英] JAX-RS Jersey Client on Websphere 8.5
问题描述
我正在尝试部署使用jersey的jax-rs客户端应用程序是8.5.
我希望我不需要在战争中打包球衣罐,因为那样会提供它们.
但是在尝试调用我的servlet时出现此错误:
错误404:javax.servlet.UnavailableException:SRVE0203E:Servlet [HelloJAXRSClient]:example.HelloJAXRSClient被找到,但是缺少另一个必需的类. SRVE0206E:该错误通常表示该servlet最初是使用服务器无法定位的类进行编译的. SRVE0187E:检查您的类路径以确保该servlet所需的所有类都存在.SRVE0210I:可以通过仅使用应用程序运行时中的类重新编译该servlet来调试此问题
我可以使用库吗,所以我不需要将它们打包在应用程序中?
WebSphere 8.5包含一个JAX-RS实现,但是它基于Apache Wink,而不是Jersey.因此,如果您想使用已经提供的功能,我想您需要禁用WAS JAX-RS实施,我猜这将允许您改为使用Jersey,或者部署在应用程序中,或者按照zargarf的建议作为共享库使用. /p>
I'm trying to deploy jax-rs client application that use jersey on was 8.5.
I was hoping I won't need to pack jersey jars inside my war, because was will provide them.
But I'm getting this error when trying to invoke my servlet:
Error 404: javax.servlet.UnavailableException: SRVE0203E: Servlet [HelloJAXRSClient]: example.HelloJAXRSClient was found, but is missing another required class. SRVE0206E: This error typically implies that the servlet was originally compiled with classes which cannot be located by the server. SRVE0187E: Check your class path to ensure that all classes required by the servlet are present.SRVE0210I: This problem can be debugged by recompiling the servlet using only the classes in the application's runtime
Is there something I can do to use was libraries so I won't need to pack them inside my applicaiton?
WebSphere 8.5 includes a JAX-RS implementation, but it's based on Apache Wink, not Jersey. So if you want to use what is already provided, I think you'll need to create a Wink client instead of a Jersey one.
Or, you can disable the WAS JAX-RS implementation which I'd guess will allow you to use Jersey instead, either deployed in your application or as a shared library as zargarf suggests.
这篇关于Websphere 8.5上的JAX-RS Jersey客户端的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!