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 » Determine line where MRM Parser failed

Post new topic  Reply to topic
 Determine line where MRM Parser failed « View previous topic :: View next topic » 
Author Message
damianharvey
PostPosted: Thu Jul 15, 2004 1:32 pm    Post subject: Determine line where MRM Parser failed Reply with quote

Acolyte

Joined: 05 Aug 2003
Posts: 59
Location: Sydney, Australia

Hi all,

I had a problem yesterday where a 27,000 line file failed to be parsed by the MRM parser with the error :

"Not all the buffer was used when reading message"

The problem is that my error message doesn't identify the line where the error occurred. I was wondering if anyone knows of a way to make the Broker give some more meaningful data about where the error occurred. I ended up going through it manually and finding the extra 1 character on lilne 21,657 (that was fun).

Any thoughts?

Cheers,

Damian.
Back to top
View user's profile Send private message
kirani
PostPosted: Thu Jul 15, 2004 2:04 pm    Post subject: Reply with quote

Jedi Knight

Joined: 05 Sep 2001
Posts: 3779
Location: Torrance, CA, USA

Damian,

The error message tells you that your input message is too long for the message definition that you are trying to parse with.

Now the extra char could be at any position within your input message and i don't think it's very easy to find that out. You might get a different error if your numeric fields are not aligned correctly due to this extra char.
_________________
Kiran


IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries

Back to top
View user's profile Send private message Visit poster's website
damianharvey
PostPosted: Thu Jul 15, 2004 2:09 pm    Post subject: Reply with quote

Acolyte

Joined: 05 Aug 2003
Posts: 59
Location: Sydney, Australia

Kirani,

Thanks. I know it means that it is too long however when you have such a long file, some sort of indication of where the error occurs would be super helpful.

Apparently BizTalk can do this (waits to be slapped).
Back to top
View user's profile Send private message
djeripo
PostPosted: Thu Jul 15, 2004 8:22 pm    Post subject: Reply with quote

Master

Joined: 25 Jan 2004
Posts: 225

Once , even I faced the same problem . I was not copying MQMD properly to the outputroot . Once I corrected that it worked fine .
The way I corrected that,
1.)Copy Message Headers.
2.)SET OutputRoot.Properties = NULL;
SET OutputRoot.Properties = InputRoot.Properties;
3.)SET OutputRoot.MQMQ = NULL:
SET OutputRoot.MQMD = InputRoot.MQMD;
4.)SET OutputRoot.MRM = NULL:
Hope this helps !
Back to top
View user's profile Send private message Visit poster's website
JT
PostPosted: Fri Jul 16, 2004 7:00 am    Post subject: Reply with quote

Padawan

Joined: 27 Mar 2003
Posts: 1564
Location: Hartford, CT.

Quote:
I was wondering if anyone knows of a way to make the Broker give some more meaningful data about where the error occurred

Try turning on a debug-level trace.
Back to top
View user's profile Send private message
kirani
PostPosted: Fri Jul 16, 2004 3:52 pm    Post subject: Reply with quote

Jedi Knight

Joined: 05 Sep 2001
Posts: 3779
Location: Torrance, CA, USA

damianharvey wrote:

Apparently BizTalk can do this (waits to be slapped).


OK. Here is an example. Let's say my input message consist of two fields,
FNAME X(5)
LNAME X(5)

Input Data Example,
1. JOHN SMITH
2. JOHN XXSMITH
3. JOHN SMIXXTH

In Example 1. my message with parse fine. In Example 2 and 3, I will get parsing error (as indicated in your first post).

Since you are familiar with BizTalk, does it know which char is causing this error is it TH at the end of message or is it XX in the middle of the message.
_________________
Kiran


IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries

Back to top
View user's profile Send private message Visit poster's website
damianharvey
PostPosted: Sun Jul 18, 2004 1:01 pm    Post subject: Reply with quote

Acolyte

Joined: 05 Aug 2003
Posts: 59
Location: Sydney, Australia

I'm not familiar with BizTalk but a colleague is and he informs me that, yes, BizTalk will identify the first line that errors and the offending characters.

Turning on a debug trace is fine for investigating once an error has occurred but is off no use to quickly see where the error came from. We log all exceptions to a database and view the logs through a portal. Ideally I would be able to store the line that failed so that it would be easy to fix and resend.
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Sun Jul 18, 2004 4:10 pm    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

damianharvey wrote:
I'm not familiar with BizTalk but a colleague is and he informs me that, yes, BizTalk will identify the first line that errors and the offending characters.
I think you misunderstood his point. If a string field has too many characters in it, how is any piece of software going to know WHICH characters are the wrong one?

And if you have two string fields in a row, and the total length is too long, how is it to know if there are extra characters from the first field or extra characters from the second field?

WMQI usually, if you use a trace, will show you how much it actually did manage to parse before it threw an error. But the trace is going to be at least as long to look through as the data (in fact, guaranteed to be much longer!).

And there are cases where it is proveably impossible, given a particular model of data (or, for some types of parser, for any model of data) , for a piece of software to properly identify the correct location of the error.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
damianharvey
PostPosted: Sun Jul 18, 2004 4:51 pm    Post subject: Reply with quote

Acolyte

Joined: 05 Aug 2003
Posts: 59
Location: Sydney, Australia

Jeff, you're right in that you won't know which characters are wrong, however you should be able to identify the line that is too long and also the characters that push it over the limit.

For example using Kirani's message :
1. JOHN SMITH
2. JOHN XXSMITH
3. JOHN SMIXXTH

I would like to be able to get an error identifying line 2 and the characters "TH" as causing the error.

Thanks.

Damian.
Back to top
View user's profile Send private message
kirani
PostPosted: Sun Jul 18, 2004 4:59 pm    Post subject: Reply with quote

Jedi Knight

Joined: 05 Sep 2001
Posts: 3779
Location: Torrance, CA, USA

well, currently MRM parser will be able to tell you that line 2 and line 3 have problem. However, it won't tell you that how many chars are extra.
_________________
Kiran


IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries

Back to top
View user's profile Send private message Visit poster's website
damianharvey
PostPosted: Sun Jul 18, 2004 5:02 pm    Post subject: Reply with quote

Acolyte

Joined: 05 Aug 2003
Posts: 59
Location: Sydney, Australia

Kirani,

If I could get that information I'd be a happy man. I couldn't see it in the exception tree. Do you know where do get it from?

Thanks,

Damian.
Back to top
View user's profile Send private message
kirani
PostPosted: Sun Jul 18, 2004 7:14 pm    Post subject: Reply with quote

Jedi Knight

Joined: 05 Sep 2001
Posts: 3779
Location: Torrance, CA, USA

Damian,

I am assuming that each line is a seperate message on the queue. Is that true?
_________________
Kiran


IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries

Back to top
View user's profile Send private message Visit poster's website
damianharvey
PostPosted: Sun Jul 18, 2004 7:26 pm    Post subject: Reply with quote

Acolyte

Joined: 05 Aug 2003
Posts: 59
Location: Sydney, Australia

Kirani,

Unfortunately not. An individual message may have approx 30,000 lines (these are Item Master updates). As I mentioned, this was failing due to 2 lines containing additional characters.

The problem is that the exception only tells me that the message was wrong and not that lines 21,657 and 21,894 were the cause.

Thanks,

Damian.
Back to top
View user's profile Send private message
kirani
PostPosted: Sun Jul 18, 2004 8:02 pm    Post subject: Reply with quote

Jedi Knight

Joined: 05 Sep 2001
Posts: 3779
Location: Torrance, CA, USA

I misunderstood your question before. In my earlier post I was referring to each line as separate message. MRM will not tell you which line has problem as it treats them as repeating elements. I guess you are back to square one. One way would be to design "smart error handler" which will split the message and put back on the queue for processing.
_________________
Kiran


IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries

Back to top
View user's profile Send private message Visit poster's website
JLRowe
PostPosted: Mon Jul 19, 2004 7:36 am    Post subject: Reply with quote

Yatiri

Joined: 25 May 2002
Posts: 664
Location: South East London

The just in time parsing may be to your advantage, prior to the code do not refer to any element in the message.

In a compute node, force the parser to read each element by looping through it, store the loop counter and the last element in the environment. When an MRM exception occurs, the environment will contain the context of the exception. This may help.
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 » WebSphere Message Broker (ACE) Support » Determine line where MRM Parser failed
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.