- 浏览: 1150851 次
- 性别:
- 来自: 北京
文章分类
最新评论
-
RebeccaZhong:
严重: StandardWrapper.Throwableco ...
三步发布java方式的rest服务 -
RebeccaZhong:
严重: StandardWrapper.Throwableco ...
三步发布java方式的rest服务 -
冷酷月光:
楼主。请教一下。arcgis for android 有提供地 ...
ArcGIS API For Android离线地图的实现 -
winney117:
请问如何GET已有网页上的指定内容?比如百度文库中的某一篇文章 ...
三步发布java方式的rest服务 -
zige1012:
您好,我想问问我想换个自己地图的切片,也有4层(L0-L3), ...
ArcGIS API For Android离线地图的实现
大家好:
最近大家都想知道怎么发布一个java的rest方式的服务,犹豫时间有限,我通过邮件跟大家说明一下。其实发布一个java的rest方式的服务很简单。
在Eclipse里,新建一个web工程,
第一步,添加需要用的jar包,如下图
第二步,新建一个class,代码如下
第三步,修改web.xml配置文件,如下图
启动tomcat,
访问,http://localhost:8080/WebREST/rest/helloworld?name=xiaoma
这时我们就可以访问到我们发布的rest服务了,如下图
严重: StandardWrapper.Throwable
com.sun.jersey.api.container.ContainerException: The ResourceConfig instance does not contain any root resource classes.
at com.sun.jersey.server.impl.application.WebApplicationImpl.processRootResources(WebApplicationImpl.java:718)
at com.sun.jersey.server.impl.application.WebApplicationImpl.initiate(WebApplicationImpl.java:590)
at com.sun.jersey.server.impl.application.WebApplicationImpl.initiate(WebApplicationImpl.java:383)
at com.sun.jersey.spi.container.servlet.ServletContainer.initiate(ServletContainer.java:377)
at com.sun.jersey.spi.container.servlet.ServletContainer$InternalWebComponent.initiate(ServletContainer.java:242)
at com.sun.jersey.spi.container.servlet.WebComponent.load(WebComponent.java:449)
at com.sun.jersey.spi.container.servlet.WebComponent.init(WebComponent.java:169)
at com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:281)
at com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:442)
at javax.servlet.GenericServlet.init(GenericServlet.java:158)
at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1231)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1144)
at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:817)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:135)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:142)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:616)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:518)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1091)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:673)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1500)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1456)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:745)
三月 23, 2016 4:37:39 下午 org.apache.catalina.core.StandardWrapperValve invoke
严重: Allocate exception for servlet mobile
com.sun.jersey.api.container.ContainerException: The ResourceConfig instance does not contain any root resource classes.
at com.sun.jersey.server.impl.application.WebApplicationImpl.processRootResources(WebApplicationImpl.java:718)
at com.sun.jersey.server.impl.application.WebApplicationImpl.initiate(WebApplicationImpl.java:590)
at com.sun.jersey.server.impl.application.WebApplicationImpl.initiate(WebApplicationImpl.java:383)
at com.sun.jersey.spi.container.servlet.ServletContainer.initiate(ServletContainer.java:377)
at com.sun.jersey.spi.container.servlet.ServletContainer$InternalWebComponent.initiate(ServletContainer.java:242)
at com.sun.jersey.spi.container.servlet.WebComponent.load(WebComponent.java:449)
at com.sun.jersey.spi.container.servlet.WebComponent.init(WebComponent.java:169)
at com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:281)
at com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:442)
at javax.servlet.GenericServlet.init(GenericServlet.java:158)
at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1231)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1144)
at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:817)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:135)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:142)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:616)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:518)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1091)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:673)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1500)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1456)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:745)
楼主,为什么会报这个错?
最近大家都想知道怎么发布一个java的rest方式的服务,犹豫时间有限,我通过邮件跟大家说明一下。其实发布一个java的rest方式的服务很简单。
在Eclipse里,新建一个web工程,
第一步,添加需要用的jar包,如下图
第二步,新建一个class,代码如下
第三步,修改web.xml配置文件,如下图
启动tomcat,
访问,http://localhost:8080/WebREST/rest/helloworld?name=xiaoma
这时我们就可以访问到我们发布的rest服务了,如下图
评论
12 楼
RebeccaZhong
2016-03-23
严重: StandardWrapper.Throwable
com.sun.jersey.api.container.ContainerException: The ResourceConfig instance does not contain any root resource classes.
at com.sun.jersey.server.impl.application.WebApplicationImpl.processRootResources(WebApplicationImpl.java:718)
at com.sun.jersey.server.impl.application.WebApplicationImpl.initiate(WebApplicationImpl.java:590)
at com.sun.jersey.server.impl.application.WebApplicationImpl.initiate(WebApplicationImpl.java:383)
at com.sun.jersey.spi.container.servlet.ServletContainer.initiate(ServletContainer.java:377)
at com.sun.jersey.spi.container.servlet.ServletContainer$InternalWebComponent.initiate(ServletContainer.java:242)
at com.sun.jersey.spi.container.servlet.WebComponent.load(WebComponent.java:449)
at com.sun.jersey.spi.container.servlet.WebComponent.init(WebComponent.java:169)
at com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:281)
at com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:442)
at javax.servlet.GenericServlet.init(GenericServlet.java:158)
at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1231)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1144)
at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:817)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:135)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:142)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:616)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:518)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1091)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:673)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1500)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1456)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:745)
三月 23, 2016 4:37:39 下午 org.apache.catalina.core.StandardWrapperValve invoke
严重: Allocate exception for servlet mobile
com.sun.jersey.api.container.ContainerException: The ResourceConfig instance does not contain any root resource classes.
at com.sun.jersey.server.impl.application.WebApplicationImpl.processRootResources(WebApplicationImpl.java:718)
at com.sun.jersey.server.impl.application.WebApplicationImpl.initiate(WebApplicationImpl.java:590)
at com.sun.jersey.server.impl.application.WebApplicationImpl.initiate(WebApplicationImpl.java:383)
at com.sun.jersey.spi.container.servlet.ServletContainer.initiate(ServletContainer.java:377)
at com.sun.jersey.spi.container.servlet.ServletContainer$InternalWebComponent.initiate(ServletContainer.java:242)
at com.sun.jersey.spi.container.servlet.WebComponent.load(WebComponent.java:449)
at com.sun.jersey.spi.container.servlet.WebComponent.init(WebComponent.java:169)
at com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:281)
at com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:442)
at javax.servlet.GenericServlet.init(GenericServlet.java:158)
at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1231)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1144)
at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:817)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:135)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:142)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:616)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:518)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1091)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:673)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1500)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1456)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:745)
楼主,为什么会报这个错?
11 楼
RebeccaZhong
2016-03-23
严重: StandardWrapper.Throwable
com.sun.jersey.api.container.ContainerException: The ResourceConfig instance does not contain any root resource classes.
at com.sun.jersey.server.impl.application.WebApplicationImpl.processRootResources(WebApplicationImpl.java:718)
at com.sun.jersey.server.impl.application.WebApplicationImpl.initiate(WebApplicationImpl.java:590)
at com.sun.jersey.server.impl.application.WebApplicationImpl.initiate(WebApplicationImpl.java:383)
at com.sun.jersey.spi.container.servlet.ServletContainer.initiate(ServletContainer.java:377)
at com.sun.jersey.spi.container.servlet.ServletContainer$InternalWebComponent.initiate(ServletContainer.java:242)
at com.sun.jersey.spi.container.servlet.WebComponent.load(WebComponent.java:449)
at com.sun.jersey.spi.container.servlet.WebComponent.init(WebComponent.java:169)
at com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:281)
at com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:442)
at javax.servlet.GenericServlet.init(GenericServlet.java:158)
at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1231)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1144)
at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:817)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:135)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:142)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:616)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:518)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1091)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:673)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1500)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1456)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:745)
三月 23, 2016 4:37:39 下午 org.apache.catalina.core.StandardWrapperValve invoke
严重: Allocate exception for servlet mobile
com.sun.jersey.api.container.ContainerException: The ResourceConfig instance does not contain any root resource classes.
at com.sun.jersey.server.impl.application.WebApplicationImpl.processRootResources(WebApplicationImpl.java:718)
at com.sun.jersey.server.impl.application.WebApplicationImpl.initiate(WebApplicationImpl.java:590)
at com.sun.jersey.server.impl.application.WebApplicationImpl.initiate(WebApplicationImpl.java:383)
at com.sun.jersey.spi.container.servlet.ServletContainer.initiate(ServletContainer.java:377)
at com.sun.jersey.spi.container.servlet.ServletContainer$InternalWebComponent.initiate(ServletContainer.java:242)
at com.sun.jersey.spi.container.servlet.WebComponent.load(WebComponent.java:449)
at com.sun.jersey.spi.container.servlet.WebComponent.init(WebComponent.java:169)
at com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:281)
at com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:442)
at javax.servlet.GenericServlet.init(GenericServlet.java:158)
at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1231)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1144)
at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:817)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:135)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:142)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:616)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:518)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1091)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:673)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1500)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1456)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:745)
com.sun.jersey.api.container.ContainerException: The ResourceConfig instance does not contain any root resource classes.
at com.sun.jersey.server.impl.application.WebApplicationImpl.processRootResources(WebApplicationImpl.java:718)
at com.sun.jersey.server.impl.application.WebApplicationImpl.initiate(WebApplicationImpl.java:590)
at com.sun.jersey.server.impl.application.WebApplicationImpl.initiate(WebApplicationImpl.java:383)
at com.sun.jersey.spi.container.servlet.ServletContainer.initiate(ServletContainer.java:377)
at com.sun.jersey.spi.container.servlet.ServletContainer$InternalWebComponent.initiate(ServletContainer.java:242)
at com.sun.jersey.spi.container.servlet.WebComponent.load(WebComponent.java:449)
at com.sun.jersey.spi.container.servlet.WebComponent.init(WebComponent.java:169)
at com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:281)
at com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:442)
at javax.servlet.GenericServlet.init(GenericServlet.java:158)
at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1231)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1144)
at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:817)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:135)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:142)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:616)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:518)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1091)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:673)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1500)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1456)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:745)
三月 23, 2016 4:37:39 下午 org.apache.catalina.core.StandardWrapperValve invoke
严重: Allocate exception for servlet mobile
com.sun.jersey.api.container.ContainerException: The ResourceConfig instance does not contain any root resource classes.
at com.sun.jersey.server.impl.application.WebApplicationImpl.processRootResources(WebApplicationImpl.java:718)
at com.sun.jersey.server.impl.application.WebApplicationImpl.initiate(WebApplicationImpl.java:590)
at com.sun.jersey.server.impl.application.WebApplicationImpl.initiate(WebApplicationImpl.java:383)
at com.sun.jersey.spi.container.servlet.ServletContainer.initiate(ServletContainer.java:377)
at com.sun.jersey.spi.container.servlet.ServletContainer$InternalWebComponent.initiate(ServletContainer.java:242)
at com.sun.jersey.spi.container.servlet.WebComponent.load(WebComponent.java:449)
at com.sun.jersey.spi.container.servlet.WebComponent.init(WebComponent.java:169)
at com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:281)
at com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:442)
at javax.servlet.GenericServlet.init(GenericServlet.java:158)
at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1231)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1144)
at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:817)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:135)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:142)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:616)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:518)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1091)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:673)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1500)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1456)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:745)
10 楼
winney117
2014-08-08
请问如何GET已有网页上的指定内容?比如百度文库中的某一篇文章或者标题?
9 楼
w497480098h
2013-12-17
java才熟悉几天,老大就让搞rest,晕啊!感谢lz分享 学习
8 楼
清水上人
2012-08-22
记录一下,灰常好~~~
7 楼
zhouhsc_cn
2012-06-12
很好的文章,还带有源码。我第一次学习开发REST和java,就用你这个程序通过了。
6 楼
jian1120java
2012-02-08
非常适合入门!
5 楼
hua758209
2011-12-06
终于找了一个可以入门的例子了,万分感谢
4 楼
Virgo_S
2011-04-17
demojava 写道
rest服务干嘛的??
Virgo_S 写道
webservice用过没,rest就是一个轻量级的webservice
3 楼
luckyfenfen
2011-04-17
你好,我把你的代码直接导入eclipse中,然后启动tomcat,输入地址,打开不了页面。请问tomcat还要配置吗?谢谢~
2 楼
Virgo_S
2011-01-17
webservice用过没,rest就是一个轻量级的webservice
1 楼
demojava
2010-11-25
rest服务干嘛的??
发表评论
-
Java中文排序
2011-06-14 13:11 1774所谓中文排序就是按照汉语拼音的顺序进行排序,在Java中进行排 ... -
JDK路径设置全解
2010-05-28 23:44 1692PATH:.;D:\Java\jdk1.6.0_10\bin ... -
java.util.Properties类的使用
2009-02-10 10:21 1826Properties 类已不是新东西了,它在 Java 编程的 ... -
java导入导出excel操作(jxl),整理中。。。
2009-02-10 10:15 4061jxl.jar 包 下载地址: http://www.and ... -
使用Struts和Velocity开发web应用
2008-12-25 23:31 1420http://www.edu999.com/IT/JAVA/2 ... -
关于JAVA断点续传
2008-10-18 10:20 2184SiteFileFetch.java负责整个文件的抓取,控制内 ... -
Spring中Quartz的配置实例
2008-10-13 15:29 2085Quartz是一个强大的企业级任务调度框架,Spring中继承 ... -
Spring中Quartz的Cron配置说明
2008-10-13 10:43 3345一个Cron-表达式是一个 ... -
在Hibernate应用中如何处理批量更新和批量删除?
2008-10-07 10:03 1148批量更新是指在一个事务中更新大批量数据,批量删除是指在一个事务 ... -
Servlet和Filter的url匹配以及url-pattern详解
2008-09-22 16:33 1895Servlet和filter是J2EE开发 ... -
动态代理(Dynamic Proxy)Java Servlet
2008-09-16 21:02 2101从JDK1.3开始,Java就引入了动态代理的概念。动态代理( ... -
用Java动态代理实现AOP
2008-09-16 20:36 1084目前整个开发社区对AOP(Aspect Oriented Pr ... -
JAVA中的反射机制详解
2008-09-16 14:44 2144JAVA反射机制是在运行状态中,对于任意一个类,都能够知道这个 ... -
从查询串中分离请求参数——acegi security中SecurityContextHolderA
2008-09-03 17:57 1996大多数情况下我们是不需要单独处理HttpServletRequ ... -
使用RememberMeProcessingFilter来实现cookies自动登陆
2008-09-03 17:56 2187要使用cookies自动登陆,我们需要配置过滤器Remembe ... -
Acegi concurrent session
2008-09-03 16:33 1342. <bean id="concurrent ... -
Web开发中的Listener和Filter
2008-08-28 16:12 2988http://www.javadby.com/Web_Serv ... -
关于struts2无法加载struts.properties的问题
2008-08-15 15:17 1689最近整合了struts2和spring的问题,其中看到一个st ... -
Hibernate配置详解
2008-08-02 23:19 1733表 3.3. Hibernate配置属 ... -
jar 命令详解
2008-08-01 08:43 1295jar 是随 JDK 安装的,在 ...
相关推荐
总的来说,ArcGIS Server 10 Java版的REST服务部署是一个包含安装、配置、发布和使用服务的过程。通过REST服务,开发者可以轻松地将GIS功能集成到各种Web和移动应用中,实现地理数据的共享和处理。提供的REST.war...
总的来说,"动态发布REST接口及服务调用"涵盖了使用Jetty和Jersey在Java中构建RESTful服务的基本流程,从接口的定义、发布到调用的全过程。通过这种方式,开发者可以快速地开发和测试REST服务,为分布式系统提供灵活...
4. **自动发布图层**:通过GeoServer的REST API,可以编写脚本或程序自动创建工作空间、连接PostGIS数据源、定义图层,并发布为Web服务。这种方式在需要频繁更新地图服务或者有大量图层需要发布的场景下尤其有用。 ...
本文将详细讲解如何利用SuperMap iClient for Android客户端调用iServer发布的REST地图服务。 首先,理解REST(Representational State Transfer)是一种网络应用程序的设计风格和开发方式,基于HTTP协议,使得...
【标题】"java cxf规范rest"涉及到的是Java开发中使用Apache CXF框架实现RESTful服务的相关技术。CXF是一个开源的服务框架,它允许开发者创建和消费各种Web服务,包括基于JAX-WS和JAX-RS的标准。REST...
在Android 4.0(Ice Cream Sandwich)系统中,开发者可以利用后台Service组件来实现REST服务的发布。REST(Representational State Transfer)是一种网络应用程序的设计风格和开发方式,基于HTTP协议,强调简洁和标准...
【标题】:使用CXF发布REST服务 在Java开发中,Apache CXF是一个广泛使用的开源框架,用于构建和部署Web服务。本教程将详细介绍如何利用CXF 2.3.3版本来发布RESTful服务,并在客户端进行调用。首先,我们需要理解...
rest-assured, Java DSL,用于轻松测试REST服务 使用Java测试REST服务比动态语言( 如 ruby 和 Groovy )的测试和验证要困难。 REST保证将这些语言使用到Java领域的简单性。新闻2017-10-05: REST保证 3.0.5的发布。 它
首先,REST(Representational State Transfer,表现层状态转移)是一种网络应用程序的设计风格和开发方式,常用于提供Web服务。在GIS领域,REST地图服务允许客户端通过HTTP协议请求地图资源,如地图图层、图元等,...
博客:使用iServer REST API发布工作空间(Java) (http://blog.csdn.net/supermapsupport/article/details/73201166) 的示例代码
组件应用开发中少不了会用空间查询功能,但若是地图采用的web数据源或rest地图服务,现有查询接口就满足不了,本范例将解决这个问题,自定义构造请求url地址及参数,以上数据包的方式对iServer服务发POST请求,以...
本项目“cxf+spring发布webservice和restservice”专注于利用Apache CXF框架与Spring框架结合,实现这两种服务的发布。Apache CXF是一个开源的、功能丰富的服务栈,它使得开发者能够轻松地构建和部署SOAP和RESTful ...
2. **框架选择**:为了快速搭建REST API,我们可以选用流行的Web开发框架,如Node.js的Express、Python的Flask或Django、Java的Spring Boot等。这些框架提供了丰富的功能,简化了REST服务的开发,例如路由定义、请求...
在Java世界中,Web服务(Web Service)是一种标准的接口,允许不同系统之间进行通信,通常基于SOAP(Simple Object Access Protocol)或REST(Representational State Transfer)架构。本篇文章将详细讲解如何使用...
中文名: JAVA WEB服务 构建与运行 原名: Java Web Services:Up and Running 作者: Martin Kalin译者: 任增刚图书分类: 软件 资源格式: PDF 版本: 扫描版 出版社: O'Reilly书号: ISBN: 9787121097119发行时间: 2009年...
在Java中,发布一个WebService的第一步是创建一个服务类。这个类通常需要添加`@WebService`注解,表明它是对外提供服务的接口。例如: ```java @WebService public class SimpleServer { public String sayHello()...
在Java中实现Facebook REST API的调用,可以借助于各种库,比如Facebook4J或Spring Social Facebook。这篇博客“facebook rest api java简单实现”可能详细讲解了如何在Java环境中设置和使用这些库来执行API请求。 ...
2. **创建资源类**:接着,定义一个Java类作为REST服务的资源类,该类通常会继承自`javax.ws.rs.core.Application`或使用`@Path`注解标记。在类中,我们可以定义各种资源方法,这些方法使用HTTP动词(GET、POST、PUT...
### JAVA调用SAP ODATA服务的关键知识点 在IT领域,特别是企业级应用开发中,Java与SAP系统的集成是一项非常重要的技术。SAP提供了多种API和服务来促进与其他系统的交互,其中ODATA(Open Data Protocol)是一种轻...