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 » WebSphere Message Broker (ACE) Support » BLOB cast failure

Post new topic  Reply to topic
 BLOB cast failure « View previous topic :: View next topic » 
Author Message
brgmo
PostPosted: Wed Dec 12, 2007 1:51 am    Post subject: BLOB cast failure Reply with quote

Master

Joined: 03 Jun 2002
Posts: 227

Hi All,

I am trying to cast a character to blob and i get the following error:

String is not of correct form for byte array. Must consist even number contents.

Any idea what is the problem.

Regards
brgmo.
Back to top
View user's profile Send private message
Vitor
PostPosted: Wed Dec 12, 2007 1:53 am    Post subject: Re: BLOB cast failure Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

brgmo wrote:
Any idea what is the problem.


I'm just guessing but.....

brgmo wrote:
Must consist even number contents.


leads me to wonder if you have a padding issue.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
brgmo
PostPosted: Wed Dec 12, 2007 2:10 am    Post subject: Reply with quote

Master

Joined: 03 Jun 2002
Posts: 227

Vitor,it's just i am casting a charcter string to blob.I am not using any message set or any other mb stuff.I am trying to create a correlation id for a message and that's the time when it throws this error.

Regards
brgmo.
Back to top
View user's profile Send private message
Vitor
PostPosted: Wed Dec 12, 2007 2:22 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

brgmo wrote:
I am trying to create a correlation id for a message and that's the time when it throws this error.


Why? There are any number of discussions in the forum about why this is a bad idea from a design concept.

Also (as you've discovered) it doesn't work the way you think it does. What you need is the hex representation of the string, and remember that it's not converted between platforms, so may not look the same on a different target.

I struggle to think what requirement you're trying to fulfil.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
brgmo
PostPosted: Wed Dec 12, 2007 2:55 am    Post subject: Reply with quote

Master

Joined: 03 Jun 2002
Posts: 227

Vitor, i have a character string 'ABC2007121210525252'.I have to store this as correlation id.I am able to converts that to binary format using ccsid 1208.But when the flow tries to put the message on the queue,it throws an exception
The length must be correct.

So,my question is it is neccessary to keep the correlation id filed to be 24 because my string length is just 19.

Regards
brgmo.
Back to top
View user's profile Send private message
Vitor
PostPosted: Wed Dec 12, 2007 3:18 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

brgmo wrote:
i have a character string 'ABC2007121210525252'.I have to store this as correlation id.


Why???


brgmo wrote:
So,my question is it is neccessary to keep the correlation id filed to be 24 because my string length is just 19.


Yes. It's a 24 byte field.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
brgmo
PostPosted: Wed Dec 12, 2007 3:21 am    Post subject: Reply with quote

Master

Joined: 03 Jun 2002
Posts: 227

The business requirements are like this.They want the below mentioned field to be passed as a correlation id.
Back to top
View user's profile Send private message
Vitor
PostPosted: Wed Dec 12, 2007 3:24 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

brgmo wrote:
The business requirements are like this.They want the below mentioned field to be passed as a correlation id.


Yes, but just because the business want it doesn't make it a good idea. Push back, tell them it's a stupid idea & anti-pattern then ask them what they actually need.

"We want the correlation id set to this value" is not a business requirement - it's a design decision. Business should not do design.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
brgmo
PostPosted: Wed Dec 12, 2007 3:47 am    Post subject: Reply with quote

Master

Joined: 03 Jun 2002
Posts: 227

Well you know,Vitor as how the things work with clients.My Clients are very adamant and if we ask them to change anything,they make a big noise and then a series of meetings will happen to justify ourselves.So,i feel it's better to do what they ask to avoid any kind of hassle. But anyways i have padded the correlation id with 5 blanks and now it's working fine.Thanks for your help.

Regards
brgmo.
Back to top
View user's profile Send private message
Vitor
PostPosted: Wed Dec 12, 2007 3:53 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

brgmo wrote:
Well you know,Vitor as how the things work with clients.


Yes, clients employ you to gain expertise in areas they lack. There is an instinctive desire to micro-manage, but it's the IT equivalent of watching a plumber fix a pipe and advising him what kind of solder to use. The meetings are just a cheap tactic to wear you down; I quite enjoy watching them proudly putting up their stupid designs and silly justifications so I can knock them down. But that's me.

brgmo wrote:
So,i feel it's better to do what they ask to avoid any kind of hassle.


It's worth pointing out (if only for the record and the benefit of future readers) that you're not avoiding hassle, you're just postponing it to the day when you need to use correlation id for a purpose inimicable with it being a business string.

But you must of course do what you feel is best.
_________________
Honesty is the best policy.
Insanity is the best defence.
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 » WebSphere Message Broker (ACE) Support » BLOB cast failure
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.