This message was deleted.
# questions
s
This message was deleted.
m
wrong post, sorry.
a
@Mike Saubier Why did you delete your reply? I was checking it and it actually relates to my problem. I downloaded Grails 6 like you from the download link on the Grails website and did the upgrade. I'm reading now your github ticket to see if I can find something helpful for me. Please keep me updated if you find a solution. I will do the same. Thank you.
How to download Grails from sdkman by the way and does it work on windows? I saw the answer to my question already on Grails website.
@Mike Saubier Can you share with me a new app created with Grails 6 which is installed using sdkman? That would be helpful for me to update my app. Thanks
m
At the bottom of that ticket, they provide a comparison to help us modify our apps to work. Looks like mainly some updates to build.gradle, but I won't get a chance to really look at it until later today. I would suggest reviewing that comparison to see if it helps you. I will try to post something once I've been able to work on it myself.
šŸ‘ 1
a
I think it's the same generated from here https://start.grails.org/ right?
Will check it and try it myself
@Mike Saubier Applying the differences didn't make any difference. The same error is still occurring...
m
I was able to get a simple test application working by basically copying the build.gradle and settings.gradle files from the sample "website" application they provided a link for in the ticket. I plan on working on making similar updates to our main application at some point today to see if I can get it working.
The "preview" option on the Grails Forge seems to be another good way to compare files like build.gradle, gradle.properties, settings.gradle, etc.. https://start.grails.org/
Also, make sure you are using Gradle 7.6.2. I took it from the "website" app they provided and replaced Gradle 7.2 that was initially included in the test app I created using the "create-app" command.
a
@Mike Saubier I already upgraded Gradle to version 7.6.2 and changed my app's build.gradle & settings.gradle to the correct one but still my app works fine on IntelliJ but the same error occurs on Tomcat 9 😩
Nothing changed
The gradle warning is pretty annoying by the way
Copy code
Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
By the way there are differences that look strange. Like not having grailsw grailsw.bat and grails-wrapper.jar.... also Bootstrap.groovy doesn't exist anymore!
I haven't removed those, it doesn't look correct
By the way even a new app created by Grails forge https://start.grails.org/ has the same issue..
m
The app I'm upgrading from v5 to v6 seems to be working now, although we have a lot more testing to perform. After reviewing the "website" project provided by the Grails team in the ticket and Grails Forge, I ended up making some updates to build.gradle, gradle.properties, and settings.gradle. One of the most important updates for me was adding in the
tasks.withType(War)
configuration in the build.gradle file. See the ticket for more information: https://github.com/grails/grails-core/issues/13130
a
@Mike Saubier After lots of tests and comparisons, I found out why my app is not starting on Tomcat. I fixed the issue by: • Excluding the spring-boot-cli dependency which is used by the grails-shell plugin I use. Apparently spring-boot-cli has its own WebApplicationInitializer which usually starts the war from from it instead of GrailsAppServletInitializer. • Making sure that jakarta.annotation-api is included in the generated war file. It wasn't before since I put spring-boot-starter-tomcat as providedCompile to not be included in the war file. Now everything works fine.
But still I didn't get the Grails 6 framework binary from sdkman. Couldn't make sdk work on my PC.
m
Glad you got it working, @Armando!
a
@Mike Saubier Thank you 😊