This information is logged in the STAX Job log. If I run a STAX job that
imports a file with the script you provided:
$ STAF local STAX EXECUTE FILE c:/staxtest/importscripterr.xml WAIT
RETURNRESULT
Response
--------
{
Job ID : 5
Start Date-Time: 20100120-09:12:48
End Date-Time : 20100120-09:12:49
Status : Terminated
Result : None
Testcase Totals: {}
}
Here is the information in the STAX Job log for Job ID 5:
$ STAF local LOG QUERY MACHINE {STAF/Config/MachineNickname} LOGNAME
STAX_Job_5
Response
--------
Date-Time Level Message
----------------- -----
-------------------------------------------------------
20100120-09:12:48 Start JobID: 5, File: c:\staxtest\importscripterr.xml,
Machin
e: local://local, Function: Main, Args: null,
JobName:
<N/A>
20100120-09:12:49 Error STAXImportError signal raised. Terminating job.
=====
XML Information ===== File:
c:\staxtest\scripterr.xml
, Machine: local://local
com.ibm.staf.service.stax.STAX
PythonCompileException: File:
c:\staxtest\scripterr.xm
l, Machine: local://local Line 12: Error in
element typ
e "script". Python code compile failed for: if
from SM
H_obj_map import * import re lnk = linkArray[i]
lnk = l
nk.rstrip() lnk = str(lnk) line = lnk words =
str(line)
.split() logMessageToSTAXMon("words ->" +
str(words)) i
f( re.search("\d",str(words))):       
  val= wor
ds[3]         val
=re.sub("^\d+","",val) ┬á┬á┬á┬
á┬á┬á┬á val =re.sub("\(","",val) ┬á┬á┬á┬á┬
á┬á┬á val =re
.sub("\)","",val)        
logMessageToSTAXMon("v
al ->" + str(val))          val1
= str(val) l
ogMessageToSTAXMon("val1 is ->" + str(val1))
logMessage
ToSTAXMon("line ->" + str(lnk))
setattr(nicagentsblade1
_dr,"Name",lnk) Traceback (innermost last): (no
co
de object) at line 0 SyntaxError: ('invalid
syntax', (
'<string>', 1, 3, 'if')) ===== Call Stack for
STAX T
(More...)
20100120-09:12:49 Info Terminating block: main
20100120-09:12:49 Statu Testcase Totals: Tests: 0, Pass: 0, Fail: 0
s
20100120-09:12:49 Statu Job Result: None
s
20100120-09:12:49 Stop JobID: 5
The "Error" log record contains the same information that you see in the
STAX Monitor.
Thanks,
David
David Bender
STAF/STAX Development
IBM Software Group, WPLC
11501 Burnet Rd.
Bldg. 903-5B002
Austin, TX 78758-3400
Phone (T/L): 1-512-286-5315 (363-5315)
ITN: 23635315
Email: bda...@us.ibm.com
From:
Maneesh M P <maneesh.po...@gmail.com>
To:
staf-users@lists.sourceforge.net
Date:
01/20/2010 08:41 AM
Subject:
[staf-users] capture the STAXMon Failure message
Hello,
I am performing my execution using the command line, not STAXMonitor.
When there is python error [example shown below], command line just
terminates with the status "Terminated". User would have no idea why it is
terminated. Is there a way to capture the below errors and write into a
log file?
20100120-08:11:40 STAXImportError signal raised. Terminating job.
===== XML Information =====
File: D:/WTASDemo/TDLs/TestAgentData-31.xml, Machine: local
com.ibm.staf.service.stax.STAXPythonCompileException:
File: D:/WTASDemo/TDLs/TestAgentData-31.xml, Machine: L-4000913.wipro.com
Line 30: Error in element type "script".
Python code compile failed for:
if
from SMH_obj_map import *
import re
lnk = linkArray[i]
lnk = lnk.rstrip()
lnk = str(lnk)
line = lnk
words = str(line).split()
logMessageToSTAXMon("words ->" + str(words))
if( re.search("\d",str(words))):
val= words[3]
val =re.sub("^\d+","",val)
val =re.sub("\(","",val)
val =re.sub("\)","",val)
logMessageToSTAXMon("val ->" + str(val))
val1 = str(val)
logMessageToSTAXMon("val1 is ->" + str(val1))
logMessageToSTAXMon("line ->" + str(lnk))
setattr(nicagentsblade1_dr,"Name",lnk)
Traceback (innermost last):
(no code object) at line 0
SyntaxError: ('invalid syntax', ('<string>', 1, 3, 'if'))
===== Call Stack for STAX Thread 1 =====
[
function: initializeTestCase (Line: 17, File:
D:\WTASDemo\Config\Launch_Framework.xml, Machine: L-4000913.wipro.com)
sequence: 1/14 (Line: 28, File: D:\WTASDemo\Config\Launch_Framework.xml,
Machine: L-4000913.wipro.com)
]
--
Regards,
Maneesh
------------------------------------------------------------------------------
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for
Conference
attendees to learn about information security's most important issues
through
interactions with peers, luminaries and emerging and established
companies.
http://p.sf.net/sfu/rsaconf-dev2dev
_______________________________________________
staf-users mailing list
staf-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/staf-users
------------------------------------------------------------------------------
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for Conference
attendees to learn about information security's most important issues through
interactions with peers, luminaries and emerging and established companies.
http://p.sf.net/sfu/rsaconf-dev2dev
_______________________________________________
staf-users mailing list
staf-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/staf-users