Error while calling a method on a Groovy class

You may encounter an error when compiling your project that looks like this:

Failed to execute goal org.codehaus.gmavenplus:gmavenplus-plugin:1.6:compile (default) on project <project>: Error occurred while calling a method on a Groovy class from classpath.

It is not at all clear what class are meant. If you work with IntelliJ IDEA – this is the reason. Sometime it parses maven build/compile logs incorrectly, so the second part of the exception was lost.

Compile manually through the terminal with the command:

mvn clean package

And you will see the full text of the error. It should be something like this:

Failed to execute goal org.codehaus.gmavenplus:gmavenplus-plugin:1.6:compile (default) on project <project>: Error occurred while calling a method on a Groovy class from classpath.
InvocationTargetException: <…some_path…>/SomeClass.java or groovy.

So, most likely it’s a dependency conflict.

Telegram channel

If you still have any questions, feel free to ask me in the comments under this article or write me at promark33@gmail.com.

If I saved your day, you can support me 🤝

2 thoughts on “Error while calling a method on a Groovy class

Leave a Reply

Your email address will not be published. Required fields are marked *