Topic
IC4NOTICE: developerWorks Community will be offline May 29-30, 2015 while we upgrade to the latest version of IBM Connections. For more information, read our upgrade FAQ.
No replies
SystemAdmin
SystemAdmin
2736 Posts
ACCEPTED ANSWER

Pinned topic ClassCastException at sun.nio.cs.FastCharsetProvider with IBM J9 VM

‏2013-04-02T09:49:52Z |
Hello,

I'm using IBM J9 VM (build 2.4, JRE 1.6.0 IBM J9 2.4 Linux amd64-64) on a Linux system and I experience following strange ClassCastException from the depths of Java Charset handling:

java.lang.ClassCastException: sun.nio.cs.MS1252 incompatible with java.lang.String
at sun.nio.cs.FastCharsetProvider.canonicalize(FastCharsetProvider.java:51)
at sun.nio.cs.FastCharsetProvider.charsetForName(FastCharsetProvider.java:119)
at java.nio.charset.Charset.lookup2(Charset.java:454)
at java.nio.charset.Charset.lookup(Charset.java:440)
at java.nio.charset.Charset.isSupported(Charset.java:486)
at sun.nio.cs.StreamEncoder.forOutputStreamWriter(StreamEncoder.java:79)
at java.io.OutputStreamWriter.<init>(OutputStreamWriter.java:102)
...

JVM and OS/Server information:
java -version
java version "1.6.0"
Java(TM) SE Runtime Environment (build pxa6460sr7-20091215_02(SR7))
IBM J9 VM (build 2.4, JRE 1.6.0 IBM J9 2.4 Linux amd64-64 jvmxa6460sr7-20091214_
49398 (JIT enabled, AOT enabled)
J9VM - 20091214_049398
JIT - r9_20091123_13891
GC - 20091111_AA)
JCL - 20091202_01

OS/Server:
SUSE Linux Enterprise Server 11 (x86_64)
VERSION = 11
PATCHLEVEL = 1

Is that a known bug or is there anything I can do to avoid it (e.g. system property or some charset configuration)?