当我通过 post 发送请求时收到此错误:
NoClassDefFoundError: org/glassfish/jersey/process/internal/RequestExecutorFactory
我的代码看起来像这样:
@POST
@Path("/processPayment")
public Response processPay(PaymentRequestInterface request) throws ServletException {
Object obj = new Object();
//create an object at the used library and do something with it
return Response.status(status).entity(obj).build();
}
如果我将 POST 更改为 GET 方法,则会收到此错误:
NoClassDefFoundError: org/glassfish/jersey/client/ClientAsyncExecutorFactory
也许这些信息可以帮助某人......
最佳答案
您需要将以下依赖项添加到您的 Maven 项目
<dependency>
<groupId>org.glassfish.jersey.core</groupId>
<artifactId>jersey-client</artifactId>
<version>2.23</version>
</dependency>
关于java - NoClassDefFound错误: org/glassfish/jersey/process/internal/RequestExecutorFactory,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38310107/