[graalvm-users] Text encoding error with native image
manithree at tutanota.com
manithree at tutanota.com
Wed Jan 23 08:12:18 PST 2019
I have a simple, working groovy program that uses jcifs-ng and builds a fat jar using gradle. I've built a native image from the jar using this (rc11 on Fedora 29):
native-image -Dgroovy.grape.enable=false \
--enable-url-protocols=https \
--allow-incomplete-classpath \
-H:+AllowVMInspection \
-H:+ReportUnsupportedElementsAtRuntime \
-H:ReflectionConfigurationFiles=dgm.json,stagepl.json \
--no-server \
-jar build/libs/cppl-all.jar
I've been tinkering with this for a couple of rc's, and cutting and pasting from blogs and tutorials, so I don't remember what many of those options do.
Anyway, when I run the native image, it throws an exception:
Exception in thread "main" jcifs.CIFSException: The default OEM encoding Cp850 does not appear to be supported by this JRE.
at jcifs.config.BaseConfiguration.initDefaults(BaseConfiguration.java:753)
at jcifs.config.BaseConfiguration.<init>(BaseConfiguration.java:158)
at cppl.main(stagepl.groovy:31)
In jcifs-ng, that's here https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_AgNO3_jcifs-2Dng_blob_master_src_main_java_jcifs_config_BaseConfiguration.java&d=DwIFaQ&c=RoP1YumCXCgaWHvlZYR8PZh8Bv7qIrMUB65eapI_JnE&r=CUkXBxBNT_D5N6HMJ5T9Z6rmvNKYsqupcbk72K0lcoQ&m=IArLvpg78SyGpDTOlzeGFFd0yvvkDUTbnsi4AFhCo7A&s=OnRdX5WiHBa5PIlclDz5g8Oc1zp5o4y24veXmrKfZ1k&e= <https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_AgNO3_jcifs-2Dng_blob_master_src_main_java_jcifs_config_BaseConfiguration.java&d=DwIFaQ&c=RoP1YumCXCgaWHvlZYR8PZh8Bv7qIrMUB65eapI_JnE&r=CUkXBxBNT_D5N6HMJ5T9Z6rmvNKYsqupcbk72K0lcoQ&m=IArLvpg78SyGpDTOlzeGFFd0yvvkDUTbnsi4AFhCo7A&s=OnRdX5WiHBa5PIlclDz5g8Oc1zp5o4y24veXmrKfZ1k&e=>:
protected void initDefaults () throws CIFSException {
try
"".SmbConstants.DEFAULT_OEM_ENCODING
{getBytes(); }
catch ( UnsupportedEncodingException uee ) {
thrownewCIFSException(
"The default OEM encoding "+SmbConstants.DEFAULT_OEM_ENCODING+" does not appear to be supported by this JRE.");
}
I'm not sure what "".getBytes() does underneath (reflection, class loading, etc.?) and what could be causing the problem. Any ideas?
Thanks,
Barry
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://oss.oracle.com/pipermail/graalvm-users/attachments/20190123/4e94ee4a/attachment.html
More information about the GraalVM-Users
mailing list