Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

New Grails 2.3 App gets created with ForkedTomcatServer.groovy errors

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?

like image 827
Buns of Aluminum Avatar asked Dec 09 '22 13:12

Buns of Aluminum


2 Answers

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.

like image 177
petvoj Avatar answered Jan 19 '23 01:01

petvoj


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

like image 23
dmahapatro Avatar answered Jan 19 '23 00:01

dmahapatro