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 » Java Unsupported Encoding exception

Post new topic  Reply to topic
 Java Unsupported Encoding exception « View previous topic :: View next topic » 
Author Message
atheek
PostPosted: Mon Dec 03, 2007 12:30 am    Post subject: Java Unsupported Encoding exception Reply with quote

Partisan

Joined: 01 Jun 2006
Posts: 327
Location: Sydney

Hi all,

I am using a MQ java program to read messages from a mainframe. The messages are in ebcdic format.:

MQMD Headers:

Encoding : 785 CodedCharSetId : 500
Format : 'MQIMS '

And I am using MQGMO_CONVERT option in the get call. Its throwing a java.io.UnsupportedEncoding exception : cp500.

I have raised the issue with the middleware team to turn on the channel conversion at mainframe side. But I am trying to figure out whether any other option is there.

I Know this is a java issue, but still want to know if such ebcdic-ascii conversion is possible in distributed systems. I have read from another thread its possible , including in the windows NT Platform ( My PF). But like to know any tweaks for gettin this done from java side and if anybody has already done so..My java version is jdk150_04

Regards,
Atheek
Back to top
View user's profile Send private message
Gert-Jan
PostPosted: Mon Dec 03, 2007 2:20 am    Post subject: Reply with quote

Newbie

Joined: 30 Sep 2004
Posts: 5
Location: The Netherlands

Do you have these jar files installed with your Java version?

charsets.jar
ext\localedata.jar
Back to top
View user's profile Send private message Visit poster's website
RogerLacroix
PostPosted: Mon Dec 03, 2007 8:31 am    Post subject: Reply with quote

Jedi Knight

Joined: 15 May 2001
Posts: 3264
Location: London, ON Canada

Hi,

Did you download the US English or international release of the JDK or JRE?

I have found that the US English release of both the JDK or JRE are missing support for cp500 (and other code pages).

Regards,
Roger Lacroix
Capitalware Inc.
_________________
Capitalware: Transforming tomorrow into today.
Connected to MQ!
Twitter
Back to top
View user's profile Send private message Visit poster's website
atheek
PostPosted: Tue Dec 04, 2007 9:52 pm    Post subject: Reply with quote

Partisan

Joined: 01 Jun 2006
Posts: 327
Location: Sydney

thanks to all for the replies. I made it to work by using a different jdk.

I tried the same with a mq jms program. But I am not able to do the conversion. the application is picking the data in ebcdic format itself.

So my question is :

If I want to retrieve message in the format:

Format : MQIMS
CCSID : 500
Encoding : 785

will mq jms do the data conversion to qmgr ccsid and encoding?
I tried by even setting the ccsid and encoding in jndi..still not working

Any help will be highly appreciated!!
-Atheek
Back to top
View user's profile Send private message
EddieA
PostPosted: Wed Dec 05, 2007 9:07 am    Post subject: Reply with quote

Jedi

Joined: 28 Jun 2001
Posts: 2453
Location: Los Angeles

Is the MQIMS header like the CICS one, in that it can only be converted on the mainframe. In which case, you'll have to use the Channel Conversion.

Cheers,
_________________
Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0
Back to top
View user's profile Send private message
atheek
PostPosted: Wed Dec 05, 2007 11:18 am    Post subject: Reply with quote

Partisan

Joined: 01 Jun 2006
Posts: 327
Location: Sydney

But the conversion worked on windows side with a mq java program..without even specifying a convert option! But not with a mqjms program!!!
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Wed Dec 05, 2007 4:44 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

atheek wrote:
But the conversion worked on windows side with a mq java program..without even specifying a convert option! But not with a mqjms program!!!

That might be because your java base program was written to ignore any extra header...
JMS won't do this and will give you an error message....

By the way what tool did you use to check the encoding value on the IMS header??
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
atheek
PostPosted: Wed Dec 05, 2007 10:08 pm    Post subject: Reply with quote

Partisan

Joined: 01 Jun 2006
Posts: 327
Location: Sydney

Quote:
That might be because your java base program was written to ignore any extra header...


No, the java program even converted the IIH headers.!!

This IIH header specified the Format to be MQSTR. I read this value from the java output. But when tried with jms its just returning the byte array.

-Atheek
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Thu Dec 06, 2007 4:52 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

atheek wrote:
Quote:
That might be because your java base program was written to ignore any extra header...


No, the java program even converted the IIH headers.!!

This IIH header specified the Format to be MQSTR. I read this value from the java output. But when tried with jms its just returning the byte array.

-Atheek
Encoding has nothing to do with the coded Char set Id (CCSID).
It determins whether your numbers are little or big endian...
Again what encoding is on the IMS header for the message?
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
atheek
PostPosted: Fri Dec 07, 2007 1:45 am    Post subject: Reply with quote

Partisan

Joined: 01 Jun 2006
Posts: 327
Location: Sydney

Encoding in IMS Header was 785

CCSID in IMS Header was 0
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Fri Dec 07, 2007 3:40 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

atheek wrote:
Encoding in IMS Header was 785

CCSID in IMS Header was 0


Ok the encoding is fine. But JMS cannot render the message because a CCSID of 0 is only valid if the qmgr replaces it with it's own....

So you have to make sure that the CCSID of the IMS header acuratly describes the CCSID of the data that comes after it....

Enjoy
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Java / JMS » Java Unsupported Encoding exception
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.