2014-12-05 4 views
2

내 grails 애플리케이션에 grails ehcache plugin (1.0.4)의 최신 버전을 사용하려고하지만, 플러그인을 종속성으로 추가 할 때 BuildConfig.groovy 시작시 컴파일 오류가 발생합니다.Grails ehcache plugin 컴파일 오류가

 
| Error Compilation error: startup failed: 
Compile error during compilation with javac. 
/Users/rcgeorge23/Documents/workspace/grails-cache-ehcache/src/java/grails/plugin/cache/ehcache/GrailsEhCacheManagerFactoryBean.java:202: error: ReloadableCacheManager.ProxyEhcache is not abstract and does not override abstract method getSearchesPerSecond() in Ehcache 
       protected class ProxyEhcache implements Ehcache { 
         ^
/Users/rcgeorge23/Documents/workspace/grails-cache-ehcache/src/java/grails/plugin/cache/ehcache/GrailsEhCacheManagerFactoryBean.java:805: error: getStatistics() in ReloadableCacheManager.ProxyEhcache cannot implement getStatistics() in Ehcache 
         public StatisticsGateway getStatistics() 
               ^
    return type StatisticsGateway is not compatible with Statistics 
/Users/rcgeorge23/Documents/workspace/grails-cache-ehcache/src/java/grails/plugin/cache/ehcache/GrailsEhCacheManagerFactoryBean.java:663: error: cannot find symbol 
           return getUnderlyingEhcache(name).getSearchAttributes(); 
                   ^
    symbol: method getSearchAttributes() 
    location: interface Ehcache 
/Users/rcgeorge23/Documents/workspace/grails-cache-ehcache/src/java/grails/plugin/cache/ehcache/GrailsEhCacheManagerFactoryBean.java:660: error: method does not override or implement a method from a supertype 
         @Override 
         ^
/Users/rcgeorge23/Documents/workspace/grails-cache-ehcache/src/java/grails/plugin/cache/ehcache/GrailsEhCacheManagerFactoryBean.java:758: error: cannot find symbol 
           return getUnderlyingEhcache(name).calculateOnDiskSize(); 
                   ^
    symbol: method calculateOnDiskSize() 
    location: interface Ehcache 
/Users/rcgeorge23/Documents/workspace/grails-cache-ehcache/src/java/grails/plugin/cache/ehcache/GrailsEhCacheManagerFactoryBean.java:755: error: method does not override or implement a method from a supertype 
         @Override 
         ^
/Users/rcgeorge23/Documents/workspace/grails-cache-ehcache/src/java/grails/plugin/cache/ehcache/GrailsEhCacheManagerFactoryBean.java:765: error: cannot find symbol 
           return getUnderlyingEhcache(name).getAll(arg0); 
                   ^
    symbol: method getAll(Collection) 
    location: interface Ehcache 
    where CAP#1 is a fresh type-variable: 
    CAP#1 extends Object from capture of ? 
/Users/rcgeorge23/Documents/workspace/grails-cache-ehcache/src/java/grails/plugin/cache/ehcache/GrailsEhCacheManagerFactoryBean.java:761: error: method does not override or implement a method from a supertype 
         @Override 
         ^
/Users/rcgeorge23/Documents/workspace/grails-cache-ehcache/src/java/grails/plugin/cache/ehcache/GrailsEhCacheManagerFactoryBean.java:770: error: cannot find symbol 
           return getUnderlyingEhcache(name).hasAbortedSizeOf(); 
                   ^
    symbol: method hasAbortedSizeOf() 
    location: interface Ehcache 
/Users/rcgeorge23/Documents/workspace/grails-cache-ehcache/src/java/grails/plugin/cache/ehcache/GrailsEhCacheManagerFactoryBean.java:768: error: method does not override or implement a method from a supertype 
         @Override 
         ^
/Users/rcgeorge23/Documents/workspace/grails-cache-ehcache/src/java/grails/plugin/cache/ehcache/GrailsEhCacheManagerFactoryBean.java:777: error: cannot find symbol 
           getUnderlyingEhcache(name).putAll(arg0); 
                 ^
    symbol: method putAll(Collection) 
    location: interface Ehcache 
/Users/rcgeorge23/Documents/workspace/grails-cache-ehcache/src/java/grails/plugin/cache/ehcache/GrailsEhCacheManagerFactoryBean.java:773: error: method does not override or implement a method from a supertype 
         @Override 
         ^
/Users/rcgeorge23/Documents/workspace/grails-cache-ehcache/src/java/grails/plugin/cache/ehcache/GrailsEhCacheManagerFactoryBean.java:783: error: method putIfAbsent in interface Ehcache cannot be applied to given types; 
           return getUnderlyingEhcache(name).putIfAbsent(arg0, arg1); 
                   ^
    required: Element 
    found: Element,boolean 

이 문제가 발생한 사람이 있습니까? 나는 ehcache 플러그인이 여전히 유지되고 있다는 것을 알아 차리지 만, 현재 버전의 grails에서 작동한다고 추측합니다. 그러나 나는 그것을 작동시킬 수 없습니다. 또한 github에서 grails-ehcache 프로젝트의 최신 커밋을 복제하고 이것을 로컬 플러그인 프로젝트로 참조했지만 여전히 동일한 컴파일 오류가 발생합니다.

Grails 2.3.7을 사용하고 있습니다.

편집 1 : 나는 내가이 버전을 사용하는 경우 아마 몇 가지 중요한 개선 사항을 놓치고있어 상상하지만,으로 Ehcache 플러그인 버전 1.0.0을 사용하여 시작하는 내 응용 프로그램을 얻을 수 있었다

. ..

편집 2 : 지금은

확인은, 난 그냥 GitHub의에서 버전 1.0.0을 복제 한 체리는 TTL 결함 (https://jira.grails.org/browse/GPCACHEEHCACHE-6)에 대한 수정 사항을 들었다. 왜 1.0.4를 사용할 수 없는지 알아내는 것이 좋겠지 만 지금은 해결 방법이 있습니다.

+0

'grails clean-all'과'grails clean' (해를 끼치 지 마라)을 시도해보십시오. – nickdos

+0

하하, 내가 시도한 첫 번째 예! – rcgeorge23

답변

0

기본 2.3.11 앱으로 저에게 적합합니다. 따라서 다른 것이 ehcache 항아리의 이전 버전을 가져 오는 것 같습니다. grails dependency-report을 실행하면 아마이를 볼 수 있습니다.

1.0.4 플러그인은 net.sf.ehcache:ehcache:2.9.0에 달려 있지만 Ehcache에 의존하는 대부분의 다른 플러그인은 최신 버전으로 업데이트되지 않았으므로 net.sf.ehcache:ehcache-core:2.4.8에 대한 의존성이있을 수 있습니다. 조금 벗어. 그룹과 이름이 완전히 동일하지 않으면 하나의 항아리가 다른 그룹을 퇴출시킬 수 없기 때문에 이름에서 "코어"를 삭제했음을 알 수 있습니다. 따라서 두 사람이 classpath에 두 개의 jar를 모두 가질 수는 있지만 반대 순서로 끝나는 것이 가능합니다. 더 오래된 jar 클래스가로드되기 때문에 하나는 잘 작동하지만 이전 클래스는로드되기 때문에 다른 클래스는로드되지 않으므로 잘 작동합니다.

당신이 BuildConfig.groovy

grails.project.dependency.resolver = "ivy" 

grails.project.dependency.resolver = "maven" 

에서 일시적으로 전환하는 경우 당신은 더 나은 의존성 보고서를 얻을 수 있습니다은 - 받는다는 해결 프로그램은 콘솔에 출력을 생성하지만, 아이비 출력도 HTML 출력을 포함합니다.

해결할 수없는 경우 작은 별도의 테스트 앱을 만들어 동일한 방식으로 실패하도록 구성하십시오. 앱에서 BuildConfig.groovy 만 복사하면됩니다. https://jira.grails.org/browse/GPCACHEEHCACHE에서 문제를 작성하고 살펴 보겠습니다. BuildConfig.groovy를 변경하고이를 문제에 첨부하고, 그렇지 않으면 grails bug-report을 실행하고 만든 Zip 파일을 첨부하십시오.

+0

Burt에게 감사 드려요. 기회가 생겼을 때 시도해 볼게요. – rcgeorge23