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 » UnsupportedEncodingExceptiion

Post new topic  Reply to topic Goto page 1, 2  Next
 UnsupportedEncodingExceptiion « View previous topic :: View next topic » 
Author Message
techno
PostPosted: Thu Jan 22, 2004 11:45 am    Post subject: UnsupportedEncodingExceptiion Reply with quote

Chevalier

Joined: 22 Jan 2003
Posts: 429

I am getting this Exception while receiving message :

java.io.UnsupportedEncodingException:Cp1051

In fact 1051 is CCID and I am not able to understand why is this being shown as encoding. I looked at the message. It shows Encoding as 273 and CCSID as 1051.

Receiving qmgr's CCSID is 1051.

I moved above message from DLQ to its correct destination queue, stripping off DLH.

Thanks for any help.
Back to top
View user's profile Send private message
techno
PostPosted: Wed Jan 28, 2004 8:50 am    Post subject: Reply with quote

Chevalier

Joined: 22 Jan 2003
Posts: 429

Any help on this topic?
Back to top
View user's profile Send private message
techno
PostPosted: Thu Jan 29, 2004 3:08 pm    Post subject: Reply with quote

Chevalier

Joined: 22 Jan 2003
Posts: 429

I would like to change this question this way. I was looking at something wrong previously.

Have 5.3 on hp-ux (A). have 5.2 on os/390(B)

Messages are ObjectMessage's.
CCSID of qmgr at A: 1051
CCSID of qmgr at B: 500

When the messages are coming from B to A, CCSID of msg is 500, which is correct. I do not have any exit to convert the message from 500 to 1051. Messages are getting processed fine. I did not understand how this messages are getting processed even when CCSID does not match. May be these CCSIDs are standard and they get converted automatically.

I deleted queue on A, and the message is reaching DeadQ of A. Now the CCSID of msg in DeadQ is changing to 1051. Recreated the queue and moved the messages from DeadQ to CorrectQ. CCSID of that message remains 1051. So far so good... When the messages are getting processed, I am getting this error

java.io.UnsupportedEncodingException:Cp1051

which is strange for me, because mshg and side A has same CCSID and it is still giving the error.

What should be done..

Please help.
Back to top
View user's profile Send private message
EddieA
PostPosted: Thu Jan 29, 2004 4:46 pm    Post subject: Reply with quote

Jedi

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

Quote:
moved the messages from DeadQ to CorrectQ

How did you move the message. The messages on the DLQ have an extra header inserted ahead of the data. Perhaps your application is trying to read this as part of, what it thinks is, data.

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
techno
PostPosted: Thu Jan 29, 2004 7:56 pm    Post subject: Reply with quote

Chevalier

Joined: 22 Jan 2003
Posts: 429

I am using contact admin's MQ Explorer to move the message. Stripping off the DLH while moving. By doing that, format etc are changing to that of normal message. The only difference I find now is CCSID.

Thanks
Back to top
View user's profile Send private message
EddieA
PostPosted: Fri Jan 30, 2004 8:34 am    Post subject: Reply with quote

Jedi

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

To me, that looks like contact admin's product screwed up.

Your message came in with CCSID 500. That means the data is encoding in that CCSID. When the message was put to the DLQ, the CCSID was 1501 (the CCSID of the platform). BUT, that CCSID is only used to describe the DLQ. Within the DLQ is the CCSID of the data, which "should" still be 500. Now, when that message is moved from the DLQ, back to the original queue, the DLQ is stripped off, BUT the message should be written using the CCSID from inside the DLQ, 500. It looks like it isn't.

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
techno
PostPosted: Fri Jan 30, 2004 2:24 pm    Post subject: Reply with quote

Chevalier

Joined: 22 Jan 2003
Posts: 429

Eddie,

What do you suggest me now?

Also, when the CCSIDs do not match, there would be some conversion takes place, right! (Occurs in above case. ) When they match, there should not be any conversion and above case is showing that something of this sort is happening and giving an error.

Do these CCSIDs need to be specified somewhere? I am not doing anything like that. What is the ccsid table for? I went through it and I am still not clear about it.

Thanks
Back to top
View user's profile Send private message
techno
PostPosted: Fri Jan 30, 2004 2:48 pm    Post subject: Reply with quote

Chevalier

Joined: 22 Jan 2003
Posts: 429

Eddie, I am using ObjectMessage, which has serialized object in it. Do we still need to follow data conversion rules??
Back to top
View user's profile Send private message
techno
PostPosted: Fri Jan 30, 2004 4:13 pm    Post subject: Reply with quote

Chevalier

Joined: 22 Jan 2003
Posts: 429

In MD of the message, I see a few other header props.

User Message Format: MQHRF2

If the message is ObjectMessage, what is the need of conversion? Pls throw up some light.

I guess
Back to top
View user's profile Send private message
EddieA
PostPosted: Sat Jan 31, 2004 9:36 am    Post subject: Reply with quote

Jedi

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

Firstly, you said:
Quote:
I am using ObjectMessage, which has serialized object in it

That started me thinking that you DO NOT want any kind of conversion done, and as it works without the DLQ in the picture, the application can't be doing any. But at that point, it didn't click that you were using JMS. (I'm guessing you are).

But then you added:
Quote:
User Message Format: MQHRF2

And the light came back on again.
This could still be the CCSID problem I mentioned earlier. When you have multiple headers, the details in the MQMD describe the next header, in your case the RFH2. They give the Format, CCSID, and Encoding. That next header, the RFH2, contains the details for what follows. So, the RFH2 will describe the Format, CCSID, and Encoding of the data.

Now, if as I said before, the contact admin product moved the message, and changed the CCSID (and probably the Encoding), but didn't modify the message, then the MQMD values do not reflect how the RFH2 is stored.

Try reading the message with amqsbcg and post the MQMD, and the beginning of the message (enough to include all the RFH2 and the satrt of the data) and we can take a look to see what the values really are. Make sure you include both the hex and the character for the start of the message.

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
techno
PostPosted: Mon Feb 02, 2004 11:30 am    Post subject: Reply with quote

Chevalier

Joined: 22 Jan 2003
Posts: 429

Eddie
Here are my observations:
That utility is very useful.

What I observed is DLQ handler is not stripping off DLH while moving the message to AppDeadQ(from Qmgr's DeadQ).

Here is what happening:
---------------------------------------------------------------------------
Scenario A: (is working fine):
Qmgr's DeadQ----(1)--> AppDeadQ---(2)---->AppQ.
Both the routings (1) and (2) are done through MQ Explorer.
While doing (1): DLH is stripped off
CCSID changes after(1) to what it is supposed to be

Msg Before (1):
MQGET of message number 1
****Message descriptor****

StrucId : 'MD ' Version : 2
Report : 0 MsgType : 8
Expiry : -1 Feedback : 0
Encoding : 273 CodedCharSetId : 1051
Format : 'MQDEAD '
Priority : 4 Persistence : 1
MsgId : X'C3E2D840D4D8C4F24040404040404040BAB6C57E73D20141'
CorrelId : X'000000000000000000000000000000000000000000000000'
BackoutCount : 0
ReplyToQ : ' '
ReplyToQMgr : 'MQD2 '
** Identity Context
UserIdentifier : 'm9q8036 '
AccountingToken :
X'04F0F0F0F0000000000000000000000000000000000000000000000000000000'
ApplIdentityData : ' '
** Origin Context
PutApplType : '2'
PutApplName : 'M9Q80366 '
PutDate : '20040202' PutTime : '10292340'
ApplOriginData : ' '

GroupId : X'000000000000000000000000000000000000000000000000'
MsgSeqNumber : '1'
Offset : '0'
MsgFlags : '0'
OriginalLength : '-1'

**** Message ****
--- ---
----- ---

Message Before(2):
AMQSBCG0 - starts here
**********************

MQOPEN - 'CLM.ECF.LP.DEADQ'


MQGET of message number 1
****Message descriptor****

StrucId : 'MD ' Version : 2
Report : 0 MsgType : 8
Expiry : -1 Feedback : 0
Encoding : 273 CodedCharSetId : 500
Format : 'MQHRF2 '
Priority : 4 Persistence : 1
MsgId : X'C3E2D840D4D8C4F24040404040404040BAB6C57E73D20141'
CorrelId : X'000000000000000000000000000000000000000000000000'
BackoutCount : 0
ReplyToQ : ' '
ReplyToQMgr : 'MQD2 '
** Identity Context
UserIdentifier : 'm9q8036 '
AccountingToken :
X'04F0F0F0F0000000000000000000000000000000000000000000000000000000'
ApplIdentityData : ' '
** Origin Context
PutApplType : '2'
PutApplName : 'M9Q80366 '
PutDate : '20040202' PutTime : '10292340'
ApplOriginData : ' '

GroupId : X'000000000000000000000000000000000000000000000000'
MsgSeqNumber : '1'
Offset : '0'
MsgFlags : '0'
OriginalLength : '-1'

**** Message ****
---- ---
--- ---

Message after(2):
MQGET of message number 1
****Message descriptor****

StrucId : 'MD ' Version : 2
Report : 0 MsgType : 8
Expiry : -1 Feedback : 0
Encoding : 273 CodedCharSetId : 500
Format : 'MQHRF2 '
Priority : 4 Persistence : 1
MsgId : X'C3E2D840D4D8C4F24040404040404040BAB6C57E73D20141'
CorrelId : X'000000000000000000000000000000000000000000000000'
BackoutCount : 0
ReplyToQ : ' '
ReplyToQMgr : 'MQD2 '
** Identity Context
UserIdentifier : 'm9q8036 '
AccountingToken :
X'04F0F0F0F0000000000000000000000000000000000000000000000000000000'
ApplIdentityData : ' '
** Origin Context
PutApplType : '2'
PutApplName : 'M9Q80366 '
PutDate : '20040202' PutTime : '10292340'
ApplOriginData : ' '

GroupId : X'000000000000000000000000000000000000000000000000'
MsgSeqNumber : '1'
Offset : '0'
MsgFlags : '0'
OriginalLength : '-1'

**** Message ****
--- ---
--- --


---------------------------------------------------------------------------
Scenario B: (not working fine):
Qmgr's DeadQ----(1)--> AppDeadQ---(2)---->AppQ.
Routing (1) is done by DLQ (DLH stripping is not done).
Routing (2) is done by Explorer (DLH stripping is done here).
CCSID of the message is not changed to what it is supposed to.

This scenario should be working fine if DLH stripping is done in Routing(1). May be CCSID it is carrying in properties is not compatible with the data.
msg after(1):
In AppDeadQ:

$ amqsbcg CLM.ECF.LP.DEADQ DHOCLM2

AMQSBCG0 - starts here
**********************

MQOPEN - 'CLM.ECF.LP.DEADQ'


MQGET of message number 1
****Message descriptor****

StrucId : 'MD ' Version : 2
Report : 0 MsgType : 8
Expiry : -1 Feedback : 0
Encoding : 273 CodedCharSetId : 1051
Format : 'MQDEAD '
Priority : 4 Persistence : 1
MsgId : X'C3E2D840D4D8C4F24040404040404040BAB6CBBD8FF1C242'
CorrelId : X'000000000000000000000000000000000000000000000000'
BackoutCount : 0
ReplyToQ : ' '
ReplyToQMgr : 'MQD2 '
** Identity Context
UserIdentifier : 'm9q8036 '
AccountingToken :
X'04F0F0F0F0000000000000000000000000000000000000000000000000000000'
ApplIdentityData : ' '
** Origin Context
PutApplType : '2'
PutApplName : 'M9Q80366 '
PutDate : '20040202' PutTime : '10572019'
ApplOriginData : ' '

GroupId : X'000000000000000000000000000000000000000000000000'
MsgSeqNumber : '1'
Offset : '0'
MsgFlags : '0'
OriginalLength : '-1'

**** Message ****
- -- -
--

msg after(2)


AMQSBCG0 - starts here
**********************

MQOPEN - 'CLM.ECF.LP.RECV'


MQGET of message number 1
****Message descriptor****

StrucId : 'MD ' Version : 2
Report : 0 MsgType : 8
Expiry : -1 Feedback : 0
Encoding : 273 CodedCharSetId : 1051
Format : 'MQHRF2 '
Priority : 4 Persistence : 1
MsgId : X'C3E2D840D4D8C4F24040404040404040BAB6CBBD8FF1C242'
CorrelId : X'000000000000000000000000000000000000000000000000'
BackoutCount : 0
ReplyToQ : ' '
ReplyToQMgr : 'MQD2 '
** Identity Context
UserIdentifier : 'm9q8036 '
AccountingToken :
X'04F0F0F0F0000000000000000000000000000000000000000000000000000000
ApplIdentityData : ' '
** Origin Context
PutApplType : '2'
PutApplName : 'M9Q80366 '
PutDate : '20040202' PutTime : '10572019'
ApplOriginData : ' '

GroupId : X'000000000000000000000000000000000000000000000000'
MsgSeqNumber : '1'
Offset : '0'
MsgFlags : '0'
OriginalLength : '-1'

**** Message ****

--------------------------------------------------------------------------


That's a big one.

Thanks.
Back to top
View user's profile Send private message
EddieA
PostPosted: Mon Feb 02, 2004 12:08 pm    Post subject: Reply with quote

Jedi

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

Quote:
Both the routings (1) and (2) are done through MQ Explorer.

Not sure what you mean by this. AFAIK the MQ Explorer doesn't have any features for moving messages.

Any 'utility' that claims to handle moving (re-queueing) messages from a DLQ must strip the header when it does so. MQ has no concept of an Application DLQ, so moving a message from a DLQ to another Q, usually the original destination, should always remove the DLQ header. Unless the utility has an option to say 'keep header'.

You didn't post the start of the message, so in the cases where the format is still MQDEAD, we can't see what the CCSID of the data following the DLQ header is. Especially as you say that the DLQ header 'stripping' is done by the same 'utility' but in one case it gets the CCSID correct, but in the other, not.

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
techno
PostPosted: Tue Feb 03, 2004 7:59 am    Post subject: Reply with quote

Chevalier

Joined: 22 Jan 2003
Posts: 429

Eddie

Thanks for your patience.

I mean, through MQ Explorer, we can do it manually. It has check boxes (for DLH and XLH) to remove the headers while moving.

I have sent the full message after browsing the message. I did not miss anything. I used same browsing program, you suggested.

Thanks
Back to top
View user's profile Send private message
RogerLacroix
PostPosted: Tue Feb 03, 2004 1:15 pm    Post subject: Reply with quote

Jedi Knight

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

Hi,
Quote:
I mean, through MQ Explorer, we can do it manually. It has check boxes (for DLH and XLH) to remove the headers while moving.

MQExplorer does not have this feature (neither does MQJExplorer). What tool were you using?

Regards,
Roger Lacroix
_________________
Capitalware: Transforming tomorrow into today.
Connected to MQ!
Twitter
Back to top
View user's profile Send private message Visit poster's website
techno
PostPosted: Tue Feb 03, 2004 4:23 pm    Post subject: Reply with quote

Chevalier

Joined: 22 Jan 2003
Posts: 429

contact admin's MQ Explorer.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Goto page 1, 2  Next Page 1 of 2

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