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.
If you have multiple classes which contain a main
method, you can disambiguate with something like this in your build.gradle
:
springBoot {
mainClassName = 'com.torque.Application'
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With