You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
14.6 breaks if a ZipFileSystemProvider has been initialized before Vaadin serves a static file from the jar. #11378
If a program creates a Zip File System before Vaadin does, then when Vaadin attempts to serve a file from the jar (for example, an image under META-INF/resources/frontend) it fails.
Minimal reproducible example
Add a "templates" folder in the classes directory (src/main/resources/templates in Maven convention)
Open a zip file system in the Main class of a fat jar (or equivalent Spring Boot construct), before Vaadin gets to see a request.
Package as a fat jar and run. URI must be a "jar" for the code to fail.
Vaadin should ignore the fact that there is already a Zip File System Provider configured. Try Paths.get() and if fails on FileSystemNotFoundException open the file system.
Actual behavior
java.nio.file.FileSystemAlreadyExistsException
at jdk.zipfs/jdk.nio.zipfs.ZipFileSystemProvider.newFileSystem(ZipFileSystemProvider.java:102)
at java.base/java.nio.file.FileSystems.newFileSystem(FileSystems.java:337)
at java.base/java.nio.file.FileSystems.newFileSystem(FileSystems.java:286)
at com.vaadin.flow.server.StaticFileServer.getFileSystem(StaticFileServer.java:212)
at com.vaadin.flow.server.StaticFileServer.resourceIsDirectory(StaticFileServer.java:145)
at com.vaadin.flow.server.StaticFileServer.isStaticResourceRequest(StaticFileServer.java:113)
at com.vaadin.flow.server.VaadinServlet.serveStaticOrWebJarRequest(VaadinServlet.java:290)
at com.vaadin.flow.server.VaadinServlet.service(VaadinServlet.java:239)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
Versions:
- Vaadin / Flow version: observed on 14.6.2 and up
- Java version: 11
- OS version: Ubuntu-20.04
- Browser version (if applicable): n/a
- Application Server (if applicable): Embedded Jetty 9.2.4
- IDE (if applicable): n/a
Yes. Have not looked at the fix. If Vaadin protects itself using concurrency mechanisms such as a latch, then it's possible that the case where it's not Vaadin stepping over itself would not be covered. The bug is still present in 14.6,5
Activity
TatuLund commentedon Jul 7, 2021
Your issue looks very similar to this one #11144
jflamy commentedon Jul 7, 2021
Yes. Have not looked at the fix. If Vaadin protects itself using concurrency mechanisms such as a latch, then it's possible that the case where it's not Vaadin stepping over itself would not be covered. The bug is still present in 14.6,5
jflamy commentedon Jul 7, 2021
Issue #11144 is claimed to be fixed in 14.6.3. This related issue still occurs in 14.6.5, so the fix to 11444 is perhaps incomplete.
fix: Reuse existing filesystem
fix: Reuse existing filesystem
caalador commentedon Jul 19, 2021
11444 is internal concurrent handlers where as this issue is when an external has already opened a FileSystem for the same resource.
fix: Reuse existing filesystem (#11428)
fix: Reuse existing filesystem (#11428)
fix: Reuse existing filesystem (#11428)
fix: Reuse existing filesystem (#11428)
1 remaining item
fix: Reuse existing filesystem (#11428) (#11438)
fix: Reuse existing filesystem (#11428) (#11439)
fix: Reuse existing filesystem (#11428) (#11437)
fix: Reuse existing filesystem (#11428) (#11436)
vaadin-bot commentedon Jul 26, 2021
This ticket/PR has been released with platform 14.6.7. For prerelease versions, it will be included in its final version.
vaadin-bot commentedon Jul 26, 2021
This ticket/PR has been released with platform 20.0.5. For prerelease versions, it will be included in its final version.
vaadin-bot commentedon Aug 6, 2021
This ticket/PR has been released with platform 21.0.0.beta1 and is also targeting the upcoming stable 21.0.0 version.
vaadin-bot commentedon Aug 9, 2021
This ticket/PR has been released with platform 14.7.0.alpha3 and is also targeting the upcoming stable 14.7.0 version.
Include bug fix vaadin/flow#11378