-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
java.nio.file.Files#setPosixFilePermissions
cannot be used under Native Image
#7390
Comments
Hi, Thank you for reporting this, we'll take a look into it shortly |
Tracked internally on GR 49668 |
Hi, In other words, the problem is the way the file path is determined, and not the use of Files.setPosixFilePermissions, which works as expected For reference, here's the problematic snippet from the example:
|
> Task :nativeTest FAILED
JUnit Platform on Native Image - report
----------------------------------------
com.lingh.ContestTest > test() FAILED
Failures (1):
JUnit Jupiter:ContestTest:test()
MethodSource [className = 'com.lingh.ContestTest', methodName = 'test', methodParameterTypes = '']
=> java.lang.UnsupportedOperationException
[email protected]/java.nio.file.Files.setPosixFilePermissions(Files.java:2166)
com.lingh.ContestTest.test(ContestTest.java:30)
[email protected]/java.lang.reflect.Method.invoke(Method.java:568)
[email protected]/java.util.ArrayList.forEach(ArrayList.java:1511)
[email protected]/java.util.ArrayList.forEach(ArrayList.java:1511) |
|
Yes, please create a new issue for it |
Describe the issue
A clear and concise description of the issue. We recommend using the latest snapshot builds to replicate the issue as bugs are constantly being fixed in the master branch
java.nio.file.Files#setPosixFilePermissions
cannot be used under Native Image. I created a minimal reproducible unit test at https://github.com/linghengqian/graalvm-v2301-set-posix-file-permissions-test.org.apache.shardingsphere.elasticjob:elasticjob-lite-core:3.0.2
graalvm-reachability-metadata#206 .Steps to reproduce the issue
Please include both build steps as well as run steps
Describe GraalVM and your environment:
CE 23.0.1
17
Ubuntu 22.04.3 LTS
AMD64
More details
Consider adding the
--native-image-info
and--verbose
flags when building your native image and paste output below.Add any other information about the problem here. Especially important are stack traces or log output. Feel free to link to gists or to screenshots if necessary.
The text was updated successfully, but these errors were encountered: