Граальс-Джерси: как разрешить зависимость - PullRequest
2 голосов
/ 20 марта 2012

Я пытаюсь создать RESTClient в Grails, используя Джерси.Я получаю следующую ошибку даже после добавления файлов jersey-bundle-1.12.jar и jersey-0.7-ea.jar.

Error 2012-03-20 10:21:06,912 [T`enter code here`hread-7] ERROR  application.RootResourceUriRules  - The ResourceConfig instance does not contain any root resource classes.
| Error 2012-03-20 10:21:06,912 [Thread-7] ERROR inject.Errors  - The following errors and warnings have been detected with resource and/or provider classes:
  SEVERE: Missing dependency for field: com.sun.ws.rest.spi.template.TemplateContext com.sun.ws.rest.impl.template.ViewableMessageBodyWriter.tc
| Error 2012-03-20 10:21:06,912 [Thread-7] ERROR servlet.SpringServlet  - Exception occurred when intialization
Message: The ResourceConfig instance does not contain any root resource classes.
    Line | Method
->>  103 | <init>             in com.sun.jersey.server.impl.application.RootResourceUriRules
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
|   1182 | _initiate          in com.sun.jersey.server.impl.application.WebApplicationImpl
|    161 | access$600 . . . . in     ''
|    698 | f                  in com.sun.jersey.server.impl.application.WebApplicationImpl$12
|    695 | f . . . . . . . .  in     ''
|    193 | processWithErrors  in com.sun.jersey.spi.inject.Errors
|    695 | initiate . . . . . in com.sun.jersey.server.impl.application.WebApplicationImpl
|    117 | initiate           in com.sun.jersey.spi.spring.container.servlet.SpringServlet
|    287 | initiate . . . . . in com.sun.jersey.spi.container.servlet.ServletContainer$InternalWebComponent
|    587 | load               in com.sun.jersey.spi.container.servlet.WebComponent
|    213 | init . . . . . . . in     ''
|    342 | init               in com.sun.jersey.spi.container.servlet.ServletContainer
|    516 | init . . . . . . . in     ''
|     51 | init               in org.grails.jaxrs.web.JerseyServlet
|    174 | init . . . . . . . in org.grails.jaxrs.web.JaxrsContext
|    164 | init               in     ''
|     45 | contextInitialized in org.grails.jaxrs.web.JaxrsListener
|    303 | innerRun           in java.util.concurrent.FutureTask$Sync
|    138 | run . . . . . . .  in java.util.concurrent.FutureTask
|    886 | runTask            in java.util.concurrent.ThreadPoolExecutor$Worker
|    908 | run . . . . . . .  in     ''
^    662 | run                in java.lang.Thread
| Error 2012-03-20 10:21:06,943 [Thread-7] ERROR [localhost].[/GrailsRESTClient]  - 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
->>  103 | <init>             in com.sun.jersey.server.impl.application.RootResourceUriRules
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
|   1182 | _initiate          in com.sun.jersey.server.impl.application.WebApplicationImpl
|    161 | access$600 . . . . in     ''
|    698 | f                  in com.sun.jersey.server.impl.application.WebApplicationImpl$12
|    695 | f . . . . . . . .  in     ''
|    193 | processWithErrors  in com.sun.jersey.spi.inject.Errors
|    695 | initiate . . . . . in com.sun.jersey.server.impl.application.WebApplicationImpl
|    117 | initiate           in com.sun.jersey.spi.spring.container.servlet.SpringServlet
|    287 | initiate . . . . . in com.sun.jersey.spi.container.servlet.ServletContainer$InternalWebComponent
|    587 | load               in com.sun.jersey.spi.container.servlet.WebComponent
|    213 | init . . . . . . . in     ''
|    342 | init               in com.sun.jersey.spi.container.servlet.ServletContainer
|    516 | init . . . . . . . in     ''
|     51 | init               in org.grails.jaxrs.web.JerseyServlet
|    174 | init . . . . . . . in org.grails.jaxrs.web.JaxrsContext
|    164 | init               in     ''
|     45 | contextInitialized in org.grails.jaxrs.web.JaxrsListener
|    303 | innerRun           in java.util.concurrent.FutureTask$Sync
|    138 | run . . . . . . .  in java.util.concurrent.FutureTask
|    886 | runTask            in java.util.concurrent.ThreadPoolExecutor$Worker
|    908 | run . . . . . . .  in     ''
^    662 | run                in java.lang.Thread
| Error 2012-03-20 10:21:06,958 [main] ERROR core.StandardContext  - Error listenerStart
| Error 2012-03-20 10:21:06,958 [main] ERROR core.StandardContext  - Context [/GrailsRESTClient] startup failed due to previous errors

Есть идеи, как решить вышеуказанную ошибку?Спасибо!

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...