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 » Every 16th message retrieval fails with a 2033 error code???

Post new topic  Reply to topic Goto page Previous  1, 2
 Every 16th message retrieval fails with a 2033 error code??? « View previous topic :: View next topic » 
Author Message
fjb_saper
PostPosted: Thu Jun 23, 2005 12:36 pm    Post subject: Reply with quote

Grand High Poobah

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

The reason for your problem is that you were trying to convert a byte array to a string.
This may well go fine for all the byte values that map to a char.
However the result is not determined for those byte values that do not map to a char...

As such the only reliable way to represent a byte array as String is as shown above in the code snippet i.e. a hex representation of all its bytes...

I have used the Integer.decode(String mystring) method to parse back to byte...
Integer.decode("0xff");

Enjoy
Back to top
View user's profile Send private message Send e-mail
jefflowrey
PostPosted: Thu Jun 23, 2005 1:04 pm    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

And the reason that's it's been every 16th message is because the message IDs were being produced sequentially - and every 16th message had a section that had a binary 0 in it (because of math) - and binary zeros tend to cause strings to be terminated.
_________________
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 Goto page Previous  1, 2 Page 2 of 2

MQSeries.net Forum Index » IBM MQ Java / JMS » Every 16th message retrieval fails with a 2033 error code???
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.