Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

NoSuchMethodError - createCharMap

2 views
Skip to first unread message

Tony Cooke

unread,
Feb 7, 2006, 10:11:22 PM2/7/06
to
Hi all.

I have the following exception and for the life of me I don't know what's
going on.

I believe I have included all the relevent jars in the classpath but I still
get the error.

Basically I get a message from WebSphereMQ on a Windows box where the
message originated from an iSeries box (in EBCIDIC format). I believe it
converts it to unicode but the character mapping fails. I just don't know
why.

Any help would be appreciated.

All the best,
Tony


Exception in thread "Thread-0" java.lang.NoSuchMethodError:
sun.io.ByteToCharSingleByte.createCharMap(Ljava/lang/String;Z)[C
at sun.io.ByteToCharCp037.<clinit>(ByteToCharCp037.java:85)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at sun.io.Converters.getConverterClass(Unknown Source)
at sun.io.Converters.newConverter(Unknown Source)
at sun.io.ByteToCharConverter.getConverter(Unknown Source)
at sun.nio.cs.StreamDecoder$ConverterSD.<init>(Unknown Source)
at sun.nio.cs.StreamDecoder$ConverterSD.<init>(Unknown Source)
at sun.nio.cs.StreamDecoder.forInputStreamReader(Unknown Source)
at java.io.InputStreamReader.<init>(Unknown Source)
at com.ibm.mq.MQMessage.readConvertedString(MQMessage.java:2061)
at com.ibm.mq.MQMessage.readStringOfCharLength(MQMessage.java:632)
at com.elders.sca.commands.MQServerCommand.execute(MQServerCommand.java:52)
at com.elders.sca.commands.CommandImpl.perform(CommandImpl.java:33)
at com.elders.sca.control.EventHandler.handle(EventHandler.java:132)
at com.elders.sca.control.Mediator.post(Mediator.java:111)
at com.elders.sca.control.Mediator.start(Mediator.java:149)
at com.elders.sca.business.BusinessFunction.run(BusinessFunction.java:51)
at java.lang.Thread.run(Unknown Source)


viraj

unread,
Feb 8, 2006, 2:32:08 AM2/8/06
to
This might happen with conflicting classes in classpath.
Make sure, class is referenced only once without any conflicts.

Viraj

Roedy Green

unread,
Feb 8, 2006, 2:46:02 AM2/8/06
to
On Wed, 8 Feb 2006 13:41:22 +1030, "Tony Cooke" <TCo...@elders.com.au>
wrote, quoted or indirectly quoted someone who said :

>sun.io.ByteToCharSingleByte.createCharMap(Ljava/lang/String;Z)[C
> at sun.io.ByteToCharCp037.<clinit>(ByteToCharCp037.java:85)

one hint. that encoding has a new official name "IBM037"
--
Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.

Tony Cooke

unread,
Feb 9, 2006, 12:11:24 AM2/9/06
to
Hi Roedy.

I checked up and you are right. It now has the encoding IBM037 but it also
has the old encoding too, so it still should work.

All the best,
Tony

"Roedy Green" <my_email_is_post...@munged.invalid> wrote in
message news:hc8ju158750d6vn3b...@4ax.com...

Tony Cooke

unread,
Feb 9, 2006, 12:13:35 AM2/9/06
to
I believe the classes are correct and are only being referenced once.

The thing is it's an issue within the sun.io package. Thats why I don't
understand it.

"viraj" <virajt...@gmail.com> wrote in message
news:1139383928.0...@g44g2000cwa.googlegroups.com...

Chris Uppal

unread,
Feb 9, 2006, 7:30:45 AM2/9/06
to
Tony Cooke wrote:

> I have the following exception and for the life of me I don't know what's
> going on.

> at sun.io.ByteToCharCp037.<clinit>(ByteToCharCp037.java:85)

It may be worth noting that in a Sun 1.4.2 JRE the sun.io.ByteToCharCp037 does
not have any static initialisation ("<cinit>") at all, and in a Sun 1.5.0 JRE
there is a class initialiser but it does not call
sun.io.ByteToCharSingleByte.createCharMap(). Nor, come to that, does the
source for that class have a line 85.

Similarly, on either Sun platform, the class sun.io.ByteToCharSingleByte does
exist, but it does not have a method createCharMap().

So, I suggest that you either have a buggy non-Sun platform, or that you are
mixing code from two different platforms. E.g. using a definition of
sun.io.ByteToCharCp037 (which is normally in charsets.jar for a Sun JVM), which
intended to execute on some non-Sun platform on a Sun-supplied (or Sun-alike)
JVM. How you are doing this, /if/ you are doing it, I don't know . Classpath
screwup ? Classloader tangle ? Illegitimate copying of platform classfiles ?

-- chris

Tony Cooke

unread,
Feb 9, 2006, 7:40:19 PM2/9/06
to
Hi Chris.

In actual fact it turned out to be a problem with the JRE I had loaded.
JRE 1.5.0_04 had these faults but upgrading to JRE 1.5.0_06 fix them.

Weird but there must have been an issue with the 04 version that was fixed.

Thanks for your help.

All the best,
Tony

"Chris Uppal" <chris...@metagnostic.REMOVE-THIS.org> wrote in message
news:43eb35f4$0$1171$bed6...@news.gradwell.net...

0 new messages