2
votes

Have just added to BuildConfig.groovy:

    compile ":cache-ehcache:1.0.1"

I'm using Eclipse/Spring Tool Suite v 3.5.0.RELEASE

JAVA_HOME set to: E:\Program Files\Java\jdk1.7.0_17

I get the following compilation errors when I run grails runApp.

Compilation error: startup failed:
Compile error during compilation with javac.
C:\Documents and Settings\pagendg\.grails\2.3.8\projects\osrpms\plugins\cache-ehcache-1.0.1\src\java\grails\plugin\cache\ehcache\GrailsEhCacheManagerFactoryBean.java:195: error: ReloadableCacheManager.ProxyEhcache is not abstract and does not override abstract method getSearchesPerSecond() in Ehcache
        protected class ProxyEhcache implements Ehcache {
                  ^
C:\Documents and Settings\pagendg\.grails\2.3.8\projects\osrpms\plugins\cache-ehcache-1.0.1\src\java\grails\plugin\cache\ehcache\GrailsEhCacheManagerFactoryBean.java:798: error: getStatistics() in ReloadableCacheManager.ProxyEhcache cannot implement getStatistics() in Ehcache
            public StatisticsGateway getStatistics()
                                     ^
  return type StatisticsGateway is not compatible with Statistics
C:\Documents and Settings\pagendg\.grails\2.3.8\projects\osrpms\plugins\cache-ehcache-1.0.1\src\java\grails\plugin\cache\ehcache\GrailsEhCacheManagerFactoryBean.java:656: error: cannot find symbol
                return getUnderlyingEhcache(name).getSearchAttributes();
                                                 ^
  symbol:   method getSearchAttributes()
  location: interface Ehcache
C:\Documents and Settings\pagendg\.grails\2.3.8\projects\osrpms\plugins\cache-ehcache-1.0.1\src\java\grails\plugin\cache\ehcache\GrailsEhCacheManagerFactoryBean.java:653: error: method does not override or implement a method from a supertype
            @Override
            ^
1
Did you ever manage to get this working? I am experiencing the same issue with Grails 2.3.7 and cache-ehcache:1.0.4... - rcgeorge23
I think in the end I took out the BuildConfig dependency on ehcache and GORM ends up pulling the cache module in - Greg Pagendam-Turner

1 Answers

0
votes

try to delete the project’s folder under the .grails directory, e.g. ‘~/.grails/2.3.8/projects/osrpms’.

and the commands

grails clean-all

grails clean

then run the project