AWT-EventQueue-0 java.lang.NullPointerException

log.zip

开发了个插件,但是在本地 debug 的时候,选择定义数据连接的时候一直处于加载中。看到报错信息如下:(看到贴的错误码很乱,已经放在附件了)

Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException at com.fr.design.data.datapane.connect.ConnectionManagerPane.populate(ConnectionManagerPane.java:38) at com.fr.design.data.datapane.connect.ConnectionListPane$5.complete(ConnectionListPane.java:378) at com.fr.design.gui.frpane.LoadingBasicPane$1.done(LoadingBasicPane.java:44) at javax.swing.SwingWorker$5.run(SwingWorker.java:737) at javax.swing.SwingWorker$DoSubmitAccumulativeRunnable.run(SwingWorker.java:832) at sun.swing.AccumulativeRunnable.run(AccumulativeRunnable.java:112) at javax.swing.SwingWorker$DoSubmitAccumulativeRunnable.actionPerformed(SwingWorker.java:842) at javax.swing.Timer.fireActionPerformed(Timer.java:313) at javax.swing.Timer$DoPostEvent.run(Timer.java:245) at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758) at java.awt.EventQueue.access$500(EventQueue.java:97) at java.awt.EventQueue$3.run(EventQueue.java:709) at java.awt.EventQueue$3.run(EventQueue.java:703) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74) at java.awt.EventQueue.dispatchEvent(EventQueue.java:728) at com.fr.design.carton.EventDispatchThreadHangMonitor.dispatchEvent(EventDispatchThreadHangMonitor.java:330) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:109) at java.awt.WaitDispatchSupport$2.run(WaitDispatchSupport.java:190) at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:235) at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:233) at java.security.AccessController.doPrivileged(Native Method) at java.awt.WaitDispatchSupport.enter(WaitDispatchSupport.java:233) at java.awt.Dialog.show(Dialog.java:1084) at java.awt.Component.show(Component.java:1671) at java.awt.Component.setVisible(Component.java:1623) at java.awt.Window.setVisible(Window.java:1014) at java.awt.Dialog.setVisible(Dialog.java:1005) at com.fr.design.data.datapane.connect.ConnectionListPane.showDialog(ConnectionListPane.java:383) at com.fr.design.os.impl.DatabaseDialogAction.openDesignDatabaseManager(DatabaseDialogAction.java:26) at com.fr.design.os.impl.DatabaseDialogAction.execute(DatabaseDialogAction.java:21) at com.fr.design.actions.server.ConnectionListAction.actionPerformed(ConnectionListAction.java:68) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022) at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2348) at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402) at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259) at javax.swing.AbstractButton.doClick(AbstractButton.java:376) at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:842) at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:886) at java.awt.Component.processMouseEvent(Component.java:6539) at javax.swing.JComponent.processMouseEvent(JComponent.java:3324) at java.awt.Component.processEvent(Component.java:6304) at java.awt.Container.processEvent(Container.java:2239) at java.awt.Component.dispatchEventImpl(Component.java:4889) at java.awt.Container.dispatchEventImpl(Container.java:2297) at java.awt.Component.dispatchEvent(Component.java:4711) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4904) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4535) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4476) at java.awt.Container.dispatchEventImpl(Container.java:2283) at java.awt.Window.dispatchEventImpl(Window.java:2746) at java.awt.Component.dispatchEvent(Component.java:4711) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:760) at java.awt.EventQueue.access$500(EventQueue.java:97) at java.awt.EventQueue$3.run(EventQueue.java:709) at java.awt.EventQueue$3.run(EventQueue.java:703) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:84) at java.awt.EventQueue$4.run(EventQueue.java:733) at java.awt.EventQueue$4.run(EventQueue.java:731) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74) at java.awt.EventQueue.dispatchEvent(EventQueue.java:730) at com.fr.design.carton.EventDispatchThreadHangMonitor.dispatchEvent(EventDispatchThreadHangMonitor.java:330) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205) 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)

帮忙看下,我的插件哪里的问题,造成无法使用的。

-------------------------

2023.06.08 

根据错误信息,对 IDEA 反编译的代码进行 debug ,发现是 connectionListPane 为 null ,造成空指针。请问下,是什么原因引起的 connectionListPane 为空的?

image.png

FineReport jerome Li 发布于 2023-6-7 15:44 (编辑于 2023-6-8 10:38)
1min目标场景问卷 立即参与
回答问题
悬赏:3 F币 + 添加悬赏
提示:增加悬赏、完善问题、追问等操作,可使您的问题被置顶,并向所有关注者发送通知
共1回答
最佳回答
0
privacyLv5初级互助
发布于2023-6-7 16:28

空指针异常(NullPointerException)。它出现在AWT事件队列的主线程(AWT-EventQueue-0),并且是在com.fr.design.data.datapane.connect.ConnectionManagerPane.populate(ConnectionManagerPane.java:38)这个方法中引发的。具体的原因需要查看代码,但从异常信息中可以看出,这个错误出现的原因可能是因为在这个方法中有调用了一个空对象的方法或属性。

  • 帆软用户2tYJnhknRq 帆软用户2tYJnhknRq(提问者) 谢谢回答。目前看到的日志,全是帆软的代码报错,没有显示出来和我代码相关的错误,日志不够详细,没有把问题抛出来。
    2023-06-07 16:50 
  • 2关注人数
  • 1243浏览人数
  • 最后回答于:2023-6-8 10:38
    请选择关闭问题的原因
    确定 取消
    返回顶部