jersey - Websphere 8.5 上的 JAX-RS Jersey 客户端

标签 jersey jax-rs websphere-8

我正在尝试部署使用 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/

相关文章:

rest - RESTful API 中的 URL 作为路径参数会导致错误的请求

java - 如何解决 Jackson 无法处理 JPA bean 中的直接自引用的问题

rest - 使用 JAX-RS 的异步 REST 调用

rest - WebSphere Application Server/8.0/Uncaught 由 servlet 创建的初始化异常

jsf-2 - Websphere 8.5 : Class org. apache.commons.logging.impl.Jdk14Logger 没有实现日志

unit-testing - 如何使用 Jersey(测试框架)将数据源依赖项注入(inject) RESTful Web 服务?

java - 使用 HttpUrlConnection 发送数据

java - Swagger ReaderListener 未调用

java - 是否需要文件 persistence.xml?

Web 服务输入中的 Java + Jersey 实体列表