Resteasy with Google App Engine

眉间皱痕 提交于 2019-11-30 16:11:21

问题


I have a working Rest web service that use JBoss Resteasy however when I tried to port it to use GAE I'm getting this error when executing:

java.lang.ClassNotFoundException: org.jboss.resteasy.plugins.server.servlet.ResteasyBootstrap

回答1:


I used resteasy successfully on GAE. As csturtz mentioned make sure your project has the resteasy dependency.

If yo uare using Maven this should be something like:

<dependency>
    <groupId>org.jboss.resteasy</groupId>
    <artifactId>resteasy-jaxrs</artifactId>
    <version>${resteasy.version}</version>
</dependency>

And optionally you also would like to use:

<dependency>
    <groupId>org.jboss.resteasy</groupId>
    <artifactId>resteasy-hibernatevalidator-provider</artifactId>
    <version>${resteasy.version}</version>
</dependency>
<dependency>
    <groupId>org.jboss.resteasy</groupId>
    <artifactId>resteasy-jackson-provider</artifactId>
    <version>${resteasy.version}</version>
</dependency>



回答2:


it would seem you're missing the Resteasy JAR file in your GAE WAR file. Locate this jar file, add it to your GAE WAR build, and you should be good to go (or at least past this specific error).




回答3:


Is the resteasy jar file in /war/WEB-INF/lib ? It needs to be copied there AND put on your classpath.



来源:https://stackoverflow.com/questions/9629028/resteasy-with-google-app-engine

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