Vaadin 24 + Spring Boot 3 + Tomcat 10.x

Hello,
I have some problems with the tecnologies in the title.
Here are the steps I did to reproduce the problem:

OS: Windows 10 Pro Build 19044
Java 17.0.4.1

I download a fresh Tomcat 10.1.0 installation, unzip it and verify it works by going into bin folder and then “.\catalina.bat run”. If I go to localhost:8080 it works.
Then I go to https://start.vaadin.com/app, leave everything as it is and change only Vaadin version 24. Then I download and extract the .zip with this new project (my-app).
If I open the my-app folder and do a “.\mvnw”, Vaadin works. In the pom.xml I see

` jar

<properties>
    <java.version>17</java.version>
    <vaadin.version>23.2.0.beta2</vaadin.version>
    <flow.version>24.0.0.alpha1</flow.version>
    <selenium.version>4.4.0</selenium.version>
</properties>

<parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>3.0.0-M4</version>
</parent>`

Then I follow this tutorial https://vaadin.com/blog/packaging-and-deploying-spring-boot-applications-as-war-files and change the packaging in my pom.xml from jar to war (no other changes); after that, a “.\mvnw package” and I have my beautiful .war file named “myapp-1.0-SNAPSHOT.war”; I rename it “myapp.war”.
Then, while Tomcat is running, I copy the .war file to webapps folder in Tomcat. Stack trace attached.

What did I do wrong? Any help is appreciated. If you need me to do any more test (like changing Tomcat or Vaadin version), I’m here

Thank you!
pom.xml (9.54 KB)

Tomcat 10.1? Well that’s Servlet 6 and totally out of scope of Vaadin 24 and Spring Boot 3.0 - both are updated to Servlet 5; meaning Tomcat 10.0.x

Additionally there is something missing in the guide; you also need to customize the Application.java class

Application extends SpringBootServletInitializer

and you are building the application without production mode, which would probably create more issues

Thank you!!! I’ll try right now with:

  • Tomcat 10.0.27 instead of 10.1.0;
  • Application extends SpringBootServletInitializer
  • production mode

In a few minutes I’ll be back here…

I installed Tomcat 10.0.27 instead of 10.1.0;
I checked my Application.java class: it’s already declared as public class Application extends SpringBootServletInitializer implements AppShellConfigurator {
I did .\mvnw clean package -Pproduction to get my war, then renamed to myapp.war;

Same error… what can I try?

unknown.png

If it’s needed I can upload the project but it’s just as described up there… :slightly_smiling_face:

Vaadin 24 + Spring Boot 3 + Tomcat 10.x

The good thing… it’s not your fault… the bad thing the fix isn’t released :sweat_smile:

The fix is https://github.com/vaadin/flow/commit/234a6345c34b1a48674c28106b0017c1e404cffd but is 6 days after the first alpha

I tought it was something like that… Is there anything I can do? Maybe ask for a “alpha2” release…

If you think the only thing I can do is waiting, I think I’ll use .\mvnw to test Vaadin 24 and then wait to deploy it in my Tomcat :slightly_smiling_face:

Just thinking out load: I would guess there is a new release that also supports Boot M5+ in the next week(s)

Let’s hope so! I’ll start spamming GitHub asking for this release (just kidding)

@quintessential-ibex got some information for us about an upcoming release? :wink:

Dear Matti, is there anything I can do to help you with this release? Even if it involves some money donation… :smile:

(just to do a final test, I tried Vaadin 23.2.3 with Tomcat 9.0.68 and it works)

Good catch, that article. Looks like it has some technical errors. I’ll try to fix that article today.