-
Notifications
You must be signed in to change notification settings - Fork 40.7k
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
ZipFileSystem throws "java.util.zip.ZipException: read CEN tables failed" with certain nested jars #38595
Comments
It looks like The nested file system expects that the call can return less bytes than remain in the buffer and the caller will make repeated calls until they're all read. This was because the Javadoc of
The |
Spring Boot 3.2 changed the URL format of their nested jars[1] to be more compliant with JDK expectations. They now represented nested jars as their own `nested` scheme rather than the `file` scheme. This allows these URLs to be used seamlessly with `FileSystems.newFileSystem`. Unfortunately the workarounds for Spring Boot 3.1 did not account for this. Additionally, our jar uri parsing assumed naively that there would only be a single `!/` in a regular jar uri. However, jar uris are recursively defined as[2]: ``` jar:<url>!/[<entry>] ``` And while this should allow Cucumber to discover resources in nested jars as well it does seem that Spring Boot 3.2 still has some issues[3]. 1. https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-3.2-Release-Notes 2. https://www.iana.org/assignments/uri-schemes/prov/jar 3. spring-projects/spring-boot#38595
Spring Boot 3.2 changed the URL format of their nested jars[1] to be more compliant with JDK expectations. They now represented nested jars as their own `nested` scheme rather than the `file` scheme. This allows these URLs to be used seamlessly with `FileSystems.newFileSystem`. Unfortunately the workarounds for Spring Boot 3.1 did not account for this. Additionally, our jar uri parsing assumed naively that there would only be a single `!/` in a regular jar uri. However, jar uris are recursively defined as[2]: ``` jar:<url>!/[<entry>] ``` And while this should allow Cucumber to discover resources in nested jars as well it does seem that Spring Boot 3.2 still has some issues[3]. Closes: #2828 1. https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-3.2-Release-Notes 2. https://www.iana.org/assignments/uri-schemes/prov/jar 3. spring-projects/spring-boot#38595
Spring Boot 3.2 changed the URL format of their nested jars[1] to be more compliant with JDK expectations. They now represented nested jars as their own `nested` scheme rather than the `file` scheme. This allows these URLs to be used seamlessly with `FileSystems.newFileSystem`. Unfortunately the workarounds for Spring Boot 3.1 did not account for this. Additionally, our jar uri parsing assumed naively that there would only be a single `!/` in a regular jar uri. However, jar uris are recursively defined as[2]: ``` jar:<url>!/[<entry>] ``` And while this should allow Cucumber to discover resources in nested jars as well it does seem that Spring Boot 3.2 still has some issues[3]. Closes: #2828 1. https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-3.2-Release-Notes 2. https://www.iana.org/assignments/uri-schemes/prov/jar 3. spring-projects/spring-boot#38595
Spring Boot 3.2 changed the URL format of their nested jars[1] to be more compliant with JDK expectations. They now represented nested jars as their own `nested` scheme rather than the `file` scheme. This allows these URLs to be used seamlessly with `FileSystems.newFileSystem`. Unfortunately the workarounds for Spring Boot 3.1 did not account for this. Additionally, our jar uri parsing assumed naively that there would only be a single `!/` in a regular jar uri. However, jar uris are recursively defined as[2]: ``` jar:<url>!/[<entry>] ``` And while this should allow Cucumber to discover resources in nested jars as well it does seem that Spring Boot 3.2 still has some issues[3]. Closes: #2828 1. https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-3.2-Release-Notes 2. https://www.iana.org/assignments/uri-schemes/prov/jar 3. spring-projects/spring-boot#38595
Initially raised in #38592 (comment)
throws the following exception (which I can understand from the docs as it is the new format to retrieve resources):
However,
throws the following exception:
The text was updated successfully, but these errors were encountered: