Setting the java/userPrefs location


I’m running gpt in a docker container and for some graphs I get a ? folder created and inside there are files like .java/.userPrefs/org/geotools/referencing/wkt/prefs.xml.

The problem is that a ? folder is illegal and the processing chain fails.

Is there a way to instruct gpt to write these in a defined and configured location (e.g. so I don’t get this ‘?’ folder created?

Maybe @marpet can help?

Thanks and looking forward for a feedback

Sorry, but I have no idea why folders with ‘?’ as name are created.
Are there also other files which do not have geotools in the name?
Maybe geotools is using the preferences api wrong or we are using geotools wrong.
Or maybe some path is wrongly configured in your container?
I don’t know where this might occur in the code.
The file name looks like a path which should actually start in the user home directory, or so.
Can you post one of the graphs where this happens?

@lveci, @jun_lu Do you have an idea?

Hello @marpet, thanks for the feedback.

I’m running gpt in a docker image orchestrated by CWL which runs the containers in read-only mode.
To allow SNAP to write in .snap, we use /tmp/.snap and tell CWL to set the env variables accordingly.

My wild guess is that this info is not propagated everywhere and thus the initialization process of SNAP (and underlying modules e.g. geotools) will not find a “valid” .snap location a create the ‘?’ folder.

For info, and snap.conf are updated with the correct values but we’re potentially doing this wrong.

Any tip is really appreciated