StaxMon only shows first testcase result, and for the rest keeps on printing the following stack trace:
java.lang.reflect.InvocationTargetException
at java.awt.EventQueue.invokeAndWait(Unknown Source)
at javax.swing.SwingUtilities.invokeAndWait(Unknown Source)
at com.ibm.staf.service.stax.STAXMonitorFrame.run(STAXMonitorFrame.java:3135)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NullPointerException
at com.ibm.staf.service.stax.STAXMonitorTableModel.getColumnClass(STAXMonitorTableModel.java:60)
at com.ibm.staf.service.stax.STAXMonitorTableSorter.compareRowsByColumn(STAXMonitorTableSorter.java:79)
at com.ibm.staf.service.stax.STAXMonitorTableSorter.compare(STAXMonitorTableSorter.java:218)
at com.ibm.staf.service.stax.STAXMonitorTableSorter.shuttlesort(STAXMonitorTableSorter.java:349)
at com.ibm.staf.service.stax.STAXMonitorTableSorter.sort(STAXMonitorTableSorter.java:282)
at com.ibm.staf.service.stax.STAXMonitorTableSorter.sortByColumn(STAXMonitorTableSorter.java:397)
at com.ibm.staf.service.stax.STAXMonitorTableSorter.sortByColumn(STAXMonitorTableSorter.java:386)
at com.ibm.staf.service.stax.STAXMonitorTableSorter.tableChanged(STAXMonitorTableSorter.java:260)
at javax.swing.table.AbstractTableModel.fireTableChanged(Unknown Source)
at javax.swing.table.AbstractTableModel.fireTableRowsInserted(Unknown Source)
at javax.swing.table.DefaultTableModel.insertRow(Unknown Source)
at javax.swing.table.DefaultTableModel.addRow(Unknown Source)
at javax.swing.table.DefaultTableModel.addRow(Unknown Source)
at com.ibm.staf.service.stax.STAXMonitorTestcaseExtension.handleEvent(STAXMonitorTestcaseExtension.java:466)
at com.ibm.staf.service.stax.STAXMonitorFrame$7.run(STAXMonitorFrame.java:3129)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
The ongoing tests are not really hindered by this error - just the monitoring is impossible.
Versions:
stax 3.3.5
staf 3.3.2
java version "1.6.0_11-b03"
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Your simple stax file shows the same problem.
The result of STAF <stax-machine> STAX LIST JOB <jobid> TESTCASES is:
(executed while running the test)
Response:
-------------
Testcase Name Passes Fails Elapsed Time Starts Information
------------------- --------- ------ ----------------- ------- ---------------
Test 0 4 6 00:00:08 10
Test 1 3 7 00:00:08 10
Test 2 5 5 00:00:07 10
Test 3 8 2 00:00:08 10
Test 4 2 2 00:00:03 4
When pressing Help->About, it shows "STAX 3.3.5"
(also when I run java -jar StaxMon.jar the splashscreen shows STAX 3.3.5)
Perhaps some info that might help:
* STAXMon is running on a different PC than the script. Both PC's run win xp sp3
* In the stax monitor only the line containing "Test 0" appears in the test cases
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Are you sure the STAX service is 3.3.5? You can verify this by running "STAF <stax-machine> STAX VERSION". I believe you are running the STAX Monitor 3.3.5 with a STAX service version that is 3.3.3 or earlier. Some changes to the testcase fields were made in STAX (service and monitor) 3.3.4, so to use the STAX Monitor 3.3.4 or later, you need to use STAX 3.3.4 or later. If I try to use the STAX Monitor V3.3.5 with STAX service 3.3.3, I get the same exceptions you are seeing.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thanks a million for you help. This indeed caused the problem.
It seems that STAX service is being used from the machine on which the script
is located as opposed to the machine where staxmon is running.
Upgrading stax there solved the problem. (This was supposed to have been
upgraded already, but for some reason that upgrade didn't happen yet.)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
StaxMon only shows first testcase result, and for the rest keeps on printing the following stack trace:
java.lang.reflect.InvocationTargetException
at java.awt.EventQueue.invokeAndWait(Unknown Source)
at javax.swing.SwingUtilities.invokeAndWait(Unknown Source)
at com.ibm.staf.service.stax.STAXMonitorFrame.run(STAXMonitorFrame.java:3135)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NullPointerException
at com.ibm.staf.service.stax.STAXMonitorTableModel.getColumnClass(STAXMonitorTableModel.java:60)
at com.ibm.staf.service.stax.STAXMonitorTableSorter.compareRowsByColumn(STAXMonitorTableSorter.java:79)
at com.ibm.staf.service.stax.STAXMonitorTableSorter.compare(STAXMonitorTableSorter.java:218)
at com.ibm.staf.service.stax.STAXMonitorTableSorter.shuttlesort(STAXMonitorTableSorter.java:349)
at com.ibm.staf.service.stax.STAXMonitorTableSorter.sort(STAXMonitorTableSorter.java:282)
at com.ibm.staf.service.stax.STAXMonitorTableSorter.sortByColumn(STAXMonitorTableSorter.java:397)
at com.ibm.staf.service.stax.STAXMonitorTableSorter.sortByColumn(STAXMonitorTableSorter.java:386)
at com.ibm.staf.service.stax.STAXMonitorTableSorter.tableChanged(STAXMonitorTableSorter.java:260)
at javax.swing.table.AbstractTableModel.fireTableChanged(Unknown Source)
at javax.swing.table.AbstractTableModel.fireTableRowsInserted(Unknown Source)
at javax.swing.table.DefaultTableModel.insertRow(Unknown Source)
at javax.swing.table.DefaultTableModel.addRow(Unknown Source)
at javax.swing.table.DefaultTableModel.addRow(Unknown Source)
at com.ibm.staf.service.stax.STAXMonitorTestcaseExtension.handleEvent(STAXMonitorTestcaseExtension.java:466)
at com.ibm.staf.service.stax.STAXMonitorFrame$7.run(STAXMonitorFrame.java:3129)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
The ongoing tests are not really hindered by this error - just the monitoring is impossible.
Versions:
stax 3.3.5
staf 3.3.2
java version "1.6.0_11-b03"
We have not seen that problem. Does this happen when running any STAX job that has testcases? Do you get the same error if you run this STAX job:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE stax SYSTEM "stax.dtd">
<stax>
<defaultcall function="begin_tests"/>
<script>
from random import randint
</script>
<function name="begin_tests">
<sequence>
<iterate var="testiter" in="range(5)">
<loop from="1" to="10">
<testcase name="'Test %s' % testiter">
<sequence>
<script>r = randint(1, 100)</script>
<if expr="r <= 50">
<tcstatus result="'pass'"/>
<else>
<tcstatus result="'fail'"/>
</else>
</if>
</sequence>
</testcase>
</loop>
</iterate>
</sequence>
</function>
</stax>
When you get the error, what is the output of "STAF <stax-machine> STAX LIST JOB <jobid> TESTCASES"?
In the STAX Monitor, if you select "File->Properties" in the menu bar, and go to the "Testcases" tab, what are the settings you are using?
Also, can you verify the STAX Monitor version? This can be found in the STAX Monitor by selecting "Help->About" in the menu bar.
Your simple stax file shows the same problem.
The result of STAF <stax-machine> STAX LIST JOB <jobid> TESTCASES is:
(executed while running the test)
Response:
-------------
Testcase Name Passes Fails Elapsed Time Starts Information
------------------- --------- ------ ----------------- ------- ---------------
Test 0 4 6 00:00:08 10
Test 1 3 7 00:00:08 10
Test 2 5 5 00:00:07 10
Test 3 8 2 00:00:08 10
Test 4 2 2 00:00:03 4
When pressing Help->About, it shows "STAX 3.3.5"
(also when I run java -jar StaxMon.jar the splashscreen shows STAX 3.3.5)
Perhaps some info that might help:
* STAXMon is running on a different PC than the script. Both PC's run win xp sp3
* In the stax monitor only the line containing "Test 0" appears in the test cases
Are you sure the STAX service is 3.3.5? You can verify this by running "STAF <stax-machine> STAX VERSION". I believe you are running the STAX Monitor 3.3.5 with a STAX service version that is 3.3.3 or earlier. Some changes to the testcase fields were made in STAX (service and monitor) 3.3.4, so to use the STAX Monitor 3.3.4 or later, you need to use STAX 3.3.4 or later. If I try to use the STAX Monitor V3.3.5 with STAX service 3.3.3, I get the same exceptions you are seeing.
Thanks a million for you help. This indeed caused the problem.
It seems that STAX service is being used from the machine on which the script
is located as opposed to the machine where staxmon is running.
Upgrading stax there solved the problem. (This was supposed to have been
upgraded already, but for some reason that upgrade didn't happen yet.)