NoClassDefFoundError: org/glassfish/jersey/process/internal/RequestExecutorFactory

为君一笑 提交于 2019-12-12 01:50:03

问题


I get this error when I send out a request with post:

NoClassDefFoundError: org/glassfish/jersey/process/internal/RequestExecutorFactory

my code looks like that:

@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();
}

and if I change my POST to a GET method I get this error:

NoClassDefFoundError: org/glassfish/jersey/client/ClientAsyncExecutorFactory

maybe this information helps someone....


回答1:


You need to add the following dependency to your Maven project

<dependency>
    <groupId>org.glassfish.jersey.core</groupId>
    <artifactId>jersey-client</artifactId>
    <version>2.23</version>
</dependency>


来源:https://stackoverflow.com/questions/38310107/noclassdeffounderror-org-glassfish-jersey-process-internal-requestexecutorfacto

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!