Blazemeter / jmeter-http2-plugin

HTTP2 plugin for Apache JMeter
Apache License 2.0
46 stars 27 forks source link

Exception on JMeter 5.6 (JMeter UI of http sample changed) #55

Closed 3dgiordano closed 1 year ago

3dgiordano commented 1 year ago

Error reported by Antonio Gomes Rodrigues ra0077@gmail.com in JMeter 5.6 RC1 release email chain

023-06-20 18:27:03,073 WARN o.a.j.g.u.MenuFactory: Could not instantiate class: com.blazemeter.jmeter.http2.sampler.gui.HTTP2SamplerGui java.lang.reflect.InvocationTargetException: null at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:?] at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:77) ~[?:?] at jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:?] at java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499) ~[?:?] at java.lang.reflect.Constructor.newInstance(Constructor.java:480) ~[?:?] at org.apache.jmeter.gui.util.MenuFactory.getGUIComponent(MenuFactory.java:209) ~[ApacheJMeter_core.jar:5.6] at org.apache.jmeter.gui.util.MenuFactory.initializeMenus(MenuFactory.java:153) ~[ApacheJMeter_core.jar:5.6] at org.apache.jmeter.gui.util.MenuFactory.(MenuFactory.java:107) ~[ApacheJMeter_core.jar:5.6] at org.apache.jmeter.control.gui.TestPlanGui.createPopupMenu(TestPlanGui.java:101) ~[ApacheJMeter_core.jar:5.6] at org.apache.jmeter.gui.tree.JMeterTreeNode.createPopupMenu(JMeterTreeNode.java:184) ~[ApacheJMeter_core.jar:5.6] at org.apache.jmeter.gui.action.EditCommand.doAction(EditCommand.java:49) ~[ApacheJMeter_core.jar:5.6] at org.apache.jmeter.gui.action.ActionRouter.performAction(ActionRouter.java:83) ~[ApacheJMeter_core.jar:5.6] at org.apache.jmeter.gui.action.ActionRouter.lambda$actionPerformed$0(ActionRouter.java:65) ~[ApacheJMeter_core.jar:5.6] at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:318) [?:?] at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:771) [?:?] at java.awt.EventQueue$4.run(EventQueue.java:722) [?:?] at java.awt.EventQueue$4.run(EventQueue.java:716) [?:?] at java.security.AccessController.doPrivileged(AccessController.java:399) ~[?:?] at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86) ~[?:?] at java.awt.EventQueue.dispatchEvent(EventQueue.java:741) ~[?:?] at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203) ~[?:?] at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124) ~[?:?] at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:117) ~[?:?] at java.awt.WaitDispatchSupport$2.run(WaitDispatchSupport.java:191) ~[?:?] at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:236) ~[?:?] at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:234) ~[?:?] at java.security.AccessController.doPrivileged(AccessController.java:318) [?:?] at java.awt.WaitDispatchSupport.enter(WaitDispatchSupport.java:234) ~[?:?] at java.awt.Dialog.show(Dialog.java:1080) ~[?:?] at java.awt.Component.show(Component.java:1728) ~[?:?] at java.awt.Component.setVisible(Component.java:1675) ~[?:?] at java.awt.Window.setVisible(Window.java:1036) ~[?:?] at java.awt.Dialog.setVisible(Dialog.java:1016) ~[?:?] at org.apache.jmeter.SplashScreen.lambda$showScreen$0(SplashScreen.java:95) ~[ApacheJMeter_core.jar:5.6] at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:318) ~[?:?] at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:771) ~[?:?] at java.awt.EventQueue$4.run(EventQueue.java:722) ~[?:?] at java.awt.EventQueue$4.run(EventQueue.java:716) ~[?:?] at java.security.AccessController.doPrivileged(AccessController.java:399) [?:?] at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86) [?:?] at java.awt.EventQueue.dispatchEvent(EventQueue.java:741) [?:?] at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203) [?:?] at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124) [?:?] at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113) [?:?] at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109) [?:?] at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) [?:?] at java.awt.EventDispatchThread.run(EventDispatchThread.java:90) [?:?] Caused by: java.lang.NullPointerException: Cannot invoke "javax.swing.JPanel.remove(int)" because "optionPanel" is null at com.blazemeter.jmeter.http2.sampler.gui.HTTP2SamplerPanel.replaceKeepAliveCheckWithHttp1Upgrade(HTTP2SamplerPanel.java:60) ~[jmeter-bzm-http2-2.0.2.jar:?] at com.blazemeter.jmeter.http2.sampler.gui.HTTP2SamplerPanel.createTabbedConfigPane(HTTP2SamplerPanel.java:51) ~[jmeter-bzm-http2-2.0.2.jar:?] at com.blazemeter.jmeter.http2.sampler.gui.HTTP2SamplerPanel.(HTTP2SamplerPanel.java:45) ~[jmeter-bzm-http2-2.0.2.jar:?] at com.blazemeter.jmeter.http2.sampler.gui.HTTP2SamplerGui.(HTTP2SamplerGui.java:35) ~[jmeter-bzm-http2-2.0.2.jar:?] ... 47 more

-----

Vladimir Sitnikov sitnikov.vladimir@gmail.com mentioned

It looks like blazemeter.jmeter.http2 code issue to me.

The code is invasive, and it searches for a JCheckBox: https://github.com/Blazemeter/jmeter-http2-plugin/blob/94060bdf2f4f04157e6cb1cee408ac44cde1b31b/src/main/java/com/blazemeter/jmeter/http2/sampler/gui/HTTP2SamplerPanel.java#L58-L72

Apparently, the checkbox is no longer there since it has been replaced with an editable "checkbox with the expression". The code relies on internal structures, and it does not handle nulls properly, so I don't quite like to spend my time adjusting JMeter to make the exact code in http2 work, and I do not like to block the 5.6 release either. Surely they can fix the NPE and release an update.

Vladimir

3dgiordano commented 1 year ago

Fix Released on 2.0.4 version https://github.com/Blazemeter/jmeter-http2-plugin/releases/tag/v2.0.4