Bug 62110

Summary: A broken junit class (due to missing dependency) breaks JMeter menus
Product: JMeter Reporter: Philippe Mouawad <p.mouawad>
Component: MainAssignee: JMeter issues mailing list <issues>
Status: RESOLVED FIXED    
Severity: major CC: p.mouawad
Priority: P2 Keywords: FixedInTrunk
Version: 3.0   
Target Milestone: JMETER_5.0   
Hardware: All   
OS: All   

Description Philippe Mouawad 2018-02-16 20:29:15 UTC
If you put some jars in lib folder and if one of those dependencies contains JUnit classes which dependencies are partly broken or that trigger exception, all the popup menus of JMeter elements are broken leading to this:

Stacktrace:

2018-02-16 10:12:22,833 ERROR o.a.j.g.u.MenuFactory: Error initializing menus, check configuration if using 3rd party libraries

java.lang.IllegalAccessError: class com.xxx.xxxx.q cannot access its superclass com.xxx.sawa.platform.external.NoContextLogSpi$DefaultEventInformationProvider

                at java.lang.ClassLoader.defineClass1(Native Method) ~[?:1.8.0_152]

                at java.lang.ClassLoader.defineClass(ClassLoader.java:763) ~[?:1.8.0_152]

                at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) ~[?:1.8.0_152]

                at java.net.URLClassLoader.defineClass(URLClassLoader.java:467) ~[?:1.8.0_152]

                at java.net.URLClassLoader.access$100(URLClassLoader.java:73) ~[?:1.8.0_152]

                at java.net.URLClassLoader$1.run(URLClassLoader.java:368) ~[?:1.8.0_152]

                at java.net.URLClassLoader$1.run(URLClassLoader.java:362) ~[?:1.8.0_152]

                at java.security.AccessController.doPrivileged(Native Method) ~[?:1.8.0_152]

                at java.net.URLClassLoader.findClass(URLClassLoader.java:361) ~[?:1.8.0_152]

                at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[?:1.8.0_152]

                at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[?:1.8.0_152]

                at java.lang.Class.forName0(Native Method) ~[?:1.8.0_152]

                at java.lang.Class.forName(Class.java:348) ~[?:1.8.0_152]

                at org.apache.jorphan.reflect.ClassFinder$ExtendsClassFilter.isChildOf(ClassFinder.java:104) ~[jorphan.jar:4.0 r1823414]

                at org.apache.jorphan.reflect.ClassFinder$ExtendsClassFilter.accept(ClassFinder.java:90) ~[jorphan.jar:4.0 r1823414]

                at org.apache.jorphan.reflect.ClassFinder.findClassesInOnePath(ClassFinder.java:455) ~[jorphan.jar:4.0 r1823414]

                at org.apache.jorphan.reflect.ClassFinder.findClasses(ClassFinder.java:340) ~[jorphan.jar:4.0 r1823414]

                at org.apache.jorphan.reflect.ClassFinder.findClassesThatExtend(ClassFinder.java:306) ~[jorphan.jar:4.0 r1823414]

                at org.apache.jorphan.reflect.ClassFinder.findClassesThatExtend(ClassFinder.java:238) ~[jorphan.jar:4.0 r1823414]

                at org.apache.jorphan.reflect.ClassFinder.findClassesThatExtend(ClassFinder.java:220) ~[jorphan.jar:4.0 r1823414]

                at org.apache.jorphan.reflect.ClassFinder.findClassesThatExtend(ClassFinder.java:186) ~[jorphan.jar:4.0 r1823414]

                at org.apache.jmeter.protocol.java.control.gui.JUnitTestSamplerGui.setupClasslist(JUnitTestSamplerGui.java:181) ~[ApacheJMeter_junit.jar:4.0 r1823414]

                at org.apache.jmeter.protocol.java.control.gui.JUnitTestSamplerGui.createClassPanel(JUnitTestSamplerGui.java:212) ~[ApacheJMeter_junit.jar:4.0 r1823414]

                at org.apache.jmeter.protocol.java.control.gui.JUnitTestSamplerGui.init(JUnitTestSamplerGui.java:167) ~[ApacheJMeter_junit.jar:4.0 r1823414]

                at org.apache.jmeter.protocol.java.control.gui.JUnitTestSamplerGui.<init>(JUnitTestSamplerGui.java:147) ~[ApacheJMeter_junit.jar:4.0 r1823414]

                at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:1.8.0_152]

                at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[?:1.8.0_152]

                at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:1.8.0_152]

                at java.lang.reflect.Constructor.newInstance(Constructor.java:423) ~[?:1.8.0_152]

                at java.lang.Class.newInstance(Class.java:442) ~[?:1.8.0_152]

                at org.apache.jmeter.gui.util.MenuFactory.getGUIComponent(MenuFactory.java:174) ~[ApacheJMeter_core.jar:4.0 r1823414]

                at org.apache.jmeter.gui.util.MenuFactory.initializeMenus(MenuFactory.java:141) ~[ApacheJMeter_core.jar:4.0 r1823414]

                at org.apache.jmeter.gui.util.MenuFactory.<clinit>(MenuFactory.java:106) ~[ApacheJMeter_core.jar:4.0 r1823414]

                at org.apache.jmeter.control.gui.TestPlanGui.createPopupMenu(TestPlanGui.java:92) ~[ApacheJMeter_core.jar:4.0 r1823414]

                at org.apache.jmeter.gui.tree.JMeterTreeNode.createPopupMenu(JMeterTreeNode.java:155) ~[ApacheJMeter_core.jar:4.0 r1823414]

                at org.apache.jmeter.gui.action.EditCommand.doAction(EditCommand.java:46) ~[ApacheJMeter_core.jar:4.0 r1823414]

                at org.apache.jmeter.gui.action.ActionRouter.performAction(ActionRouter.java:88) ~[ApacheJMeter_core.jar:4.0 r1823414]

                at org.apache.jmeter.gui.action.ActionRouter.lambda$actionPerformed$0(ActionRouter.java:70) ~[ApacheJMeter_core.jar:4.0 r1823414]

                at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311) [?:1.8.0_152]

                at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756) [?:1.8.0_152]

                at java.awt.EventQueue.access$500(EventQueue.java:97) [?:1.8.0_152]

                at java.awt.EventQueue$3.run(EventQueue.java:709) [?:1.8.0_152]

                at java.awt.EventQueue$3.run(EventQueue.java:703) [?:1.8.0_152]

                at java.security.AccessController.doPrivileged(Native Method) [?:1.8.0_152]

                at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80) [?:1.8.0_152]

                at java.awt.EventQueue.dispatchEvent(EventQueue.java:726) [?:1.8.0_152]

                at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201) [?:1.8.0_152]

                at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116) [?:1.8.0_152]

                at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105) [?:1.8.0_152]

                at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) [?:1.8.0_152]

                at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93) [?:1.8.0_152]

                at java.awt.EventDispatchThread.run(EventDispatchThread.java:82) [?:1.8.0_152]
Comment 1 Philippe Mouawad 2018-02-16 20:42:19 UTC
Author: pmouawad
Date: Fri Feb 16 20:42:01 2018
New Revision: 1824557

URL: http://svn.apache.org/viewvc?rev=1824557&view=rev
Log:
Bug 62110 - A broken junit class (due to missing dependency) breaks JMeter menus
Contributed by UbikLoadPack
Bugzilla Id: 62110

Modified:
    jmeter/trunk/src/jorphan/org/apache/jorphan/reflect/ClassFinder.java
    jmeter/trunk/xdocs/changes.xml