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 » [EXCEPTION] WEIRD PROBLEM!

Post new topic  Reply to topic
 [EXCEPTION] WEIRD PROBLEM! « View previous topic :: View next topic » 
Author Message
anon_kb
PostPosted: Fri May 20, 2016 12:01 am    Post subject: [EXCEPTION] WEIRD PROBLEM! Reply with quote

Acolyte

Joined: 13 Nov 2014
Posts: 74

Hi Guys,

Hope you can help me diagnose an issue on my flow right now. Actually the flow runs good on my environment but on the client it gives them an exception. Anyway the version installed on their side is good.

Problem:

Input xml sample
<xml>
<PhysicalReception>
<HEADER>
<Version>2.0</Version>
<SupplierCode> 1234 </SupplierCode>
</HEADER>
</PhysicalReception>
</xml>

When they sent the message on 1st try they encounter the exception
"Input field SupplierCode does not exist". But when they send it again it successfully published the message. Though on my side I never encountered any problem. Do you have any idea on this.

Also the trace that they gave me has a weird result.
Error:
Error detected whilst executing the SQL statement 'SET result = AdminReception(inputRef);

PSEUDOCODE:

Code:

IF Environment.Variables.FirstElement = 'PhysicalReception' THEN

    IF version = 2.0 THEN
        SET result = PhysicalReceptionVer2(inputRef);
    ELSE
        SET result = AdminPhysicalReception(inputRef);
    END IF;
ELSE
     SET result = AdminPhysicalReception(inputRef);
END IF;

PhysicalReceptionVer2(INOUT inputRef REFERENCE)
BEGIN
CALL CheckForNullValue(inputRef.Header.SupplierCode ,'SupplierCode'); (this checks the SupplierCode and call the Procedure to generate the exception)
END

AdminPhysicalReception(INOUT inputRef REFERENCE)
BEGIN
IF EXISTS(inputRef.Details[1].SupplierCode[]) THEN
   SET the Supplier Code
ELSE 
THROW USER EXCEPTION VALUES('Input field SupplierCode does not exist');
END
END IF;



So as you can see on the Pseudocode there is no way that it will go to the AdminPhysicalReception procedure.

Hope you can enlighten me on this.

Thanks a lot.
Back to top
View user's profile Send private message
mayheminMQ
PostPosted: Fri May 20, 2016 1:03 am    Post subject: Reply with quote

Voyager

Joined: 04 Sep 2012
Posts: 77
Location: UK beyond the meadows of RocknRoll

I would like to see the setting of the field Environment.Variables.FirstElement or a debug screenshot/Trace node result with Environment and Body.

Also
Is the field "version" treated as a decimal or integer in the input? If you place a trace node and see what the field definition is, it might help.
Else you can always cast it to decimal to ensure it is not trying to do a Char to Decimal check and fails there!!
_________________
A Colorblind man may appear disadvantaged but he always sees more than just colors...
Back to top
View user's profile Send private message
anon_kb
PostPosted: Fri May 20, 2016 1:25 am    Post subject: Reply with quote

Acolyte

Joined: 13 Nov 2014
Posts: 74

Hi mayheminMQ,

This is my code for that
SET Environment.Variables.FirstElement = FIELDNAME(InputRoot.XMLNSC.(XML.Element)[1]) ;

Thanks for your reply
Back to top
View user's profile Send private message
anon_kb
PostPosted: Fri May 20, 2016 1:58 am    Post subject: Reply with quote

Acolyte

Joined: 13 Nov 2014
Posts: 74

Hi Guys

I have this analysis, Is it possible that the Environment.Variables specially on this part "Environment.Variables.FirstElement will retain their previous value(thats why I get an error at the first sending of message)? Thats If I send it again I will have no error? Is this analysis correct?

Anyway for more info.
Client tested the flow using V6.0 and I'm using IIB10
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Fri May 20, 2016 2:29 am    Post subject: Reply with quote

Grand High Poobah

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

anon_kb wrote:
Hi mayheminMQ,

This is my code for that
SET Environment.Variables.FirstElement = FIELDNAME(InputRoot.XMLNSC.(XML.Element)[1]) ;

Thanks for your reply

Shouldn't it say
Code:
SET Environment.Variables.FirstElement = FIELDNAME(InputRoot.XMLNSC.(XMLNSC.Element)[1]) ;
--or
SET Environment.Variables.FirstElement = FIELDNAME(InputRoot.XMLNSC.[<]) ;
meaning last child of parser?
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
anon_kb
PostPosted: Fri May 20, 2016 2:44 am    Post subject: Reply with quote

Acolyte

Joined: 13 Nov 2014
Posts: 74

fjb_saper wrote:
anon_kb wrote:
Hi mayheminMQ,

This is my code for that
SET Environment.Variables.FirstElement = FIELDNAME(InputRoot.XMLNSC.(XML.Element)[1]) ;

Thanks for your reply

Shouldn't it say
Code:
SET Environment.Variables.FirstElement = FIELDNAME(InputRoot.XMLNSC.(XMLNSC.Element)[1]) ;
--or
SET Environment.Variables.FirstElement = FIELDNAME(InputRoot.XMLNSC.[<]) ;
meaning last child of parser?



Hi FJB,

Actually its an old code by the previous dev. I really dont know why but the code has no problem on my side . But anyway thanks for your reply I'll try to implement that maybe that will solve the issue to the client side. Though the issue is still kinda weird.
Back to top
View user's profile Send private message
mayheminMQ
PostPosted: Fri May 20, 2016 2:57 am    Post subject: Reply with quote

Voyager

Joined: 04 Sep 2012
Posts: 77
Location: UK beyond the meadows of RocknRoll

Hi anon

Quote:
I have this analysis, Is it possible that the Environment.Variables specially on this part "Environment.Variables.FirstElement will retain their previous value(thats why I get an error at the first sending of message)? Thats If I send it again I will have no error? Is this analysis correct?


The Environment values will retain(only for that transaction) the older value when the node where the change is being done throws an exception and does not proceed. Since the Environment tree and pretty much everything, except SHARED variables and any global cache ,are kept per transaction only and is not retained for subsequent transactions, your analysis is not correct.
_________________
A Colorblind man may appear disadvantaged but he always sees more than just colors...
Back to top
View user's profile Send private message
anon_kb
PostPosted: Fri May 20, 2016 3:08 am    Post subject: Reply with quote

Acolyte

Joined: 13 Nov 2014
Posts: 74

mayheminMQ wrote:
Hi anon

Quote:
I have this analysis, Is it possible that the Environment.Variables specially on this part "Environment.Variables.FirstElement will retain their previous value(thats why I get an error at the first sending of message)? Thats If I send it again I will have no error? Is this analysis correct?


The Environment values will retain(only for that transaction) the older value when the node where the change is being done throws an exception and does not proceed. Since the Environment tree and pretty much everything, except SHARED variables and any global cache ,are kept per transaction only and is not retained for subsequent transactions, your analysis is not correct.


Ohw thanks for correcting me. Aaarrghh, I still cant recreate the issue and I even dont know what's causing the issue on their side,
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 » [EXCEPTION] WEIRD PROBLEM!
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.