View Results Tree when you select 1 time the XML view you can't show other view

119 views
Skip to first unread message

Vincent Daburon

unread,
Feb 25, 2016, 8:34:14 AM2/25/16
to jmeter-plugins
Hi,

JMeter 2.13 alone OK

but JMeter 2.13 + JMeter Plugins 1.3.1
A create a very short JMeter script with a dummy sampler that returns a xml result (attached file)
I add a "View Results Tree".
When i try to show result in the XML View i have a Exception
=> View Results Tree when you select 1 time the XML view you can't show other view

Any idea to correct with trouble.


2016/02/25 14:06:16 ERROR - jmeter.JMeter: Uncaught exception:  java.lang.NullPointerException
    at jsyntaxpane.components.LineNumbersRuler.install(LineNumbersRuler.java:130)
    at jsyntaxpane.DefaultSyntaxKit.installComponent(DefaultSyntaxKit.java:144)
    at jsyntaxpane.DefaultSyntaxKit.addComponents(DefaultSyntaxKit.java:128)
    at jsyntaxpane.DefaultSyntaxKit.install(DefaultSyntaxKit.java:339)
    at javax.swing.JEditorPane.setEditorKit(JEditorPane.java:1057)
    at javax.swing.JEditorPane.setContentType(JEditorPane.java:981)
    at org.apache.jmeter.visualizers.RenderAsXML.showRenderXMLResponse(RenderAsXML.java:65)
    at org.apache.jmeter.visualizers.RenderAsXML.renderResult(RenderAsXML.java:61)
    at org.apache.jmeter.visualizers.ViewResultsFullVisualizer.valueChanged(ViewResultsFullVisualizer.java:259)
    at org.apache.jmeter.visualizers.ViewResultsFullVisualizer.actionPerformed(ViewResultsFullVisualizer.java:385)
    at javax.swing.JComboBox.fireActionEvent(JComboBox.java:1260)
    at javax.swing.JComboBox.setSelectedItem(JComboBox.java:588)
    at javax.swing.JComboBox.setSelectedIndex(JComboBox.java:624)
    at javax.swing.plaf.basic.BasicComboPopup$Handler.mouseReleased(BasicComboPopup.java:835)
    at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:290)
    at java.awt.Component.processMouseEvent(Component.java:6516)
    at javax.swing.JComponent.processMouseEvent(JComponent.java:3321)
    at javax.swing.plaf.basic.BasicComboPopup$1.processMouseEvent(BasicComboPopup.java:499)
    at java.awt.Component.processEvent(Component.java:6281)
    at java.awt.Container.processEvent(Container.java:2229)
    at java.awt.Component.dispatchEventImpl(Component.java:4872)
    at java.awt.Container.dispatchEventImpl(Container.java:2287)
    at java.awt.Component.dispatchEvent(Component.java:4698)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4832)
    at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4492)
    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4422)
    at java.awt.Container.dispatchEventImpl(Container.java:2273)
    at java.awt.Window.dispatchEventImpl(Window.java:2719)
    at java.awt.Component.dispatchEvent(Component.java:4698)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:740)
    at java.awt.EventQueue.access$300(EventQueue.java:103)
    at java.awt.EventQueue$3.run(EventQueue.java:699)
    at java.awt.EventQueue$3.run(EventQueue.java:697)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87)
    at java.awt.EventQueue$4.run(EventQueue.java:713)
    at java.awt.EventQueue$4.run(EventQueue.java:711)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:710)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)

Regards.
Vincent D.
XMLview_bug.jmx

gli...@gmail.com

unread,
Feb 26, 2016, 11:47:42 AM2/26/16
to jmeter-plugins
It's Dummy Sampler problem, underlying cause is 

xception:org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 7; The processing instruction target matching "[xX][mM][lL]" is not allowed.

which occurs when XML doesn't start with XML declaration which MUST be the first construct in the document. You can check it yourself with XPath Tester view of the View Results Tree listener.

If you print the response data into jmeter.log file via i.e. simple Beanshell Post Processor using the following code:

log.info("-------------------");
log.info(new String(data));
log.info("-------------------");

You'll see that the sampler adds and extra space to the beginning of the response data





so the XML is malformed, hence you're not getting XML view and not able to use XPath Extractor on it. 

Use vanilla JMeter where possible as current plugins health is a big question mark, especially jar hell with the webdriver stuff. 



 

gli...@gmail.com

unread,
Mar 2, 2016, 11:05:35 AM3/2/16
to jmeter-plugins, gli...@gmail.com
Apologies, Dummy Sampler is fine, the issue is with my eyes, your XML data starts with whitespace, remove it and it should start working. 
Reply all
Reply to author
Forward
0 new messages