我正在使用Grails JAXRS插件进行简单的应用程序,我只是遵循,Grails web Service文档和插件文档建议的过程。即使我收到以下错误,也需要帮助。
http://grails.org/plugin/jaxrs
http://grails.org/doc/latest/guide/webServices.html#13.1
What I did was:
1. Created sample project
2. Added repositories, and plugin in BuildConfig.groovy - as suggested by [jaxrs plugin][1]
3. Created same Book domain class, added same sample data in BootStrap.groovy - as suggested by [Grails document][2]
4. And I am running.
5. Please check my project here : https://github.com/Ravikumarmaddi/NEWRESTDEMO
我收到错误:
|Loading Grails 2.3.8
|Configuring classpath
.
|Environment set to development
.................................
|Packaging Grails application
|Installing zip jaxrs-0.10.zip...
...
|Installed plugin jaxrs-0.10
....................
|Compiling 171 source files
.......
|Compiling 9 source files
.................................
|Running Grails application
Error |
2014-06-25 11:33:40,468 [localhost-startStop-1] ERROR application.RootResourceUriRules - The ResourceConfig instance does not contain any root resource classes.
Error |
2014-06-25 11:33:40,473 [localhost-startStop-1] ERROR servlet.SpringServlet - Exception occurred when intialization
Message: The ResourceConfig instance does not contain any root resource classes.
Line | Method
->> 99 | <init> in com.sun.jersey.server.impl.application.RootResourceUriRules
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
| 1331 | _initiate in com.sun.jersey.server.impl.application.WebApplicationImpl
| 168 | access$700 . . . . in ''
| 774 | f in com.sun.jersey.server.impl.application.WebApplicationImpl$13
| 770 | f . . . . . . . . in ''
| 193 | processWithErrors in com.sun.jersey.spi.inject.Errors
| 770 | initiate . . . . . in com.sun.jersey.server.impl.application.WebApplicationImpl
| 117 | initiate in com.sun.jersey.spi.spring.container.servlet.SpringServlet
| 319 | initiate . . . . . in com.sun.jersey.spi.container.servlet.ServletContainer$InternalWebComponent
| 605 | load in com.sun.jersey.spi.container.servlet.WebComponent
| 210 | init . . . . . . . in ''
| 374 | init in com.sun.jersey.spi.container.servlet.ServletContainer
| 557 | init . . . . . . . in ''
| 51 | init in org.grails.jaxrs.web.JerseyServlet
| 175 | init . . . . . . . in org.grails.jaxrs.web.JaxrsContext
| 165 | init in ''
| 45 | contextInitialized in org.grails.jaxrs.web.JaxrsListener
| 262 | run in java.util.concurrent.FutureTask
| 1145 | runWorker . . . . in java.util.concurrent.ThreadPoolExecutor
| 615 | run in java.util.concurrent.ThreadPoolExecutor$Worker
^ 744 | run . . . . . . . in java.lang.Thread
Error |
2014-06-25 11:33:40,516 [localhost-startStop-1] ERROR [localhost].[/NEWRESTDEMO] - Exception sending context initialized event to listener instance of class org.grails.jaxrs.web.JaxrsListener
Message: The ResourceConfig instance does not contain any root resource classes.
Line | Method
->> 99 | <init> in com.sun.jersey.server.impl.application.RootResourceUriRules
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
| 1331 | _initiate in com.sun.jersey.server.impl.application.WebApplicationImpl
| 168 | access$700 . . . . in ''
| 774 | f in com.sun.jersey.server.impl.application.WebApplicationImpl$13
| 770 | f . . . . . . . . in ''
| 193 | processWithErrors in com.sun.jersey.spi.inject.Errors
| 770 | initiate . . . . . in com.sun.jersey.server.impl.application.WebApplicationImpl
| 117 | initiate in com.sun.jersey.spi.spring.container.servlet.SpringServlet
| 319 | initiate . . . . . in com.sun.jersey.spi.container.servlet.ServletContainer$InternalWebComponent
| 605 | load in com.sun.jersey.spi.container.servlet.WebComponent
| 210 | init . . . . . . . in ''
| 374 | init in com.sun.jersey.spi.container.servlet.ServletContainer
| 557 | init . . . . . . . in ''
| 51 | init in org.grails.jaxrs.web.JerseyServlet
| 175 | init . . . . . . . in org.grails.jaxrs.web.JaxrsContext
| 165 | init in ''
| 45 | contextInitialized in org.grails.jaxrs.web.JaxrsListener
| 262 | run in java.util.concurrent.FutureTask
| 1145 | runWorker . . . . in java.util.concurrent.ThreadPoolExecutor
| 615 | run in java.util.concurrent.ThreadPoolExecutor$Worker
^ 744 | run . . . . . . . in java.lang.Thread
Error |
2014-06-25 11:33:40,521 [localhost-startStop-1] ERROR core.StandardContext - Error listenerStart
Error |
2014-06-25 11:33:40,524 [localhost-startStop-1] ERROR core.StandardContext - Context [/NEWRESTDEMO] startup failed due to previous errors
|Server running. Browse to http://localhost:8080/NEWRESTDEMO
请帮助......