Author |
Message
|
EAI Developer |
Posted: Tue Apr 25, 2006 4:06 am Post subject: Regarding debugger |
|
|
 Centurion
Joined: 30 Nov 2005 Posts: 101 Location: US
|
Hi everybody,
I am currently one sample scenario which I got from IBM labs.The flow deals with Shared variable, database retrival and accessing the borker name in the compute node.The flow works fine and giving the output when i run it without debugger.But if run the flow with debugger ON ..the control not even going in to the compute node.and its throwing exception as BIP v600 and Text = Internal Error. I tried to get the info from google by entering BIPv600 but in vain.
My ESQL code is :
CREATE COMPUTE MODULE LAB10_Lab10Transform
-- declare module level variables
-- module level variables have the scope of a single node
DECLARE FLOW_COUNTER SHARED INTEGER 0;
-- load the contents of a catalog database into memory
DECLARE MEM_CATALOG SHARED ROW ROW( (SELECT C.* FROM Database.CATALOG2 AS C) AS FALL_CATALOG[]);
CREATE FUNCTION Main() RETURNS BOOLEAN
BEGIN
DECLARE I INT 0;
DECLARE TBLNAME CHARACTER;
DECLARE BrokerName CHARACTER 'Wrong one';
-- copy the message headers to the output message
CALL CopyMessageHeaders();
-- start to build our return message
SET "OutputRoot"."XML"."Lab10Reply"."Name" = "InputBody"."Lab10"."FirstName" || ' ' || "InputBody"."Lab10"."LastName";
-- check if the database name exists in the input message
if SINGULAR("InputBody"."Lab10"."Catalog"."Name"[]) THEN
SET TBLNAME = "InputBody"."Lab10"."Catalog"."Name";
ELSE
SET TBLNAME = 'CATALOG';
END IF;
-- Set a condition handler for database errors
BEGIN
-- set a condition handler for invalid database names
DECLARE CONTINUE HANDLER FOR SQLSTATE 'D42S02'
BEGIN
SET "OutputRoot"."XML"."Lab10Reply"."Items"."Error" = 'Invalid database name';
END;
-- look up the catalog item in the specified catalog, starting with a simple table lookup
SET "OutputRoot"."XML"."Lab10Reply"."Items" = THE(SELECT C.PROD_NAME AS "Name", C.PROD_DESC AS "Description"
FROM Database.{TBLNAME} AS C WHERE C.PROD_ID = "InputBody"."Lab10"."Catalog"."Item");
END;
SET I = CAST("InputBody"."Lab10"."CastToInteger" AS INTEGER DEFAULT 0);
SET "OutputRoot"."XML"."Lab10Reply"."IntegerResult" = I;
-- increment counter
-- the counter increases by one every time a message flow is run
BEGIN ATOMIC
SET FLOW_COUNTER = FLOW_COUNTER + 1;
SET "OutputRoot"."XML"."Lab10Reply"."Counter" = FLOW_COUNTER;
END;
-- dump out all the entries from our in memory database
SET "OutputRoot"."XML"."Lab10Reply"."Memory" = MEM_CATALOG;
-- display some of the new broker attributes
SET "OutputRoot"."XML"."Lab10Reply"."Broker" = SQL.BrokerName;
SET "OutputRoot"."XML"."Lab10Reply"."NodeDataSource" = DataSource;
SET "OutputRoot"."XML"."Lab10Reply"."QueueManager" = QueueManagerName;
-- Broker name is also defined as a local variable
-- local variables take precedence
SET "OutputRoot"."XML"."Lab10Reply"."WrongBrokerName" = BrokerName;
-- propagate the message tree to the out terminal
RETURN TRUE;
END;
CREATE PROCEDURE CopyMessageHeaders() BEGIN
DECLARE I INTEGER 1;
DECLARE J INTEGER CARDINALITY(InputRoot.*[]);
WHILE I < J DO
SET OutputRoot.*[I] = InputRoot.*[I];
SET I = I + 1;
END WHILE;
END;
CREATE PROCEDURE CopyEntireMessage() BEGIN
SET OutputRoot = InputRoot;
END;
END MODULE;
----------
All the properties of the nodes used are correct.
Thanks in advance,
EAI Developer. |
|
Back to top |
|
 |
granthmuk |
Posted: Tue Apr 25, 2006 4:20 am Post subject: |
|
|
 Apprentice
Joined: 16 May 2001 Posts: 38 Location: Edinburgh, Scotland
|
I assume your debugger works on other Flows?
I've debugged flows with SHARED and EXTERNAL variables without problem. Though you cannot see the values of these variables in the debugger, they must be assigned to a message tree before you can see them. Have raised this as a requirement with IBM and they are looking at it apparently  |
|
Back to top |
|
 |
EAI Developer |
Posted: Tue Apr 25, 2006 4:36 am Post subject: |
|
|
 Centurion
Joined: 30 Nov 2005 Posts: 101 Location: US
|
Hi granthmuk,
Yeah ,,my debugger is working fine with other message flows.R u saying that u have worked successfully with debugger regarding shared and external variables OR r u succeded with my code.
Thanq,
EAI Developer. |
|
Back to top |
|
 |
granthmuk |
Posted: Tue Apr 25, 2006 4:50 am Post subject: |
|
|
 Apprentice
Joined: 16 May 2001 Posts: 38 Location: Edinburgh, Scotland
|
With Debugger and Shared and External Variables. Don't have your DB so wouldn't be able to run your code. As I say have not encountered a problem with debugging with code containging these varable types.
Is there anything getting written to your system log files?
I have seen similar problems in the past and in my experience they are usually to do with ESQL code interacting with the database rather than anything else. |
|
Back to top |
|
 |
EAI Developer |
Posted: Tue Apr 25, 2006 5:01 am Post subject: |
|
|
 Centurion
Joined: 30 Nov 2005 Posts: 101 Location: US
|
Hi granthmuk,
No.There is nothing useful info in the Event log.All the log contain general info like "Message backout" , "Internal Error" etc..
thanks,
EAI Developer. |
|
Back to top |
|
 |
granthmuk |
Posted: Tue Apr 25, 2006 5:20 am Post subject: |
|
|
 Apprentice
Joined: 16 May 2001 Posts: 38 Location: Edinburgh, Scotland
|
What was your Input Message? |
|
Back to top |
|
 |
EAI Developer |
Posted: Tue Apr 25, 2006 5:28 am Post subject: |
|
|
 Centurion
Joined: 30 Nov 2005 Posts: 101 Location: US
|
Hi,
Here is the input message
<Lab10>
<FirstName>Fred</FirstName>
<LastName>Bloggs</LastName>
<Catalog>
<Name>CATALOG</Name>
<Item>1</Item>
</Catalog>
<CastToInteger>10</CastToInteger>
</Lab10>
Thnks,
EAI Developer. |
|
Back to top |
|
 |
granthmuk |
Posted: Tue Apr 25, 2006 5:43 am Post subject: |
|
|
 Apprentice
Joined: 16 May 2001 Posts: 38 Location: Edinburgh, Scotland
|
What about your DB table(s)? From the ESQL there should be two
CATALOG and CATALOG2. I assume you have these, how are they defined? |
|
Back to top |
|
 |
|