New Grails 2.3 App gets created with ForkedTomcatServer.groovy errors

1.9k views Asked by At

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?

5

There are 5 answers

2
petvoj On BEST ANSWER

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.

2
dmahapatro On

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

0
wholenewstrain On

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!

0
uzerzero On

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.

0
wei yubo On

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