Comments (4)
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.
As a reproducer project you can use JKube's Spring Boot Watch quickstart and a local Kubernetes cluster such as Minikube.
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.
from spring-boot.
Hi @wilkinsona,
I managed to create a fairly simple end to end (e2e) test project that consistently reproduces the issue.
You can check the source code here: https://github.com/marcnuri-work/spring-projects-spring-boot-issues-39733/tree/290fe9c5e81c994154b0bf949b10dfef3145ba97.
You should be able to clone the project and run ./mvnw verify
to run the tests.
I also defined a GitHub CI workflow which also reproduces the issue.
If you carefully review the CI logs, you'll notice that with version 2.7.11, the test does pass:
https://github.com/marcnuri-work/spring-projects-spring-boot-issues-39733/actions/runs/8100572266/job/22138883889#step:4:1501
However, for the 2.7.12 version the test fails (I assume it will be the same for any 3.x.x version too):
https://github.com/marcnuri-work/spring-projects-spring-boot-issues-39733/actions/runs/8100572266/job/22138883889#step:4:1502
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:
Caused by: java.lang.Error: factory already defined
at java.base/java.net.URL.setURLStreamHandlerFactory(URL.java:1392) ~[na:na]
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.
from spring-boot.
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.
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:
- With a local application
- With a remote application
- With a remote application running as a jar file
However, for the 2.7.12 version the test fails (I assume it will be the same for any 3.x.x version too):
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?
from spring-boot.
I am pretty sure that it does.
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.
Do you know that it fails with 3.x.x or is this just an assumption?
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 😭,
from spring-boot.
Related Issues (20)
- Upgrade to Mockito 5.11.0
- Upgrade to OpenTelemetry 1.36.0
- Upgrade to Oracle Database 21.13.0.0 HOT 1
- Upgrade to R2DBC MariaDB 1.2.0
- Upgrade to WebJars Locator Core 0.58
- spring-boot-maven-plugin doesn't work with Java 22 HOT 5
- Ease the creation of multiple task executor and task scheduled builders HOT 4
- Document bootRun task generation HOT 2
- Random NoSuchBeanDefinitionException during ResetMocksTestExecutionListener.resetMocks() execution HOT 5
- Jetty embedded web server includes a JNDI initial context when other servers do not HOT 1
- Upgrade to Neo4j Java Driver 5.18.0
- spring-boot-maven-plugin doesn't work with Java 22
- Upgrade to Neo4j Java Driver 5.18.0
- Upgrade to Neo4j Java Driver 5.18.0
- Upgrade CI to Docker 25.0.4
- Upgrade CI to Docker 25.0.4
- Upgrade CI to Docker 25.0.4
- After upgrading Spring Boot from 3.1.5 to 3.2.0 properties from application.properties are missing HOT 8
- When graceful shutdown of Tomcat is aborted it may report that it completed successfully HOT 1
- Multiple spring boot applications lead to BeanDefinitionOverrideException HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from spring-boot.