RFR: 8132459: ExceptionInInitializerError from 'java -version' on Linux under zh_CN.GB18030 locale
陆传胜(传胜)
chuansheng.lcs at alibaba-inc.com
Tue Jul 28 09:50:46 UTC 2015
Hello,
The issue
was found on one of my Linux boxes which uses locale zh_CN.GB18030 by default,
a simple
patch was made to fix it, may I have it reviewed ?
webrev: http://cr.openjdk.java.net/~luchsh/webrev-8132459/
bug: https://bugs.openjdk.java.net/browse/JDK-8132459
JBS seems to be down
right now, so just put
related info in this mail.
The problem relates to bug JDK-8038310, and below simple command
will reproduce it,
LANG=zh_CN.GB18030
jdk9/bin/java -version
The error message is:
Error occurred
during initialization of VM
java.lang.ExceptionInInitializerError
at
java.nio.charset.Charset.lookupExtendedCharset(Charset.java:449)
at
java.nio.charset.Charset.lookup2(Charset.java:479)
at
java.nio.charset.Charset.lookup(Charset.java:467)
at
java.nio.charset.Charset.isSupported(Charset.java:508)
at
java.io.UnixFileSystem.getBooleanAttributes0(Native Method)
at
java.io.UnixFileSystem.getBooleanAttributes(UnixFileSystem.java:242)
at
java.io.File.isDirectory(File.java:849)
at
sun.misc.Launcher$BootClassPathHolder$1.run(Launcher.java:329)
at
sun.misc.Launcher$BootClassPathHolder$1.run(Launcher.java:316)
at
java.security.AccessController.doPrivileged(Native Method)
at
sun.misc.Launcher$BootClassPathHolder.<clinit>(Launcher.java:315)
at
sun.misc.Launcher.<clinit>(Launcher.java:60)
at
java.lang.ClassLoader.initSystemClassLoader(ClassLoader.java:1443)
at
java.lang.ClassLoader.getSystemClassLoader(ClassLoader.java:1428)
Caused by:
java.lang.NullPointerException
at
java.lang.ClassLoader.getBootstrapResources(ClassLoader.java:1267)
at
java.lang.ClassLoader.getSystemResources(ClassLoader.java:1246)
at
java.util.ServiceLoader$LazyIterator.hasNextService(ServiceLoader.java:344)
at
java.util.ServiceLoader$LazyIterator.hasNext(ServiceLoader.java:391)
at
java.util.ServiceLoader$1.hasNext(ServiceLoader.java:472)
at
java.nio.charset.Charset$ExtendedProviderHolder$1.run(Charset.java:435)
at
java.nio.charset.Charset$ExtendedProviderHolder$1.run(Charset.java:429)
at
java.security.AccessController.doPrivileged(Native Method)
at
java.nio.charset.Charset$ExtendedProviderHolder.extendedProviders(Charset.java:429)
at
java.nio.charset.Charset$ExtendedProviderHolder.<clinit>(Charset.java:426)
at
java.nio.charset.Charset.lookupExtendedCharset(Charset.java:449)
at
java.nio.charset.Charset.lookup2(Charset.java:479)
at
java.nio.charset.Charset.lookup(Charset.java:467)
at
java.nio.charset.Charset.isSupported(Charset.java:508)
at
java.io.UnixFileSystem.getBooleanAttributes0(Native Method)
at
java.io.UnixFileSystem.getBooleanAttributes(UnixFileSystem.java:242)
at
java.io.File.isDirectory(File.java:849)
at
sun.misc.Launcher$BootClassPathHolder$1.run(Launcher.java:329)
at
sun.misc.Launcher$BootClassPathHolder$1.run(Launcher.java:316)
at
java.security.AccessController.doPrivileged(Native Method)
at
sun.misc.Launcher$BootClassPathHolder.<clinit>(Launcher.java:315)
at
sun.misc.Launcher.<clinit>(Launcher.java:60)
at
java.lang.ClassLoader.initSystemClassLoader(ClassLoader.java:1443)
at
java.lang.ClassLoader.getSystemClassLoader(ClassLoader.java:1428)
Thanks
Jonathan Lu
More information about the core-libs-dev
mailing list