0
votes

Imported the gradle project from the "complete" folder and received the following error:

Groovy:General error during semantic analysis:
java.lang.NoSuchMethodError: 'org.codehaus.groovy.ast.expr.Expression org.codehaus.groovy.ast.tools.GeneralUtils.propX(org.codehaus.groovy.ast.expr.Expression, java.lang.String)'

I am using the latest version of Eclipse, 2020-12, with groovy tools installed.

From grails guide

Downloaded code sample from github


It seems likely to be a version mismatch, but I cannot determine how to correct this problem.

I have tried to delete the offending file, src/main/groovy/demo/domain/Manufacturer.groovy, and the error appears on the file in this package on line 1.

The error does not appear in any other package. I have done the usual internet searches for resolutions that apply, but have thus far been unable to find a suitable solution. I am hopeful for a suggestion?

1
what are you starting? what error do you have? - daggett
I am not starting or running anything. The error reported appears as an Eclipse IDE error appears in the Problems view as a Java Problem after importing the project as "Existing Gradle Project". In Gradle Tasks view, all tasks are visible, but none are available for selection or execution. - rls1893

1 Answers

0
votes

I think this error comes from an AST transform that references the older signature of GeneralUtils#propX. This method used to return Expression and was changed to return PropertyExpression.

The bridge method for binary compatibility was missing in groovy-eclipse. https://github.com/groovy/groovy-eclipse/commit/f6f448675d95f858b4ec65b6fc8e55f27ccaaa94