1

I am upgrading a project from grails 2.4.0 to 2.5.4 shortly after I upgraded it from 2.3.7 -> 2.4.0 and I am getting this error.

[groovyc] org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
  [groovyc] Compile error during compilation with javac.
  [groovyc] /home/michal/Desktop/ikariera/ikariera/target/work/plugins/cache-1.1.7/src/java/grails/plugin/cache/GrailsAnnotationCacheOperationSource.java:220: error: no suitable method found for parseCacheAnnotations(AnnotatedElement)
  [groovyc]             Collection<CacheOperation> annOps = annotationParser.parseCacheAnnotations(ae);
  [groovyc]                                                                 ^
  [groovyc]     method CacheAnnotationParser.parseCacheAnnotations(Class<?>) is not applicable
  [groovyc]       (argument mismatch; AnnotatedElement cannot be converted to Class<?>)
  [groovyc]     method CacheAnnotationParser.parseCacheAnnotations(Method) is not applicable
  [groovyc]       (argument mismatch; AnnotatedElement cannot be converted to Method)
  [groovyc] Note: /home/michal/Desktop/ikariera/ikariera/target/work/plugins/scaffolding-2.1.0/src/java/org/codehaus/groovy/grails/scaffolding/AbstractGrailsTemplateGenerator.java uses or overrides a deprecated API.
  [groovyc] Note: Recompile with -Xlint:deprecation for details.
  [groovyc] 1 error
  [groovyc] 
  [groovyc] 
| Compiling 232 source files.
| Error Compilation error: startup failed:
Compile error during compilation with javac.
/home/michal/Desktop/ikariera/ikariera/target/work/plugins/cache-1.1.7/src/java/grails/plugin/cache/GrailsAnnotationCacheOperationSource.java:220: error: no suitable method found for parseCacheAnnotations(AnnotatedElement)
            Collection<CacheOperation> annOps = annotationParser.parseCacheAnnotations(ae);
                                                                ^
    method CacheAnnotationParser.parseCacheAnnotations(Class<?>) is not applicable
      (argument mismatch; AnnotatedElement cannot be converted to Class<?>)
    method CacheAnnotationParser.parseCacheAnnotations(Method) is not applicable
      (argument mismatch; AnnotatedElement cannot be converted to Method)

I tried uprading chache plugin from 1.1.3 to 1.1.{4,5,6,7,8} but everything gives the same error. I would be glad for an idea, where could lie the problem.

Michael.D
  • 179
  • 1
  • 15
  • That surprises me. In general cache 1.1.8 is compatible with Grails 2.5.4. Please file an issue at https://github.com/grails-plugins/grails-cache/issues, provide a link to a sample app which demonstrates the problem, and we can troubleshoot that. Thanks for the feedback. – Jeff Scott Brown Jul 08 '16 at 18:33
  • It isn't clear why Grails 2.4.0 is involved but 1.1.6 of the cache plugin is the version we shipped with 2.4.0. Not sure if there are incompatibilities with 1.1.7 or not. – Jeff Scott Brown Jul 08 '16 at 18:36
  • Thank you for your help. :) I am just a college student and new to grails framework. I will be upgrading this app from 2.5.4 to 3.1.9, so stay tuned to my stackoverflow channel. :) – Michael.D Jul 09 '16 at 21:35

2 Answers2

1

I think moving plugin to 1.1.8 and deleting target folder + grails clean made the trick. Now I am getting this kind of errors on some of my domain classes

| Warning The [$tt__showOut] action in [cz.ikariera.student.StudentAccountMessageController] accepts a parameter of type [org.springframework.transaction.TransactionStatus]. Interface types and abstract class types are not supported as command objects. This parameter will be ignored.

and some resource plugin based and gsp based issues.

But cache plugin is OK.

Michael.D
  • 179
  • 1
  • 15
  • The warning message you mention there has nothing at all to do with the cache plugin or the original question. That warning is safe to ignore and is the result of a bug in 2.5.4 that was fixed in 2.5.5. See https://github.com/grails/grails-core/issues/9770 – Jeff Scott Brown Jul 11 '16 at 03:39
1

I had a similar problem and for me it helped to delete the .slcache folder in the project root folder.

YAT
  • 456
  • 1
  • 4
  • 14