[jdk17u-dev] RFR: 8337966: (fs) Files.readAttributes fails with Operation not permitted on older docker releases

akhilesh-delphix duke at openjdk.org
Thu Nov 14 13:36:35 UTC 2024


On Mon, 16 Sep 2024 17:06:28 GMT, Alexey Bakhtin <abakhtin at openjdk.org> wrote:

> Almost clean backport from JDK21
> 
> The only difference is an additional EPERM check in the stat1 method. This method was removed in JDK21 as part of JDK-8283335

Hi @alexeybakhtin 
I hope this PR will also fix issue `java.nio.file.FileSystemException: app.jar: Function not implemented`  
Observed while running **`java -jar -Xdiag app.jar`**
JAVA

openjdk version "17.0.12" 2024-07-16


Here is complete stacktrace 



java.nio.file.FileSystemException: app.jar: Function not implemented
        at java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.java:100)
        at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:106)
        at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111)
        at java.base/sun.nio.fs.UnixFileAttributeViews$Basic.readAttributes(UnixFileAttributeViews.java:55)
        at java.base/sun.nio.fs.UnixFileSystemProvider.readAttributes(UnixFileSystemProvider.java:148)
        at java.base/sun.nio.fs.LinuxFileSystemProvider.readAttributes(LinuxFileSystemProvider.java:99)
        at java.base/java.nio.file.Files.readAttributes(Files.java:1851)
        at java.base/java.util.zip.ZipFile$Source.get(ZipFile.java:1432)
        at java.base/java.util.zip.ZipFile$CleanableResource.<init>(ZipFile.java:717)
        at java.base/java.util.zip.ZipFile.<init>(ZipFile.java:251)
        at java.base/java.util.zip.ZipFile.<init>(ZipFile.java:180)
        at java.base/java.util.jar.JarFile.<init>(JarFile.java:346)
        at java.base/java.util.jar.JarFile.<init>(JarFile.java:317)
        at java.base/java.util.jar.JarFile.<init>(JarFile.java:256)
        at java.base/sun.launcher.LauncherHelper.getMainClassFromJar(LauncherHelper.java:561)
        at java.base/sun.launcher.LauncherHelper.loadMainClass(LauncherHelper.java:787)
        at java.base/sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:695)

-------------

PR Comment: https://git.openjdk.org/jdk17u-dev/pull/2883#issuecomment-2472739578


More information about the jdk-updates-dev mailing list