GGTS repetitive method name/signature error in controllers

谁都会走 提交于 2019-12-10 10:15:33

问题


I am using latest GGTS v3.4 based on eclipse 4.3.1 64bit version for development app on Grails 2.3.2. Every single controller that is in my classpath has an error in it. There are two identical errors per every controller class.

Groovy:Repetitive method name/signature for method 'java.lang.Object withFormat(groovy.lang.Closure)' in class 'package.SomeController'.

SomeController.groovy /appname/grails-app/controllers/package line 1

Java Problem

Everything just work, but my Problems tab is getting quite messy.


回答1:


This seems to be a problem when you run GGTS with JDK8. Switching to JDK7 fixes the problem until the problem is fixed.

See issue comments of STS-3696




回答2:


I usually have this issue in GGTS whenever I start a project. Look at your Project properties and check to make sure the correct version of Groovy is selected for the workspace.

I'll find the Groovy version is set to 1.8 when I'm using 2.0.




回答3:


Upgrading to Grails 2.4.4 fixed the issue for me.

My conf of GGTS is:
Version: 3.6.3.RELEASE
Platform: Eclipse Kepler SR2 (4.3.2)

JDK 1.7




回答4:


It could be one of several reasons.

  1. Grails Version in Window -> Preference -> Groovy -> Grails.
  2. Groovy Version in Window -> Preference -> Groovy -> Compiler.
  3. Java Version is not set correctly. It's your PATH instead of under Window -> Preference -> Java -> Installed JREs. If it doesn't match the Groovy/Grails for your workspace/project, there would be error.

For example, I run into this problem when I am using Grails 2.3.1, Groovy 2.1.8. My Java version is 1.8, which is incompatible with Groovy 2.1.8. I changed it to 1.7, restarted GGTS, the problems are gone.



来源:https://stackoverflow.com/questions/20111985/ggts-repetitive-method-name-signature-error-in-controllers

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!