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.
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
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.
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
It could be one of several reasons.
Grails Version in Window -> Preference -> Groovy -> Grails.
Groovy Version in Window -> Preference -> Groovy -> Compiler.
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.
Related
I have a grails project, recently nothing compiles.
in eclipse on the Problems tab I see 100 out of 300 problems, most of them are Groovy:Internal groovy compiler error. every class has a red X on it, if I add an empty line in the file and save it the error would go away but not for long.
I had tried Build / Clean (both eclipse's and grails') / Refresh Dependencies / Compile in any possible combination. The run-app command works from eclipse with no issues. but eclipse is going crazy because I have so many errors. The only way I could make the errors go away is to disable eclipse's Build Automatically option and clean (without allowing it to build after)
Does anyone has an Idea ?
Current GGTS settings
Windows -> Preferences -> Java -> Installed JREs == jdk1.8.0_11
Windows -> Preferences -> Groovy -> Compiler == 2.3.3
Windows -> Preferences -> Groovy -> Grails == Grails 2.4.2
Help -> About Groovy/Grails Tool Suite == Version: 3.6.0.RELEASE
You can change your compiler level in (your workspace)/.settings/org.eclipse.jdt.groovy.core.prefs
We had this same problem with a project we had upgraded, switched from
groovy.compiler.level=23
to
groovy.compiler.level=21
and all the errors went away.
Seems like you're experiencing some sort of mismatch between versions of Java, Groovy Compiler and Grails. Perhaps your Groovy compiler is the latest 2.3.x from the update site but Grails version is lower than latest. Try starting GGTS 3.6 with Java 8 VM also set it as currently installed JRE in the preferences, set Groovy compiler to 2.3.3 and use Grails 2.4.1 or later.
Groovy below 2.3 and Grails below 2.4 don't support Java 8. I'd play around with the versions of Java, Groovy compiler in Eclipse preferences and Grails version to fix this problem.
I try to use the FindBugs 3.0.0 in my Eclipse Luna.
After installing it it should be available on context menu of my JavaProject and under Window -> Preferences -> Java -> Find Bugs.
But it isn't there.
I tried it with installation from Marktplace, Update Site and downloading the Zip and putting it into my Eclipse installation.
Is there anything else I have to do to make it run?
Greeting
Sören
I had the same problem. My eclipse run on JVM 6 and FindBugs didn't work. I switch eclipse to use JVM 7 and this fixed issue. For more info how to switch JVM version that eclipse uses, see this eclipse Wiki
My installation of FindBugs 3.0.0 in eclipse luna works fine but I´ve installed the 3.0.0.20140629 version.
As a colleague of me, has the same problem hence I am not going to update it :)
Try to install the earlier version (not using the eclipse marketplace), this should fix your issue in the meantime.
I am getting a message for when I start a new Grails project that project level is 2.1 and workspace level is 2.0.
When I go to preferences>Groovy>compiler it say the current version that I have is 2.0.7.
I have also tried right clicking on the project and then choosing Groovy>fix compiler mismatch problems.
I am using eclipse Kepler j2ee on a mac and using grails 2.3.3. How can I fix the program?
I think you should change your groovy compiler version to 2.1.5
Currently i use Grails.2.3.0 under preference->grails
and my groovy has been selected like this one You are currently using Groovy Compiler 2.1.5
There is a Switch to Selection for Groovy Compilers --but i suggest
Makes usre your groovy package has been insatlled or package is not corrupted and correct.
Change or install groovy compiler 2.1.5 that works fine with Grails 2.3.0 or Grails 2.3.3
and Make Refresh Dependency To your Project...
Right click on project. Go to Properties.
vvSo hi guys, im tryin to install groovy 1.7 plugin to my eclipse indigo but i can't..
I followed instructions on this page but unfortunetly it doesn't work.
What i mean by doesn't work?
Even without installing 2.0 compiler i have it
After installing Groovy-Eclipse without the extra compilers, the Groovy 1.8 compiler is active by default. And the Groovy 2.0 compiler becomes active after installing the extra compiler.
And as it says i shouldn't have but well meaby its an old description.
Then i'm goin to Preferences -> Groovy -> Compiler page, and guess what i can only switch to 1.8.6.xx-MORENUMBERS-e37-REALEASE. When i do i only can switch back to 2.0.7.xx-MORENUMBERS-e37-REALEASE.
So where is this 1.7 compiler because i dont see it there?
So i followed up with adding to eclipse.ini -groovy.compiler.level 17, still doesn't work.
I tried to change file bundles.info, but there is no 1.7 version.
So someone know how i can get this compiler 1.7? I was searching it so long, and i only found Groovy Eclipse plugin that only operates on 2 version (above one).
Thanks in advance for an answer!
It's been a while since i last saw 1.7 in the plugin. I guess it got outdated and removed. This page (near the bottom) tells that Groovy 1.7 is deprecated for GGTS (which, i guess, uses Groovy-eclipse):
Deprecating of Groovy 1.7 support
The Groovy 1.7 support in GGTS has been deprecated. It is still possible to install it for this release, but it will be removed in future releases. If you need to install the Groovy 1.7 compiler, then:
Go to Help -> Install new software
Choose the Springsource update site to work with
Uncheck Group items by category, As shown in the image:
Is that doesn't work, maybe you can try to install an older version of Groovy-eclipse from http://dist.springsource.org/.
strong texti have a very simple eclipse 3.8-based rcp application with an .aj file. i also have AJDT 2.2.1 installed, and have the following four entries in my build.properties:
javacSource=1.6
javacTarget=1.6
compilerAdapter=org.eclipse.ajdt.core.ant.AJDT_AjcCompilerAdapter
sourceFileExtensions=*.java, *.aj
i am using a headless build approach via Ant, and it has been working like a charm, AJDT and all, while using java 1.6. but once i upgraded from java 1.6 to 1.7, and changed the two aforementioned build.properties entries' -- javacSource and javacTarget -- values from 1.6 to 1.7, i got a boat-load of build errors, all with the following suffix:
... are only available if source level is 1.5 or greater
setting build.properties' javacSource back to 1.6, while leaving javacTarget at 1.7 works. or if i were to comment out the two AJDT-specific entries from my build.properties, while leaving javacSource and javacTarget values at 1.7. the build completes just fine as well. so my guess is that AJDT compiler is somehow the culprit. the question is why and what can be done to resolve it.
thank you for your time!!!
It sounds like one of two things:
Your AJDT installed does not have an AspectJ in it that is compatible with Java 1.7. What AspectJ version are you building with? Note that this aspectj version may be different from the one in your target platform.
You are not correctly specifying the Java source/target version in a way that AspectJ can recognize. How are you specifying the Java source/target version?