1

Intention: I want to switch from Vaadin 23.2.10 to 23.3.1.

What I did: In the pom.xml I changed Vaadin version from 23.2.10 to 23.3.1.

What happened: After that the application (Spring Boot plus Vaadin) starts, but the UI doesn't show up. Instead I see this message:

404 message

Question: Is there anything special to migrate between these versions? The guide at https://vaadin.com/blog/vaadin-23.3-kubernetes-cloud-new-ui-components just says "Update the Vaadin version in your pom.xml to 23.3.0 if you are on Vaadin 23.2.x."

What I tried and additional observations:

  • Thanks to virtualization I've got the same development environment multiple times. When leaving Vaadin at version 23.2.10 everything works fine. Just after switching to 23.3.1 (or 23.3.0) the UI doesn't show up any more.

  • When switching from 23.3.1/23.3.0 back to 23.2.10 then the UI starts but there shows up an error message in the UI: "

     [TypeScript] Cannot find module '@vaadin/tooltip' or its corresponding type declarations.
     /home/[mypath]/frontend/generated/jar-resources/tooltip.ts:1:25
       > 1 | import { Tooltip } from '@vaadin/tooltip';
           |                         ^^^^^^^^^^^^^^^^^
         2 |
         3 | const _window = window as any;
         4 | _window.Vaadin = _window.Vaadin || {};
    
  • Deleting the folders .m2/com/vaadin and node_modules and the package.json and package-lock.json does not help: the 404 error behavior still occurs with version 23.3.x.

  • In a well working application (with Vaadin 23.2.10 without ever trying to upgrade) there is a message in the console at startup: "Vaadin application has been deployed and started to the context path "/".". This message is missing with the 23.3.x releases.

S. Doe
  • 685
  • 1
  • 6
  • 25
  • 4
    run mvn vaadin:clean-frontend – Simon Martinelli Dec 22 '22 at 14:37
  • The command ran without error and also a `mvn --activate-profiles production clean package` ran without error (what it hadn't done before) and the rollback to version 23.2.10 now is without any error message in the UI. Thank you! :-) Unfortunately, the behavior with 23.3.1 is still the same as before: the UI doesn't show up. – S. Doe Dec 22 '22 at 17:32
  • And you still get the same error? – Simon Martinelli Dec 22 '22 at 19:29
  • Note that `vaadin:clean-frontend` is a different goal from `clean`. – ollitietavainen Dec 23 '22 at 07:01
  • Yes, it's the same behavior as before. I tried it again: (1) Start system with 23.2.10: everything works fine (output `Vaadin application has been deployed and started to the context path "/".` and `Starting Frontend compilation.` and `Frontend compiled successfully.`). (2) Stop the system. (3) Shutdown eclipse (to ensure that it's not an eclipse problem). (4) Change version in pom.xml from 23.2.10 to 23.3.1. (5) `mvn clean install -DskipTests` runs with result "BUILD SUCCESS". (6) `mvn vaadin:clean-frontend` runs with result "BUILD SUCCESS". – S. Doe Dec 23 '22 at 08:58
  • [...] (7) Start eclipse. (8) Do a refresh at the project. (9) Start the system. It does not output any hint like `Vaadin application has been deployed` or `Starting Frontend compilation`. (10) Open localhost:8080 in browser. (11) It redirects to localhost:8080/login and shows the message above with `HTTP ERROR 404 Not Found` and `SERVLET: dispatcherServlet` – S. Doe Dec 23 '22 at 08:58
  • Running an additional `mvn clean package -Pproduction` and starting the system again also results in the same behavior. The content of package.json contains libs in version 23.3.1, so this is updated. – S. Doe Dec 23 '22 at 09:13
  • 1
    Just wondering, what version of spring boot are you using? Only 2.7.x is supported by Vaadin 23.3. – Knoobie Dec 23 '22 at 12:50
  • The application used Spring Boot 2.6.x. After upgrading to 2.7.x Vaadin 23.3.1 shows a UI. Good hint, thank you very much, @Knoobie! :-) – S. Doe Dec 23 '22 at 14:03

1 Answers1

7

As noted from the release notes Spring Boot 2.7.x is needed to run the latest Vaadin 23.3.x.

Vaadin 23.3.x can't register its custom Servlet with Spring Boot <= 2.6.x, because it switched to the new / non-deprecated @AutoConfiguration available since Spring Boot 2.7.0 to prepare for Spring Boot 3.0 where the old mechanism is completely removed.

Knoobie
  • 1,968
  • 10
  • 14