New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Spring Boot Remote not working since v2.7.12 #39733
Comments
Thanks for the report. We have integration tests for restarts with both a local application and a remote application. The app that's used for tests uses Tomcat and all of the tests are passing. In short, we're not aware of any general problems with the remote restart support so there must be something specific to your usage of it that is causing it to break.
Unfortunately, we don't have time to use such a complex reproducer as there are too many moving parts. Any one of them could be causing the problem, not just Spring Boot. If you would like us to spend some more time investigating, please provide a reproducer that contains the bare minimum that's needed to reproduce the problem. The process of producing this reproducer may identify an external cause which can then be addressed by the relevant maintainers. If it identifies Spring Boot as the cause we can then take another look and see why our existing tests didn't catch the problem. |
Hi @wilkinsona, I managed to create a fairly simple end to end (e2e) test project that consistently reproduces the issue. You should be able to clone the project and run If you carefully review the CI logs, you'll notice that with version 2.7.11, the test does pass: However, for the 2.7.12 version the test fails (I assume it will be the same for any 3.x.x version too): I configured the test to print out the log of the remote application, we can see here the stacktrace I mentioned in the issue description:
Regarding the integration test you linked, I'm not sure if it applies to the current scenario (Remote Update). I do see there's a RemoteApplicationLauncher, but this one doesn't contain a test scenario for the update feature either. P.S. I saw there was a link to the integration tests after bootstrapping my own project and working on the complete implementation 🤦. I would have worked on the original repo otherwise, sorry. |
I am pretty sure that it does. Every test in that class is making an update to the application. The tests are run in three different ways:
Spring Boot 2.7.x is out of OSS support. Do you know that it fails with 3.x.x or is this just an assumption? |
As I said, I just gave an overall look, I surely missed it. I assumed it was just testing with local application. Since it's an integration test (no apparent separate process invocations) it's hard (for me) to understand what's really going on.
Not an assumption, it has the same failure https://github.com/marcnuri-work/spring-projects-spring-boot-issues-39733/actions/runs/8115267126/job/22182771368#step:4:1942 (I just added 3.2.0 to the test suite). P.S. BTW learning that end of commercial support for 2.x (i.e. Java 8) is mid 2025 just killed me, for some reason I thought it was mid-2024 when it would be over 😭, |
Description
Starting on v2.7.12 (last working version was v2.7.11) and up to any 3.x.x version Spring Boot Remote has stopped working.
Whenever a remote session is started and changes are detected, Spring Remote tries to restart the application but the application can't start.
Spring Remote output
Application output
Click to expand detailed output
Relevant pieces:
Expected application output
Click to expand
According to other issues with reference to the "factory already defined" error, it seems that Tomcat uses a static to ensure that
setURLStreamHandlerFactory
is only called once. However, it does seem that this shouldn't be applicable, or should be specifically tackled, for the remote dev tools.As a reproducer project you can use JKube's Spring Boot Watch quickstart and a local Kubernetes cluster such as Minikube. Changing the Spring Boot Starter Parent version to anything beyond 2.7.12 should reproduce the problem.
Relates to:
The text was updated successfully, but these errors were encountered: