ClassNotFoundException:SimpleKeyGenerator升级到Grails 2.4.0.RC1

ClassNotFoundException:SimpleKeyGenerator升级到Grails 2.4.0.RC1,grails,Grails,尝试使用2.4.0.RC1启动并运行应用程序时,我一直遇到以下错误: Caused by: org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [grails.plugin.cache.CustomCacheKeyGenerator]: Constructor threw exception; nested exception is java.lang.RuntimeExce

尝试使用2.4.0.RC1启动并运行应用程序时,我一直遇到以下错误:

Caused by: org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [grails.plugin.cache.CustomCacheKeyGenerator]: Constructor threw exception; nested exception is java.lang.RuntimeException: java.lang.ClassNotFoundException: org.springframework.cache.interceptor.SimpleKeyGenerator
    ... 4 more
Caused by: java.lang.RuntimeException: java.lang.ClassNotFoundException: org.springframework.cache.interceptor.SimpleKeyGenerator
    at grails.plugin.cache.CustomCacheKeyGenerator.<init>(CustomCacheKeyGenerator.java:46)
    ... 4 more
Caused by: java.lang.ClassNotFoundException: org.springframework.cache.interceptor.SimpleKeyGenerator
    at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
    at java.lang.Class.forName(Class.java:190)
    at grails.plugin.cache.CustomCacheKeyGenerator.<init>(CustomCacheKeyGenerator.java:43)
    ... 4 more
原因:org.springframework.beans.BeanInstantiationException:无法实例化bean类[grails.plugin.cache.CustomCacheKeyGenerator]:构造函数引发异常;嵌套异常为java.lang.RuntimeException:java.lang.ClassNotFoundException:org.springframework.cache.interceptor.SimpleKeyGenerator
... 4更多
原因:java.lang.RuntimeException:java.lang.ClassNotFoundException:org.springframework.cache.interceptor.SimpleKeyGenerator
位于grails.plugin.cache.CustomCacheKeyGenerator(CustomCacheKeyGenerator.java:46)
... 4更多
原因:java.lang.ClassNotFoundException:org.springframework.cache.interceptor.SimpleKeyGenerator
在java.net.URLClassLoader$1.run(URLClassLoader.java:366)
在java.net.URLClassLoader$1.run(URLClassLoader.java:355)
位于java.net.URLClassLoader.findClass(URLClassLoader.java:354)
位于java.lang.ClassLoader.loadClass(ClassLoader.java:425)
位于java.lang.ClassLoader.loadClass(ClassLoader.java:358)
位于java.lang.Class.forName(Class.java:190)
位于grails.plugin.cache.CustomCacheKeyGenerator(CustomCacheKeyGenerator.java:43)
... 4更多
我已升级到cache的最新版本(1.1.6)。这似乎与SpringCache的内容存在某种版本冲突,但我查看了依赖关系报告,没有发现任何异常情况


还有人遇到这个问题并找到了解决方案吗?

结果是
spring集成核心版
3.0.3版包含了我错过的旧版本的spring上下文


升级到
SpringIntegrationCore
Version4.0.0使用与Grails相同的Spring4版本。

2.4.0.RC1随Spring4.0.4.RELEASE一起提供。根据插件的说明,应用程序不应该使用spring库中的SimpleKeyGenerator。因此,作为一个消除过程,我觉得spring上下文jar是冲突的。这只是初步的鸟瞰图。:)是的,如果SpringVersion返回一个旧版本的Spring,您将得到这个错误。
dependency report
显示了什么?对我来说,在Grails 2.4.0上,通过在BuildConfig.groovy中的依赖项中添加
compile“org.springframework:spring context:$springVersion”
可以解决这个问题