【发布时间】:2013-04-23 04:51:13
【问题描述】:
我有一个可以在命令行中完美运行的 grails 项目。当我尝试使用
在 GGTS 中运行它时grails run-app
它第一次运行没有任何错误。然后,我停止了服务器并使用 grails run-app 再次运行它。现在出现以下错误。
| 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 目录并更新了依赖项。刷新依赖项工作正常,但运行应用程序在 GGTS 中不起作用。 我该怎么办?
【问题讨论】:
-
对于 Grails 2.2.1,如果我没记错的话,您需要最新的 GGTS 和 3.2。这是你的版本吗?
-
是的,我现在使用 GGTS 3.3M1 和 Grails 2.2.2。它可以工作,但是当您删除 .grails/2.2.2/MyProject 时,它也会出现上述错误。我该怎么办?
-
为什么要删除 .grails 文件夹?运行 grails 可以编译吗?
-
由于冲突,我删除了该文件夹。 Rrun 编译不起作用。
标签: grails grails-2.0 sts-springsourcetoolsuite