4

When I create a new "Grails Project" in GGTS-3.3.0 with Grails 2.3, I get several errors in ForkedTomcatServer.groovy. These are the errors I get:

Groovy:[Static type checking] - No such property: version for class: org.codehaus.groovy.grails.plugins.GrailsPluginInfo ForkedTomcatServer.groovy /testapp/.link_to_grails_plugins/tomcat-7.0.42/src/groovy/org/grails/plugins/tomcat/fork line 165

Groovy:[Static type checking] - No such property: descriptor for class: org.codehaus.groovy.grails.plugins.GrailsPluginInfo ForkedTomcatServer.groovy /testapp/.link_to_grails_plugins/tomcat-7.0.42/src/groovy/org/grails/plugins/tomcat/fork line 166

These are the lines of code referenced in the errors:

GrailsPluginInfo info = GrailsPluginUtils.getPluginBuildSettings().getPluginInfoForName('tomcat')
String jarName = "grails-plugin-tomcat-${info.version}.jar"
File jar = info.descriptor.file.parentFile.listFiles().find { File f -> f.name.equals(jarName) }

I have not made any changes whatsoever. I just clicked File -> New -> Grails Project and the output has these errors. I have made several different projects and they all generate the same way.

Why is this happening and how can I fix it?

Benoit Wickramarachi
  • 6,096
  • 5
  • 36
  • 46
Buns of Aluminum
  • 2,439
  • 3
  • 26
  • 44

5 Answers5

6

To fix this issue you should install Groovy 2.1. In GGTS the Groovy 2.1 is available from the dashboard. This solved my the problem.

petvoj
  • 76
  • 3
  • This solved my issue - I used the Eclipse Level 4.3 and Release update site http://dist.springsource.org/release/GRECLIPSE/e4.3/. In the eclipse menu select Help --> Install New Software and add the URL listed below. Thanks to petvoj – user1811107 Sep 25 '13 at 05:56
  • This worked perfectly. From the Dashboard: Install Extension -> Select Groovy 2.1 -> Click the Install button -> Restart GGTS – Buns of Aluminum Oct 14 '13 at 14:27
5

From 2.3.0 Latest News updated yesterday

We are aware that the IDEs will require some updates to work with Grails 2.3.0. If you plan to use 2.3.0 soon, please use the Intellij IDEA EAPs and latest GGTS milestone releases which include updates to work with Grails 2.3.0

dmahapatro
  • 49,365
  • 7
  • 88
  • 117
  • Ah! I wasn't aware. Thank you. – Buns of Aluminum Sep 11 '13 at 13:19
  • 1
    Well, I've updated my GGTS installation with the milestone updates and even nightly updates (using urls from this page: http://www.springsource.org/STS-installation-instructions), but no luck. I suppose I'll have to wait for something more official. – Buns of Aluminum Sep 11 '13 at 17:00
2

I have the same issue to use Grails 2.3.0 with GGTS 3.3.0. After I installed the Groovy 2.1 from dashboard, this problem is gone. The same issue of the compiler version mismatch is also gone after install the latest Groovy

wei yubo
  • 21
  • 1
1

Workaround. Open ForkedTomcatServer.groovy, comment out the @CompileStatic, save file. The error will disappear. Now you can go ahead and un-comment that line and the error is gone. Groovy magic!

wholenewstrain
  • 199
  • 1
  • 8
0

I also had this issue. Installtion of the Groovy 2.1 compiler sorted that out.

One of my errors said my workspace did not match the project and I could right-click and Eclipse fixed that part. Real issue was that I needed to update my compiler to 2.1.

uzerzero
  • 146
  • 2
  • 6