Question

Trying to get our application up and running with 2.4.0.RC1 and I keep running into this error:

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

I've upgraded to the latest version of cache (1.1.6). It seems like some kind of version conflict with the spring cache stuff, but I checked the dependency report and didn't see anything unusual being pulled in.

Anyone else run into this problem and have a solution?

Was it helpful?

Solution

It turns out that spring-integration-core version 3.0.3 was including an older version of spring-context that I missed.

Upgrading to spring-integration-core version 4.0.0 uses the same version of Spring 4 as Grails.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top