-
Notifications
You must be signed in to change notification settings - Fork 9
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
Ignoring locale settings and sun.jnu.encoding #344
Comments
Did you try with
So if you're setting additional args like ...
Then try In general, what I suggest with something like this is to get it working without buildpacks. So make it build and work when calling The buildpack is just installing & running |
I did test it without buildpacks about an hour ago and made a small sample project. Here's a small test project: If you replace the base image in the Dockerfile with 21 instead of 23, you can start it with any combination of parameters. They end up not mattering and you always get the same error. With 23 it just works and you don't have to set encoding parameters at all. I've given the I've managed to get `-Dsun.jnu.encoding=UTF-8" and read it from within the image as such by adjusting the CMD (according to docs) but the actual value seemed to get completely ignored. |
This doesn't seem like something that's specific to buildpacks, if I'm following your tests here. If you can reproduce it using the standard Dockerfiles, that's a behavior with native-image itself. All I can suggest is that we do have Java 23 available in buildpacks, https://github.com/paketo-buildpacks/bellsoft-liberica/releases/tag/v10.9.0, has it Java 23, and that was pulled into https://github.com/paketo-buildpacks/java/releases/tag/v16.1.0 last week's release. So if using Java 23 works with your Dockerfile sample, I'd bet it works with buildpacks too. |
So I had already been using Java 23 for a while.
I now added Unfortunately, the result is still the same. The resulting image cannot use If I can recreate it in a sample project specifically built around paketo's buildpacks, will you look into it? |
What we'd need to look into this is something like your sample project from before that works when you build with a Dockerfile or just on the local machine, but does not work when building the same source code with buildpacks. If you have a sample like that, I can take a look. |
If you do You can even try As you can see in my previous example, it works just fine using Oracle's base image with You guys do amazing work, so I wouldn't be surprised if I fucked up somehow. |
A couple of observations...
|
I've also created an issue over at at GraalVM. The package they use seems to be I can't find the Ubuntu/Debian equivalent. Maybe they can shine a light on it. The Having a quick look, at most I can tell that Oracle Linux 9 supplies glibc-all-langpacks 2.34, whereas Ubuntu's locale uses 2.35. Hopefully that one minor version isn't what breaks it here. Edit: Out of curiosity, I've created a builder from a build and run image using graalvm-community:23, specifically added the |
I ended up using It's incredibly hacky but may solve this for anyone else that needs a temporary (haha) solution. |
Thanks for sharing! I'm subscribed on the GraalVM issue, so I'll keep an eye on what they say and if there's anything we can do to make this just work, I'll open up issues. |
I hope I'm in the right place and this isn't directly related to GraalVM. So please excuse me if I'm wasting yourn time.
You can find all the code I'm talking about right here: https://github.com/Schaka/janitorr/tree/bazarr-support
The image is built using the Spring-Boot bootImage step via Gradle and I'm passing these ENV variables.
My host (Debian 12) has LANG set correctly and LC_ALL not set at all.
According to the docs, I also passed these arguments to Docker via compose.yml
According to the docs, this would not print correctly to console (docker logs) otherwise, but definitely seems to. Granted, I use logback and not any direct prints, so there is a chance this fixes things magically.
Yet, the second I use Path.of("a path with an ümläüt"), I run into the following exception:
Is there something I'm missing here, or could this be a bug in GraalVM somehow?
Looking at the code, UnixFileSystem definitely reads
sun.jnu.encoding
. The filepath is received as a valid UTF-8 string via REST.Logging from within the image provides:
The text was updated successfully, but these errors were encountered: