Skip to content

[Native Image] Can not write to network drive #11118

Open
@Ferrarisrex

Description

@Ferrarisrex

Describe the Issue

it has the error of:
Error: Writing image to directory without write access N:\data\psdapp\target is not possible. Ensure the directory has write access or specify image path with write access.
it does have access, when i do the mvn -Pcompat package it does write new jar files to the directory
the drive is mounted using net use N: \address, and appears as such in file explorer
I can write to this directory outside of graalvm

test writes work just fine:

Image

Image

Image

Image

Maven itself can also access the network drive, just not graalvm

Image

Using the latest version of GraalVM can resolve many issues.

GraalVM Version

java 21.0.4 2024-07-16 LTS
Java(TM) SE Runtime Environment Oracle GraalVM 21.0.4+8.1 (build 21.0.4+8-LTS-jvmci-23.1-b41)
Java HotSpot(TM) 64-Bit Server VM Oracle GraalVM 21.0.4+8.1 (build 21.0.4+8-LTS-jvmci-23.1-b41, mixed mode, sharing)

Operating System and Version

MSYS_NT-10.0-19045 DESKTOP-AC1808G 3.5.7-2644508f.x86_64 2025-02-06 19:32 UTC x86_64 Msys

Build Command

C:\graalvm\bin\native-image.cmd @target\tmp\native-image-15079480595134774010.args com.ferra.launcherClass

-cp
N:\data\psdapp\target\psd4-1.0-SNAPSHOT.jar;C:\Users\Ferra\.m2...
--no-fallback
-o
N:\data\psdapp\target\psd4-x86-64-v1
-H:ConfigurationFileDirectories=N:\data\psdapp\target\graalvm-reachability-metadata\f45387813847aca6e0d46b8e58b61457f1920728\org.jetbrains.kotlin\kotlin-stdlib\1.7.10,N:\data\psdapp\target\graalvm-reachability-metadata\f45387813847aca6e0d46b8e58b61457f1920728\org.glassfish.jaxb\jaxb-runtime\3.0.2,N:\data\psdapp\target\graalvm-reachability-metadata\f45387813847aca6e0d46b8e58b61457f1920728\com.fasterxml.jackson.core\jackson-databind\2.15.2,N:\data\psdapp\target\graalvm-reachability-metadata\f45387813847aca6e0d46b8e58b61457f1920728\commons-logging\commons-logging\1.2,N:\data\psdapp\target\graalvm-reachability-metadata\f45387813847aca6e0d46b8e58b61457f1920728\org.eclipse.jetty\jetty-server\11.0.12,N:\data\psdapp\target\graalvm-reachability-metadata\f45387813847aca6e0d46b8e58b61457f1920728\org.eclipse.jetty\jetty-util\12.0.9
-O1
--no-fallback
--enable-url-protocols=https
--enable-url-protocols=http
-H:Log=registerResource
-H:IncludeResources="./prism/."
-H:IncludeResources=".png$"
-H:IncludeResources=".
/sun/scenario/effect/."
-H:IncludeResources=".
/sound/sampled/."
-H:IncludeResources="./clusterers.UpdateableClusterer"
-march=x86-64-v1
-Dprism.order=sw
-H:ExcludeResources=".
/calendar/."
-H:ExcludeResources=".
/bounce/.*"

Expected Behavior

it to work fine

Actual Behavior

it claims to not have access to the network drive

Steps to Reproduce

use a workspace on a mounted network drive, and try and compile with graalvm

Additional Context

No response

Build Log Output and Error Messages

No response

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions