404 Not Found when upgrading from 21 to 23

I have 3 applications running on Vaadin 23. Two of them were upgraded from Vaadin 21. I am trying to upgrade my last Vaadin 21 app to Vaadin 23. I tried following the generated upgrade guide. The problem is that after mvn clean install and running the application, I am getting 404 Not Found from Tomcat for any URLs I try to access… even the root path /.

I am using Spring Boot and upgraded to 2.7.11 as part of the upgrade path, but I also did try 2.6.6 which was recommended by the guide.

Here are the notable upgrade steps I took.

Deleted node_modules folder.
Deleted the pnpm-lock.yaml file (that was the only lock file).
Upgraded Spring Boot from 2.5.4 to 2.7.11.
Upgrade Vaadin from 21.0.3 to 23.3.14.
Upgraded Spring Cloud from 2020.0.4 to 2021.0.7.
Commented out all <dom-module> tags in my index.html (I’ll migrate the custom styles to their new respective component css files later).
Replaced @Theme(themeClass = Material.class) with @Theme(value = "default").

When I start up the app, in the stdout I am not seeing any mention of Vaadin and Node, which I do see in my other Vaadin 23 apps. Specifically I do not see any of the following (which I do see in my other Vaadin 23 apps)…

12:53:44.048 - [  restartedMain] ServletContextInitializer : Search for VaadinAppShell took 80 ms
12:53:45.089 - [  restartedMain] ServletContextInitializer : Search for subclasses and classes with annotations took 767 ms
12:53:45.177 - [  restartedMain] .s.DevModeStartupListener : Starting dev-mode updaters in C:\Users\some_user\git\some_app folder.
12:53:45.227 - [  restartedMain] s.FullDependenciesScanner : Visited 149 classes. Took 32 ms.
12:53:45.248 - [onPool-worker-2] nfExistenceWhileUsingVite : 

**************************************************************************
*  Webpack related config file 'webpack.config.js' is detected in your   *
*  project while Vite is the default frontend build tool as of V23.2.0.  *
*  This warning is to prevent any confusion or any accidental            *
*  misconfiguration in webpack related config files while using Vite.    *
*  Apparently, the 'webpack.config.js' file in your project seems not to *
*  have any custom changes/configurations (it contains the default       *
*  content which is generated by Vaadin). Thus to be sure, you can first *
*  make a backup and then safely delete it to get rid of this warning.   *
*  If you are migrating from an earlier version and you are still unsure *
*  about using Vite, you can reactivate webpack via setting the          *
*  'com.vaadin.experimental.webpackForFrontendBuild=true' feature flag   *
*  in [project-root]/src/main/resources/vaadin-featureflags.properties   *
*  (you can create the file if not exists) and restart the application.  *
*  Using webpack with Vaadin applications is deprecated and the support  *
*  for reactivating it would be removed in the next major release.       *
**************************************************************************


Vaadin application has been deployed and started to the context path "/".
12:53:45.322 - [onPool-worker-2] .f.s.f.TaskUpdatePackages : Running `npm install` to resolve and optionally download frontend dependencies. This may take a moment, please stand by...
12:53:45.331 - [  restartedMain] o.a.c.c.C.[.[.[/]         : Cannot deserialize session attribute [com.vaadin.flow.server.VaadinSession.springServlet] for session [7556375257AACDD11DDD188970059CE8]
12:53:45.527 - [onPool-worker-2] c.v.f.s.f.FrontendTools   : The globally installed Node.js version 12.18.3 is older than the required minimum version 16.14.0. Using Node.js from C:\Users\jmart\.vaadin.

I reviewed the two commits from the upgraded apps to see if I can find any missing steps, but was not able to.

Any idea what could be wrong?

What are you seeing in the logs?

So in a working app I am seeing this log. But it is not in the app that I am trying to upgrade.

Creating shared instance of singleton bean 'com.vaadin.flow.spring.SpringBootAutoConfiguration'

This is the first line in the logs of a working app where the word “vaadin” shows up. In the app not working, a search vaadin show the following error log.

org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'com.vaadin.flow.spring.VaadinConfigurationProperties' available
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBean(DefaultListableBeanFactory.java:351)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBean(DefaultListableBeanFactory.java:342)
    at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1172)
    at com.vaadin.flow.spring.DevModeBrowserLauncher.running(DevModeBrowserLauncher.java:49)
    at org.springframework.boot.SpringApplicationRunListener.ready(SpringApplicationRunListener.java:110)
    at org.springframework.boot.SpringApplicationRunListeners.lambda$ready$6(SpringApplicationRunListeners.java:82)
    at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
    at org.springframework.boot.SpringApplicationRunListeners.doWithListeners(SpringApplicationRunListeners.java:120)
    at org.springframework.boot.SpringApplicationRunListeners.doWithListeners(SpringApplicationRunListeners.java:114)
    at org.springframework.boot.SpringApplicationRunListeners.ready(SpringApplicationRunListeners.java:82)
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:318)
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1312)
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1301)
    at net.hikati.SalonPorterApplication.main(SalonPorterApplication.java:36)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:568)
    at org.springframework.boot.devtools.restart.RestartLauncher.run(RestartLauncher.java:49)

23.3 is needing Spring Boot 2.7.x

I am using Spring Boot 2.7.11.

What about this error message?

org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'com.vaadin.flow.spring.VaadinConfigurationProperties' available

Could this be a clue to what underlying problem?

that looks really suspicious but never seen such an error :/ you probably have to get a project from start.vaadin.com and do a diff between yours and the example pom

Vaadin 23 is not an option. What a horrible mess this upgrade has turned out to be. So much lost productivity.

Can you post your POM file (or at least the dependency and dependencyManagement sections) and the output of mvn dependency:tree -Dverbose?

A potential cause of this issue may be refererencing an older version of vaadin-spring (or starter) dependency

Thank you. I’ll take a look if that is the case. I did notice that the node_modules directory never got rebuilt after deleting it. One of the first steps in the guide was to delete the node_modules directory. I would have thought that executing mvn clean install would have created a new node_module directory. Do I need to call pnpm to recreate it?

It should not be necessary. Please post the full mvn execution logs. Maybe we can find something there