I'm passing on an issue discussed on Spring Boot GitHub which may not
have been passed on to you. The main ticket is
https://github.com/spring-projects/spring-boot/issues/33633 .
Spring Boot 3 executable JARs with Java 17 will break with
"java.lang.IllegalStateException: zip file closed" when Tomcat 10 tries
to start. You can see an example stack trace at
https://github.com/spring-projects/spring-boot/issues/34028 .
Apparently Tomcat 9 used to do a JAR file multi-release check like this:
```java
@Override
public boolean jarFileIsMultiRelease(JarFile jarFile) {
try {
return ((Boolean)
isMultiReleaseMethod.invoke(jarFile)).booleanValue();
} catch (ReflectiveOperationException | IllegalArgumentException e) {
return false;
}
}
```
In Tomcat 10.1 it looks like this:
```java
multiRelease = jarFile.isMultiRelease();
```
I don't know anything about this code (I'm merely passing on what is in
the ticket), but I can guess that Tomcat wants to get away from
reflective operations, especially with later Java versions. That's fine
and probably a good idea. Unfortunately the new code does no error
handling whatsoever, so that the `IllegalStateException` kills
everything. If you could at least catch the `IllegalStateException` and
assume `false` I would imagine that would work around this issue.
The Spring Boot ticket acknowledges that they should improve their
`JarUrlConnection` so that it wouldn't return a `JarFile` that was
closed in the first place. Unfortunately there's no indication when that
would be done, and right now the entire Spring Boot 3 executable JAR
system is broken, requiring a system property to be added as a workaround.
Would you consider adding more error handling in a Tomcat 10 patch so
that users to explicitly override the Tomcat 10 version and get their
Spring Boot 3 executable JARs working again?
Thanks,
Garret
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org