The ResourceConfig instance does not contain any root resource classes

问题描述  

  当我们在使用 myeclipse 创建 Web Service Projects 项目后,运行项目然后就会出现这个问题。

  

解决方案

  通过这个错误描述,我们项目没有找到这个资源。报错的原因在于我们创建 web 项目是自动生成的 web.xml 。

  

  我的解决方案就是把这里删除就好了。

  

  然后启动项目就不会有这个问题了。

时间: 2024-08-09 12:55:48

The ResourceConfig instance does not contain any root resource classes的相关文章

Jersey(1.19.1) - Life-cycle of Root Resource Classes

By default the life-cycle of root resource classes is per-request, namely that a new instance of a root resource class is created every time the request URI path matches the root resource. This makes for a very natural programming model where constru

com.sun.jersey.api.container.ContainerException

com.sun.jersey.api.container.ContainerException: The ResourceConfig instance does not contain any root resource classes jersey 在配置文件web.xml中没有写对而出现的错误!! 出错的原因: 是因为我的web.xml中的配置文件写错了. <servlet> <servlet-name>Jersey REST Service</servlet-name

spring Mvc jersey配置

第一步:引入依赖的jar包 <!-- jersey --><dependency>    <groupId>com.sun.jersey</groupId>    <artifactId>jersey-client</artifactId>    <version>${jersey.version}</version></dependency><dependency>    <gr

运行HelloJersey遇到异常解决方法

刚开始接触Jersey时,按照网上的教程自己写一个HelloWorld的DEMO.没错就是那简单地几步,这里我就不赘述了,想实现的请点我.这里我想说一下遇到的这个异常:com.sun.jersey.api.container.ContainerException: The ResourceConfig instance does not contain any root resource classes. 一开始我只知道Jersey没有找到这个Resource文件,我百度Google一下午试了好

Java与REST的邂逅之Jersey

Java 与 REST 的邂逅(一)浅谈 Jersey 及 JAX-RS 简介 在Web的世界中,Java从最早的Servlet/JSP,发展到JSTL/JSF,而third party也有action-based的Struts及Spring MVC,或component-based的GWT, ZK等,事实上Java的Web世界已经非常的成熟.然而这些架构主要设计是以Web Application为主要要求,但是Web的世界中还有另外一个常见的应用是Web Services. 设计Web Ser

Jersey(1.19.1) - Hello World, Get started with Jersey using the embedded Grizzly server

Maven Dependencies The following Maven dependencies need to be added to the pom: <dependency> <groupId>com.sun.jersey</groupId> <artifactId>jersey-server</artifactId> <version>1.19.1</version> </dependency>

RESTful Web Services Example in Java with Jersey, Spring

Looking to REST? In Java? There's never time for that :), but if you are looking to use an "architectural style consisting of a coordinated set of constraints applied to components, connectors, and data elements, within a distributed hypermedia syste

Jersey(1.19.1) - Sub-resources

@Path may be used on classes and such classes are referred to as root resource classes. @Path may also be used on methods of root resource classes. This enables common functionality for a number of resources to be grouped together and potentially reu

RESTful WebService入门

RESTful WebService入门 RESTful WebService是比基于SOAP消息的WebService简单的多的一种轻量级Web服务,RESTful WebService是没有状态的,发布和调用都非常的轻松容易. 下面写一个最简单的Hello World例子,以便对RESTful WebService有个感性认识.因为非常专业理论化的描述RESTful WebService是一件理解起来很痛苦的事情.看看例子就知道个大概了,再看理论就容易理解多了. /** * RESTful