在上周经过一翻将努力终于将Jmeter二次开发环境在本机上搭建好了,然而昨天还运行的好好的程序,今天点击RUN运行就报错了,具体报错信息如下:
报错的详细日志
ERROR | exception finding action handlers
java.lang.ClassNotFoundException: org.apache.jmeter.gui.action.Analyze
at java.net.URLClassLoader$1.run(URLClassLoader.java:372)
at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:360)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:260)
at org.apache.jmeter.gui.action.ActionRouter.populateCommandMap(ActionRouter.java:371)
at org.apache.jmeter.JMeter.startGui(JMeter.java:373)
at org.apache.jmeter.JMeter.start(JMeter.java:524)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at org.apache.jmeter.NewDriver.main(NewDriver.java:246)
ERROR | performAction(add_all) java.awt.event.ActionEvent[unknown type,cmd=add_all,when=0,modifiers=] on frame0 caused
java.lang.NullPointerException
at org.apache.jmeter.gui.action.ActionRouter.performAction(ActionRouter.java:85)
at org.apache.jmeter.gui.action.ActionRouter.lambda$actionPerformed$67(ActionRouter.java:70)
at org.apache.jmeter.gui.action.ActionRouter$$Lambda$57/28783266.run(Unknown Source)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:744)
at java.awt.EventQueue.access$400(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:697)
at java.awt.EventQueue$3.run(EventQueue.java:691)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:714)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
ERROR | performAction(edit) java.awt.event.ActionEvent[unknown type,cmd=edit,when=0,modifiers=] on org.apache.jmeter.gui.tree.JMeterTreeListener@160ab0a caused
java.lang.NullPointerException
at org.apache.jmeter.gui.action.ActionRouter.performAction(ActionRouter.java:85)
at org.apache.jmeter.gui.action.ActionRouter.lambda$actionPerformed$67(ActionRouter.java:70)
at org.apache.jmeter.gui.action.ActionRouter$$Lambda$57/28783266.run(Unknown Source)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:744)
at java.awt.EventQueue.access$400(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:697)
at java.awt.EventQueue$3.run(EventQueue.java:691)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:714)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:109)
at java.awt.WaitDispatchSupport$2.run(WaitDispatchSupport.java:184)
at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:229)
at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:227)
at java.security.AccessController.doPrivileged(Native Method)
at java.awt.WaitDispatchSupport.enter(WaitDispatchSupport.java:227)
at java.awt.Dialog.show(Dialog.java:1084)
at javax.swing.JOptionPane.showOptionDialog(JOptionPane.java:869)
at javax.swing.JOptionPane.showMessageDialog(JOptionPane.java:666)
at javax.swing.JOptionPane.showMessageDialog(JOptionPane.java:637)
at org.apache.jmeter.util.JMeterUtils.reportErrorToUser(JMeterUtils.java:885)
at org.apache.jmeter.util.JMeterUtils.reportErrorToUser(JMeterUtils.java:837)
at org.apache.jmeter.gui.action.ActionRouter.performAction(ActionRouter.java:110)
at org.apache.jmeter.gui.action.ActionRouter.lambda$actionPerformed$67(ActionRouter.java:70)
at org.apache.jmeter.gui.action.ActionRouter$$Lambda$57/28783266.run(Unknown Source)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:744)
at java.awt.EventQueue.access$400(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:697)
at java.awt.EventQueue$3.run(EventQueue.java:691)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:714)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
由上述报错我们可以知道,报错的主要原因是:
ERROR | performAction(add_all) java.awt.event.ActionEvent[unknown type,cmd=add_all,when=0,modifiers=] on frame0 caused java.lang.NullPointerException
在事务java.awt.event.ActionEvent的事务处理器方面存在错误,那么接下来我们一步一步来定位这个错误并找到出现这个错误的原因:
首先在上述详细错误的log日志中,我们定位报错源文件在于
找到ActionRouter.java源文件,我可以看到弹出对话模型的报错类内容就在下图