ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » IBM MQ Java / JMS » triggered MQjava - UnsupportedEncodingException: Cp437

Post new topic  Reply to topic
 triggered MQjava - UnsupportedEncodingException: Cp437 « View previous topic :: View next topic » 
Author Message
bfzhou
PostPosted: Thu Mar 02, 2006 12:20 pm    Post subject: triggered MQjava - UnsupportedEncodingException: Cp437 Reply with quote

Apprentice

Joined: 07 Aug 2003
Posts: 38
Location: Springfield, VA

Windows 2000 server, MQ5.3

I wrote a java program to be triggered. it works fine if trggered by a runmqtrm running in a DOS window, but if set to be triggered by the trigger service, it fails with the following exception caught at the following last statement:

int msgLen = in_Msg.getMessageLength();
StringBuffer msg = new StringBuffer(in_Msg.readString(msgLen));

Error reading MQMessage with readString() method: java.io.UnsupportedEncodingException: Cp437

I read a lot of postings about this Cp437, but none seems to match what I have. Any idea which components is doing the evil?
Back to top
View user's profile Send private message
bfzhou
PostPosted: Thu Mar 02, 2006 12:56 pm    Post subject: Reply with quote

Apprentice

Joined: 07 Aug 2003
Posts: 38
Location: Springfield, VA

Just to add more detail, I saved the stacktrace, here they are:

java.io.UnsupportedEncodingException: Cp437
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) <---- Here it starts.
at com.ibm.mq.MQMessage.readConvertedString(MQMessage.java:958)
at com.ibm.mq.MQMessage.readString(MQMessage.java:877)
at TestInvoiceRqstXfer.getIncomingMsg(TestInvoiceRqstXfer.java:242)
at TestInvoiceRqstXfer.run(TestInvoiceRqstXfer.java:93)
at TestInvoiceRqstXfer.main(TestInvoiceRqstXfer.java:463)
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Thu Mar 02, 2006 1:28 pm    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

So, okay.

You are running the trigger monitor service.

It is presumably running under some user.

It seems like the environment variables for that user are not the same as they are when you manually execute runmqtrm in a dos window.

I'd suspect that the difference is a language setting.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Java / JMS » triggered MQjava - UnsupportedEncodingException: Cp437
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.