java.awt.eventdispatchthread_Java Swing GUI异常 - 线程中的异常&“AWT-EventQueue-0” java.util.NoSuchElem...

博主在运行Java应用程序时遇到异常,具体为线程“AWT - EventQueue - 0”中的java.util.NoSuchElementException,给出了异常的详细堆栈信息,涉及Vector、JComponent等类的方法调用。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

我运行我的应用程序时遇到此异常。我不知道这里出了什么问题。请有人帮忙吗。

线程“AWT-EventQueue-0”中的异常java.util.NoSuchElementException:Vector枚举

at java.util.Vector $ 1.nextElement(Vector.java:305)

在javax.swing.plaf.basic.BasicTableHeaderUI.getPreferredSize(BasicTableHeaderUI.java:778)

在javax.swing.JComponent.getPreferredSize(JComponent.java:1634)

在javax.swing.ViewportLayout.preferredLayoutSize(ViewportLayout.java:78)

at java.awt.Container.preferredSize(Container.java:1599)

at java.awt.Container.getPreferredSize(Container.java:1584)

在javax.swing.JComponent.getPreferredSize(JComponent.java:1636)

在javax.swing.ScrollPaneLayout.layoutContainer(ScrollPaneLayout.java:702)

在java.awt.Container.layout(Container.java:1421)

在java.awt.Container.doLayout(Container.java:1410)

at java.awt.Container.validateTree(Container.java:1507)

at java.awt.Container.validate(Container.java:1480)

在javax.swing.RepaintManager.validateInvalidComponents(RepaintManager.java:669)

at javax.swing.SystemEventQueueUtilities $ ComponentWorkRequest.run(SystemEventQueueUtilities.java:124)

在java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)

at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)

at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)

at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)

at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)

at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)

at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)

在java.awt.EventDispatchThread.run(EventDispatchThread.java:122)

2025-07-25 11:02:25,669 INFO o.a.j.g.a.Load: Loading file: E:\workraunjian\jmeter\apache-jmeter-5.4\bin\TESTJMX\yuhangyingji.jmx 2025-07-25 11:02:25,670 INFO o.a.j.s.FileServer: Set new base='E:\workraunjian\jmeter\apache-jmeter-5.4\bin\TESTJMX' 2025-07-25 11:02:25,670 INFO o.a.j.s.SaveService: Loading file: E:\workraunjian\jmeter\apache-jmeter-5.4\bin\TESTJMX\yuhangyingji.jmx 2025-07-25 11:02:25,796 WARN o.a.j.g.a.Load: Unexpected error. java.lang.NullPointerException java.lang.NullPointerException: null at java.util.ArrayDeque.addLast(ArrayDeque.java:303) ~[?:?] at java.util.ArrayDeque.add(ArrayDeque.java:494) ~[?:?] at org.apache.jmeter.gui.action.LoadRecentProject.updateRecentFileMenuItems(LoadRecentProject.java:125) ~[ApacheJMeter_core.jar:5.4] at org.apache.jmeter.gui.util.JMeterMenuBar.setProjectFileLoaded(JMeterMenuBar.java:144) ~[ApacheJMeter_core.jar:5.4] at org.apache.jmeter.gui.MainFrame.setProjectFileLoaded(MainFrame.java:330) ~[ApacheJMeter_core.jar:5.4] at org.apache.jmeter.gui.GuiPackage.setTestPlanFile(GuiPackage.java:732) ~[ApacheJMeter_core.jar:5.4] at org.apache.jmeter.gui.action.Load.loadProjectFile(Load.java:136) ~[ApacheJMeter_core.jar:5.4] at org.apache.jmeter.gui.action.Load.loadProjectFile(Load.java:101) ~[ApacheJMeter_core.jar:5.4] at org.apache.jmeter.gui.action.Load.doActionAfterCheck(Load.java:88) ~[ApacheJMeter_core.jar:5.4] at org.apache.jmeter.gui.action.AbstractActionWithNoRunningTest.doAction(AbstractActionWithNoRunningTest.java:44) ~[ApacheJMeter_core.jar:5.4] at org.apache.jmeter.gui.action.ActionRouter.performAction(ActionRouter.java:87) ~[ApacheJMeter_core.jar:5.4] at org.apache.jmeter.gui.action.ActionRouter.lambda$actionPerformed$0(ActionRouter.java:69) ~[ApacheJMeter_core.jar:5.4] at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:318) ~[?:?] at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:773) ~[?:?] at java.awt.EventQueue$4.run(EventQueue.java:720) ~[?:?] at java.awt.EventQueue$4.run(EventQueue.java:714) ~[?:?] at java.security.AccessController.doPrivileged(AccessController.java:399) [?:?] at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86) [?:?] at java.awt.EventQueue.dispatchEvent(EventQueue.java:742) [?:?] 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) [?:?] 2025-07-25 11:02:25,797 ERROR o.a.j.u.JMeterUtils: Unexpected error - see log for details
最新发布
07-26
OpenJDK 64-Bit Server VM warning: Archived non-system classes are disabled because the java.system.class.loader property is specified (value = "com.intellij.util.lang.PathClassLoader"). To use archived non-system classes, this property must not be set 2025-04-01 09:15:16,701 [ 151] SEVERE - #c.i.u.s.SvgCacheManager - Cannot create SvgCacheManager kotlinx.coroutines.JobCancellationException: Parent job is Cancelling; job=UndispatchedCoroutine{Cancelling}@706d4d07 Caused by: java.awt.HeadlessException: No X11 DISPLAY variable was set, but this program performed an operation which requires it. at java.desktop/java.awt.dnd.DragSource.getDefaultDragSource(DragSource.java:226) at com.intellij.platform.ide.bootstrap.UiKt$scheduleUpdateFrameClassAndWindowIconAndPreloadSystemFonts$1$3.invokeSuspend(ui.kt:255) at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:104) at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:318) at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:773) at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:720) at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:714) at java.base/java.security.AccessController.doPrivileged(AccessController.java:399) at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86) at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:742) at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203) at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124) at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113) at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDis
04-02
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值