Grails 2.3 new application is 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 check] - 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 check] - there is no such property: handle 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 by 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 changed anything. I just clicked File -> New -> Grails Project , and these errors appeared on the output. I have made several different projects, and they are all generated the same way.

Why is this happening and how can I fix it?

+4
source share
5 answers

To fix this problem, you must install Groovy 2.1. GGTS Groovy 2.1 is available on the dashboard. This solved my problem.

+6
source

From 2.3.0 Latest news updated yesterday

We know that the IDE will require some updates to work with Grails 2.3.0. If you plan to use 2.3.0 in the near future, use Intellij IDAP EAP and the latest releases of GGTS, which include updates for working with Grails 2.3.0

+5
source

I have the same problem as using Grails 2.3.0 with GGTS 3.3.0. After I installed Groovy 2.1 from the control panel, this problem disappeared. The same compiler version mismatch issue also disappeared after installing the latest Groovy version

+2
source

Workaround. Open ForkedTomcatServer.groovy, comment out @CompileStatic, save the file. The error will disappear. Now you can continue and not comment on this line, and the error has disappeared. Groovy magic!

+1
source

I also had this problem. Groovy 2.1 compiler installation sorted.

One of my mistakes says that my workspace does not correspond to the project, and I could right-click, and Eclipse fixed this part. The real problem was that I needed to upgrade my compiler to version 2.1.

0
source

Source: https://habr.com/ru/post/1501549/


All Articles