NoamRab
NoamRab

Reputation: 41

GGTS 3.6 Groovy:Internal groovy compiler error

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

Upvotes: 0

Views: 3263

Answers (2)

ks2845
ks2845

Reputation: 11

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.

Upvotes: 1

aboyko
aboyko

Reputation: 1557

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.

Upvotes: 0

Related Questions