我正在尝试部署使用 jersey 的 jax-rs 客户端应用程序是 8.5。
我希望我不需要在 war 中打包 Jersey jar ,因为他们会提供它们。
但当我尝试调用我的 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
我可以做些什么来使用 was 库,这样我就不需要将它们打包到我的应用程序中了吗?
最佳答案
WebSphere 8.5 包含 JAX-RS 实现,但它基于 Apache Wink,而不是 Jersey。因此,如果您想使用已经提供的内容,我认为您需要 create a Wink client而不是 Jersey 的。
或者,您可以disable the WAS JAX-RS implementation我猜这将允许您使用 Jersey,要么部署在您的应用程序中,要么作为 zargarf 建议的共享库。
关于jersey - Websphere 8.5 上的 JAX-RS Jersey 客户端,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16456358/