I have a response that contains this: frameset rows="120px,*" Clicking on response in View Results Tree whith HTML view results in the following stacktrace: 2013/02/19 22:43:34 ERROR - jmeter.JMeter: Uncaught exception: java.lang.NumberFormatException: For input string: "120px" at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48) at java.lang.Integer.parseInt(Integer.java:458) at java.lang.Integer.parseInt(Integer.java:499) at javax.swing.text.html.FrameSetView.init(FrameSetView.java:122) at javax.swing.text.html.FrameSetView.layoutMajorAxis(FrameSetView.java:156) at javax.swing.text.BoxView.setSpanOnAxis(BoxView.java:313) at javax.swing.text.BoxView.layout(BoxView.java:692) at javax.swing.text.BoxView.setSize(BoxView.java:380) at javax.swing.text.BoxView.updateChildSizes(BoxView.java:349) at javax.swing.text.BoxView.setSpanOnAxis(BoxView.java:331) at javax.swing.text.BoxView.layout(BoxView.java:691) at javax.swing.text.BoxView.setSize(BoxView.java:380) at javax.swing.text.BoxView.updateChildSizes(BoxView.java:349) at javax.swing.text.BoxView.setSpanOnAxis(BoxView.java:331) at javax.swing.text.BoxView.layout(BoxView.java:691) at javax.swing.text.BoxView.setSize(BoxView.java:380) at javax.swing.plaf.basic.BasicTextUI$RootView.setSize(BasicTextUI.java:1703) at javax.swing.plaf.basic.BasicTextUI.getPreferredSize(BasicTextUI.java:901) at javax.swing.JComponent.getPreferredSize(JComponent.java:1642) at javax.swing.JEditorPane.getPreferredSize(JEditorPane.java:1412) at javax.swing.JViewport.getViewSize(JViewport.java:1066) at javax.swing.plaf.basic.BasicScrollPaneUI.syncScrollPaneWithViewport(BasicScrollPaneUI.java:265) at javax.swing.plaf.basic.BasicScrollPaneUI$Handler.viewportStateChanged(BasicScrollPaneUI.java:1067) at javax.swing.plaf.basic.BasicScrollPaneUI$Handler.stateChanged(BasicScrollPaneUI.java:1009) at javax.swing.JViewport.fireStateChanged(JViewport.java:1432) at javax.swing.JViewport.setView(JViewport.java:1038) at javax.swing.JScrollPane.setViewportView(JScrollPane.java:985) at org.apache.jmeter.visualizers.RenderAsHTML.showRenderedResponse(RenderAsHTML.java:107) at org.apache.jmeter.visualizers.RenderAsHTML.showRenderedResponse(RenderAsHTML.java:55) at org.apache.jmeter.visualizers.RenderAsHTML.renderResult(RenderAsHTML.java:51) at org.apache.jmeter.visualizers.ViewResultsFullVisualizer.valueChanged(ViewResultsFullVisualizer.java:253) at javax.swing.JTree.fireValueChanged(JTree.java:2820) at javax.swing.JTree$TreeSelectionRedirector.valueChanged(JTree.java:3191) at javax.swing.tree.DefaultTreeSelectionModel.fireValueChanged(DefaultTreeSelectionModel.java:629) at javax.swing.tree.DefaultTreeSelectionModel.notifyPathChange(DefaultTreeSelectionModel.java:1078) at javax.swing.tree.DefaultTreeSelectionModel.setSelectionPaths(DefaultTreeSelectionModel.java:287) at javax.swing.tree.DefaultTreeSelectionModel.setSelectionPath(DefaultTreeSelectionModel.java:170) at javax.swing.JTree.setSelectionPath(JTree.java:1598) at javax.swing.plaf.basic.BasicTreeUI.selectPathForEvent(BasicTreeUI.java:2311) at javax.swing.plaf.basic.BasicTreeUI$Handler.handleSelection(BasicTreeUI.java:3520) at javax.swing.plaf.basic.BasicTreeUI$Handler.mousePressed(BasicTreeUI.java:3459) at java.awt.Component.processMouseEvent(Component.java:6379) at javax.swing.JComponent.processMouseEvent(JComponent.java:3275) at java.awt.Component.processEvent(Component.java:6147) at java.awt.Container.processEvent(Container.java:2083) at java.awt.Component.dispatchEventImpl(Component.java:4744) at java.awt.Container.dispatchEventImpl(Container.java:2141) at java.awt.Component.dispatchEvent(Component.java:4572) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4619) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4277) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4210) at java.awt.Container.dispatchEventImpl(Container.java:2127) at java.awt.Window.dispatchEventImpl(Window.java:2489) at java.awt.Component.dispatchEvent(Component.java:4572) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:710) at java.awt.EventQueue.access$400(EventQueue.java:82) at java.awt.EventQueue$2.run(EventQueue.java:669) at java.awt.EventQueue$2.run(EventQueue.java:667) at java.security.AccessController.doPrivileged(Native Method) at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87) at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:98) at java.awt.EventQueue$3.run(EventQueue.java:683) at java.awt.EventQueue$3.run(EventQueue.java:681) at java.security.AccessController.doPrivileged(Native Method) at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87) at java.awt.EventQueue.dispatchEvent(EventQueue.java:680) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188) at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
Created attachment 29969 [details] HTML page to put on tomcat in /examples/jsp folder
Created attachment 29970 [details] Test Plan
That looks like a Java library bug. Not sure there's much we can do about that.
Yes I looked at Java code and it does not handle this case which seems not legal. Should we try/catch around the method for cleaner display of error . Today error kind of block UI for some time
Well, we could catch the error, but what would we display? We cannot display the HTML as is. I suppose we could work-round the Java bug by adjusting the source accordingly. If we do, we should log a message to say we have done so. Should also ensure that the bug is reported to Oracle.
I created the bug with sample program: package org.apache.jmeter; import javax.swing.JEditorPane; import javax.swing.JFrame; import javax.swing.JScrollPane; import javax.swing.text.EditorKit; public class Bug { private static final String TEXT_HTML = "text/html"; private static final EditorKit defaultHtmlEditor = JEditorPane .createEditorKitForContentType(TEXT_HTML); public static void main(String[] args) { JEditorPane results = new JEditorPane(); results.setEditable(false); results.setEditorKitForContentType(TEXT_HTML, defaultHtmlEditor); results.setContentType(TEXT_HTML); results.getDocument().putProperty("IgnoreCharsetDirective", Boolean.TRUE); try { String html = "<html>" + "<head>" + "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\">" + "<title></title>" + "</head>" + "<frameset rows=\"120px,*\" frameborder=\"0\" border=\"0\" framespacing=\"0\">" + " <frame src=\"http://www.google.com/\" scrolling=\"auto\" name=\"entete\"> " + " <frame src=\"http://www.google.com/\" scrolling=\"auto\" name=\"detail\"> " + "</frameset>" + "<noframes>" + "<body>" + "</body>" + "</noframes>" + "</html>"; results.setText(html); // Bug can generate RTE } catch (Exception e) { results.setContentType("text/html"); results.setText(e.getMessage()); } JScrollPane scrollPane = new JScrollPane(results); JFrame f = new JFrame("Bug"); f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); f.getContentPane().add(scrollPane); f.setSize(512, 342); f.show(); } }
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=9001188. Not visible yet.
Date: Sat Mar 30 15:58:18 2013 New Revision: 1462788 URL: http://svn.apache.org/r1462788 Log: https://issues.apache.org/bugzilla/show_bug.cgi?id=54586 Display exception to indicate parsing Bugzilla Id: 54586 Modified: jmeter/trunk/src/components/org/apache/jmeter/visualizers/RenderAsHTML.java
Strange, bug still does not appear although I received this mail: Dear Java Developer, Thank you for reporting this issue. We have determined that this report is a new bug and entered the bug into our internal bug tracking system under Bug Id: 9001188. You can monitor this bug on the Java Bug Database at http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=9001188. It may take a day or two before your bug shows up in this external database. Regards, Java Developer Support
Java bug here: - https://bugs.openjdk.java.net/browse/JDK-8031109
Date: Sat Jun 13 20:54:32 2015 New Revision: 1685332 URL: http://svn.apache.org/r1685332 Log: Bug 54586 - View Results Tree : HTML view fails to display html page that contains frameset with px due to Java bug JDK-8031109 Bugzilla Id: 54586 Modified: jmeter/trunk/xdocs/changes.xml
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/3065