I am currently upgrading from Grails 3.3.10 to Grails 4.0.0. When attempting to run my project I get the following error:
Execution failed for task ':bootRun'.
15:31:02.101 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] > Unable to find a single main class from the following candidates [com.torque.Application, com.base.torque.ExtendedReportsController, com.base.torque.utils.NaturalOrderComparator]
Whether I try to run the project in my IDE or my terminal, I get the same error.
I uninstalled and reinstalled grails 4.0.0 and I still get the error. Tried ./gradlew clean
, rebuilding, killall -9 java
and still get the error.
This was not an issue with previous Grails versions. No clue what is causing the issue with Grails 4 and no clue how to solve. Any insight towards a solution would be appreciated.
main
method incom.base.torque.utils.NaturalOrderComparator
andcom.base.torque.ExtendedReportsController
? – Osmundmain
method in a controller or a comparator, but the error message suggests that is the case. The answer I posted below describes how to make the error go away. If the error is happening and you don't havemain
methods in those classes, I think that would represent a bug. If that is the case, please file an issue at github.com/grails/grails-core/issues and we can investigate. – Osmundmain
method incom.base.torque.ExtendedReportsController
. – Osmundgrails clean
the error was gone. – Excide