I am able to deploy my Grails 3 Server on Tomcat 8.5.x and Tomcat 9 (running Java8). I can't seem to get it working on Tomcat 10. I'm wondering if it's even possible. Is there a version matrix with Grails, Tomcat, and Java that someone can point me to?
Can a Grails 3 Server be deployed on Tomcat 10?
1k views Asked by M Heilner At
1
There is no easy answer to your question.
Grails compatibility with Tomcat depends on Tomcat and Java compatibility, and Grails compatibility with Java in turns depends on Groovy compatibility with Java and also on Spring/SpringBoot compatibility with Java.
Unfortunately, details about this matter tends to be scant, if any, in Grails official documentation.
So let's start putting the pieces together...
Grails - Groovy
To even find out which version of Groovy comes with which version of Grails, sometimes you will have to inspect the Grails package, because that information is not always present in Grails Documentation for every version.
The lib folder in every Grails package includes the Groovy version it depends on. This is from my computer (I have installed 8 different versions of Grails for different projects):
Someone even went to the trouble of compiling and sharing data about the specific version of Groovy included in every version of Grails.
And this is my own summary:
Please note that Grails has been very conservative about its Groovy version transitions. Also note that, as for today (2021-09-28), only beta versions of Grails (namely Grails 4.1.x) supports Groovy 3.x.
Grails - Spring/Spring Boot
Grails dependency on Spring and Spring Boot versions is available in Grails Documentation.
For example, Grails 3.3.14 uses Spring Framework 4.3.9 and Spring Boot 1.5.4. Both of them, Spring 4.3.9 Documentation and Spring Boot 1.5.4 Documentation, recommend Java 8, but also are backward compatible with Java 6 and Java 7.
Again, the lib folder in every Grails package includes the Spring / Spring Boot version it depends on. This is from my computer:
Fortunately, support of Spring and Spring Boot for Java is well documented for every release.
This is my summary:
Tomcat - Java
Tomcat has its own compatibility matrix with different Java versions. There you can see that starting 10.1.x Tomcat supports Java 11 and later, but version 10.0.x still supports Java 8.
Groovy - Java
Regarding Groovy compatibility with Java, you will find specific information in the Groovy's Release Notes files. For instance, according to the release notes, Groovy has official support for running on JDK 8 staring Groovy 2.3.
Also according the release notes, apparently Groovy 2.5.x works also with JDK 9/10 and JDK 11, although it has some caveats and instructions for each one; and better support for Java >= 9 were introduced in Groovy 3.0.
This is my summary:
Solving the puzzle
Now we have the pieces to solve this puzzle for any specific Grails and Tomcat versions combination.
For example:
In your particular case, lets say that you have the latest version of Grails 3.x series: Grails 3.3.14:
Summary Chart