Spring 升级到Grails 2.4.0后的ClassNotFoundException
我将我的Grails项目从Grails-2.3.7升级到Grails-2.4.0,并遵循指南。但是,尝试运行应用程序现在会产生下面的堆栈跟踪。我该如何解决这个问题Spring 升级到Grails 2.4.0后的ClassNotFoundException,spring,grails,Spring,Grails,我将我的Grails项目从Grails-2.3.7升级到Grails-2.4.0,并遵循指南。但是,尝试运行应用程序现在会产生下面的堆栈跟踪。我该如何解决这个问题 | Running Grails application | Error 2014-06-12 15:45:55,788 [localhost-startStop-1] ERROR context.GrailsContextLoaderListener - Error initializing the application: Er
| Running Grails application
| Error 2014-06-12 15:45:55,788 [localhost-startStop-1] ERROR context.GrailsContextLoaderListener - Error initializing the application: Error creating bean with name 'grailsApplicationPostProcessor': Initialization of bean failed; nested exception is java.lang.NoClassDefFoundError: org/springframework/core/annotation/AnnotatedElementUtils
Message: Error creating bean with name 'grailsApplicationPostProcessor': Initialization of bean failed; nested exception is java.lang.NoClassDefFoundError: org/springframework/core/annotation/AnnotatedElementUtils
Line | Method
->> 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
Caused by NoClassDefFoundError: org/springframework/core/annotation/AnnotatedElementUtils
->> 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
Caused by ClassNotFoundException: org.springframework.core.annotation.AnnotatedElementUtils
->> 366 | run in java.net.URLClassLoader$1
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
| 355 | run in ''
| 354 | findClass in java.net.URLClassLoader
| 425 | loadClass in java.lang.ClassLoader
| 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 Forked Grails VM exited with error
请跑
grails dependency-report
并检查您的应用程序是否没有使用较旧版本的Spring。如果您可以将输出粘贴到问题中,您应该会在依赖关系报告中看到某个Spring JAR的旧版本,这就是问题的根源。Grails2.4需要Spring4.0.5或更高版本