无法运行Grails项目GGTS [英] Could not run Grails project GGTS
问题描述
我有一个在命令行中完美运行的grails项目。当我尝试在GGTS中运行它时,
I have a grails project that runs perfectly in the command line. When I try to run it in GGTS with
grails run-app
它第一次运行时没有任何错误。然后,我停止了服务器,并使用grails run-app再次运行它。现在出现以下错误。
it runs the first time without any error. Then, I stopped the server and ran it again with grails run-app. Now the following errors occur.
| Error 2013-04-29 15:32:14,965 [localhost-startStop-1] ERROR context.GrailsContextLoader - Error initializing the application: Error creating bean with name 'annotationHandlerMapping': Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: org/codehaus/jackson/annotate/JacksonAnnotation
Message: Error creating bean with name 'annotationHandlerMapping': Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: org/codehaus/jackson/annotate/JacksonAnnotation
Line | Method
->> 334 | innerRun in java.util.concurrent.FutureTask$Sync
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
| 166 | run in java.util.concurrent.FutureTask
| 1145 | runWorker in java.util.concurrent.ThreadPoolExecutor
| 615 | run in java.util.concurrent.ThreadPoolExecutor$Worker
^ 722 | run . . . in java.lang.Thread
Caused by NoClassDefFoundError: org/codehaus/jackson/annotate/JacksonAnnotation
->> 3098 | initAnnotationsIfNecessary in java.lang.Class
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
| 3057 | getAnnotation in ''
| 3070 | isAnnotationPresent in ''
| 334 | innerRun in java.util.concurrent.FutureTask$Sync
| 166 | run . . . in java.util.concurrent.FutureTask
| 1145 | runWorker in java.util.concurrent.ThreadPoolExecutor
| 615 | run . . . in java.util.concurrent.ThreadPoolExecutor$Worker
^ 722 | run in java.lang.Thread
Caused by ClassNotFoundException: org.codehaus.jackson.annotate.JacksonAnnotation
->> 175 | findClass in org.codehaus.groovy.tools.RootLoader
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
| 423 | loadClass in java.lang.ClassLoader
| 147 | loadClass in org.codehaus.groovy.tools.RootLoader
| 356 | loadClass in java.lang.ClassLoader
| 3098 | initAnnotationsIfNecessary in java.lang.Class
| 3057 | getAnnotation in ''
| 3070 | isAnnotationPresent in ''
| 334 | innerRun in java.util.concurrent.FutureTask$Sync
| 166 | run . . . in java.util.concurrent.FutureTask
| 1145 | runWorker in java.util.concurrent.ThreadPoolExecutor
| 615 | run . . . in java.util.concurrent.ThreadPoolExecutor$Worker
^ 722 | run in java.lang.Thread
我也尝试删除.grails / 2.2.1 / projects / MyProject目录并更新了依赖关系。刷新依赖项正常工作,但run-app在GGTS中不起作用。
我应该怎么做?
I also tried to delete .grails/2.2.1/projects/MyProject directory and updated the dependencies. Refresh dependencies works fine but run-app does not work in GGTS. What should I do?
推荐答案
像往常一样,按照以下顺序尝试以下内容:
As usual, try the following in this order
grails clean
grails refresh-dependencies
grails run-app
如果它仍然不起作用,您可能需要删除 .grails / 2.2.2 / projects / *并重复上述步骤,提到的步骤。
If it still doesn't work, you may want to delete your .grails/2.2.2/projects/* and repeat the above-mentioned steps.
这篇关于无法运行Grails项目GGTS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!