-
Notifications
You must be signed in to change notification settings - Fork 41k
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
Tomcat 10.1.36 causes application startup failures due to DirResourceSet.initInternal() changes #44342
Comments
It looks like there are a few things happening. Firstly, the The second problem is that |
I also ran into this issue. Seems like tomcat can set the readonly flag on multiple levels; for the DefaultServlet it defaults to true but for DirResourceSet it defaults to false, and DirResourceSet is the class where the check is performed. It's possible to work around this by setting the resource root to readonly too:
However there are still issues, since a similar attempt will also be caused by org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory.StaticResourceConfigurer. In that case it happens if the classpath contains folders with meta-inf/resources. It doesn't crash the server as the exception ends up getting eaten by a broad empty catch block though: Lines 861 to 863 in 7db43b5
|
Superseded by #44331. |
and have CVE-2024-56337 error message:
|
and DirResourceSet missing setReadonly method provied by AbstractFileResourceSet, readonly default value is false
|
@mycad if you want to use Tomcat 10.1.36, you need to use Spring Boot 3.3.9 or 3.4.3 that were released last week. If you're seeing problems with those versions, please open a new issue with a minimal sample that reproduces the problem. |
- Fixes a dev regression introduced in 4d292c2 - This is similar to a Boot issue here: spring-projects/spring-boot#44342 ; since this is Tomcat-version related issue, and only happens in cargo, we're using the simplest fix. We chose not to invest in this, because when the Boot migration is complete we will be getting rid of Cargo entirely.
- Fixes a dev regression introduced in 4d292c2 - This is similar to a Boot issue here: spring-projects/spring-boot#44342 ; since this is Tomcat-version related issue, and only happens in cargo, we're using the simplest fix. We chose not to invest in this, because when the Boot migration is complete we will be getting rid of Cargo entirely.
- Fixes a dev regression introduced in 4d292c2 - This is similar to a Boot issue here: spring-projects/spring-boot#44342 ; since this is Tomcat-version related issue, and only happens in cargo, we're using the simplest fix. We chose not to invest in this, because when the Boot migration is complete we will be getting rid of Cargo entirely.
Running
SampleTomcatApplication
fails for me with the following exception:I also see similar failures from
:spring-boot-project:spring-boot-docs:runLoggingFormatExample
.The text was updated successfully, but these errors were encountered: