FileSystems.newFileSystem() fails on NTFS with IOException: Unable to get effective rights from ACL [...]
Alan Bateman
Alan.Bateman at oracle.com
Tue Jul 17 00:43:27 PDT 2012
On 17/07/2012 02:02, Victor Ott wrote:
> Hello,
>
> me again... The cause of the Files.isReadable() issue, which I had
> mentioned in last thread (
> http://mail.openjdk.java.net/pipermail/nio-discuss/2012-July/000672.html
> ), is also biting in ZipFileSystem. I'm trying to use NIO to read data
> from a ZIP file (truly read-only). My call is
> FileSystems.newFileSystem(archiveUri, fsParams, null)), but that
> stumbles over same code which is being executed like in
> Files.isReadable():
> zfpath.getFileSystem().provider().*checkAccess(zfpath,
> AccessMode.READ);*
>
> Relevant stack trace snippet is:
>
> archive uri: jar:file:/C:/test_data/TTT_2012-03-12_11_44_changed.zip
> java.io.IOException: Unable to get effective rights from ACL:
> Überlappender E/A-Vorgang wird verarbeitet.
>
> at
> sun.nio.fs.WindowsFileSystemProvider.getEffectiveAccess(WindowsFileSystemProvider.java:344)
> at
> sun.nio.fs.WindowsFileSystemProvider.checkAccess(WindowsFileSystemProvider.java:397)
> at com.sun.nio.zipfs.ZipFileSystem.<init>(ZipFileSystem.java:124)
> at
> com.sun.nio.zipfs.ZipFileSystemProvider.newFileSystem(ZipFileSystemProvider.java:117)
> at java.nio.file.FileSystems.newFileSystem(FileSystems.java:322)
> [...]
>
> The error reason is in German and means "Overlapped I/O Operation Is
> in Progress".
>
> PS
> I copied the test archive on a USB stick with FAT32 filesystem and
> tried it with that location: the error doesn't occur. I wish there was
> a way to disable that call to checkAccess(), but I think it's too
> deep, and installing my own FileSystemProvider would be too much code
> juggling.
I will guess that if you replace the Files.isReadable in your original
mail with a call to checkAccess then you will also get the same
exception, and this explains why the method returns false (because it is
specified to return false if the accessibility cannot be determined).
Clearly we have to re-visit the implementation of checkAccess and the
way it determines the effective access as there are clearly problems, in
addition to the performance. Can you say anything about the environment?
Which edition of Windows is this and are you logged into a domain? The
only other report we've had on this related to a case where the system
was setup in a domain but the program was running with a local user that
wasn't known to the domain controller.
-Alan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/nio-discuss/attachments/20120717/56923b3f/attachment.html
More information about the nio-discuss
mailing list