java.lang.NullPointerException

Mirth Project | Nick Rupley | 2 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    The Channel Writer is actually returning null when the channelList variable is null. This was "needed" before because the channel ID was grabbed from that list. However with MIRTH-2961, the ID comes directly from the text field, so there's no need to use channelList anymore. This is noticeable now with the resource ID changes. When you load a channel for the first time, and the first destination isn't a Channel Writer, but then you switch to a Channel Writer, you'll get the following exception: {code}Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException at com.mirth.connect.client.ui.ChannelSetup.saveDestinationPanel(ChannelSetup.java:1133) at com.mirth.connect.client.ui.panels.connectors.DestinationSettingsPanel.updateQueueMessages(DestinationSettingsPanel.java:135) at com.mirth.connect.client.ui.panels.connectors.DestinationSettingsPanel.setProperties(DestinationSettingsPanel.java:83) at com.mirth.connect.client.ui.panels.connectors.ConnectorPanel.setProperties(ConnectorPanel.java:164) at com.mirth.connect.client.ui.ChannelSetup.generateMultipleDestinationPage(ChannelSetup.java:3124) at com.mirth.connect.client.ui.ChannelSetup.destinationSourceDropdownActionPerformed(ChannelSetup.java:2840) at com.mirth.connect.client.ui.ChannelSetup.access$38(ChannelSetup.java:2818) at com.mirth.connect.client.ui.ChannelSetup$31.actionPerformed(ChannelSetup.java:2497) at javax.swing.JComboBox.fireActionEvent(JComboBox.java:1260) at javax.swing.JComboBox.setSelectedItem(JComboBox.java:588) at javax.swing.JComboBox.setSelectedIndex(JComboBox.java:624) at javax.swing.plaf.basic.BasicComboPopup$Handler.mouseReleased(BasicComboPopup.java:835) at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:290) at java.awt.Component.processMouseEvent(Component.java:6516) at javax.swing.JComponent.processMouseEvent(JComponent.java:3320) at javax.swing.plaf.basic.BasicComboPopup$1.processMouseEvent(BasicComboPopup.java:499) at java.awt.Component.processEvent(Component.java:6281) at java.awt.Container.processEvent(Container.java:2229) at java.awt.Component.dispatchEventImpl(Component.java:4872) at java.awt.Container.dispatchEventImpl(Container.java:2287) at java.awt.Component.dispatchEvent(Component.java:4698) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4832) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4492) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4422) at java.awt.Container.dispatchEventImpl(Container.java:2273) at java.awt.Window.dispatchEventImpl(Window.java:2719) at java.awt.Component.dispatchEvent(Component.java:4698) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:735) at java.awt.EventQueue.access$200(EventQueue.java:103) at java.awt.EventQueue$3.run(EventQueue.java:694) at java.awt.EventQueue$3.run(EventQueue.java:692) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76) at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87) at java.awt.EventQueue$4.run(EventQueue.java:708) at java.awt.EventQueue$4.run(EventQueue.java:706) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76) at java.awt.EventQueue.dispatchEvent(EventQueue.java:705) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138) at java.awt.EventDispatchThread.run(EventDispatchThread.java:91){code} Doing a check in saveDestinationPanel would fix it, but we should also get rid of the null check in ChannelWriter since it's no longer necessary.

    Mirth Project | 2 years ago | Nick Rupley
    java.lang.NullPointerException
  2. 0

    The Channel Writer is actually returning null when the channelList variable is null. This was "needed" before because the channel ID was grabbed from that list. However with MIRTH-2961, the ID comes directly from the text field, so there's no need to use channelList anymore. This is noticeable now with the resource ID changes. When you load a channel for the first time, and the first destination isn't a Channel Writer, but then you switch to a Channel Writer, you'll get the following exception: {code}Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException at com.mirth.connect.client.ui.ChannelSetup.saveDestinationPanel(ChannelSetup.java:1133) at com.mirth.connect.client.ui.panels.connectors.DestinationSettingsPanel.updateQueueMessages(DestinationSettingsPanel.java:135) at com.mirth.connect.client.ui.panels.connectors.DestinationSettingsPanel.setProperties(DestinationSettingsPanel.java:83) at com.mirth.connect.client.ui.panels.connectors.ConnectorPanel.setProperties(ConnectorPanel.java:164) at com.mirth.connect.client.ui.ChannelSetup.generateMultipleDestinationPage(ChannelSetup.java:3124) at com.mirth.connect.client.ui.ChannelSetup.destinationSourceDropdownActionPerformed(ChannelSetup.java:2840) at com.mirth.connect.client.ui.ChannelSetup.access$38(ChannelSetup.java:2818) at com.mirth.connect.client.ui.ChannelSetup$31.actionPerformed(ChannelSetup.java:2497) at javax.swing.JComboBox.fireActionEvent(JComboBox.java:1260) at javax.swing.JComboBox.setSelectedItem(JComboBox.java:588) at javax.swing.JComboBox.setSelectedIndex(JComboBox.java:624) at javax.swing.plaf.basic.BasicComboPopup$Handler.mouseReleased(BasicComboPopup.java:835) at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:290) at java.awt.Component.processMouseEvent(Component.java:6516) at javax.swing.JComponent.processMouseEvent(JComponent.java:3320) at javax.swing.plaf.basic.BasicComboPopup$1.processMouseEvent(BasicComboPopup.java:499) at java.awt.Component.processEvent(Component.java:6281) at java.awt.Container.processEvent(Container.java:2229) at java.awt.Component.dispatchEventImpl(Component.java:4872) at java.awt.Container.dispatchEventImpl(Container.java:2287) at java.awt.Component.dispatchEvent(Component.java:4698) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4832) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4492) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4422) at java.awt.Container.dispatchEventImpl(Container.java:2273) at java.awt.Window.dispatchEventImpl(Window.java:2719) at java.awt.Component.dispatchEvent(Component.java:4698) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:735) at java.awt.EventQueue.access$200(EventQueue.java:103) at java.awt.EventQueue$3.run(EventQueue.java:694) at java.awt.EventQueue$3.run(EventQueue.java:692) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76) at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87) at java.awt.EventQueue$4.run(EventQueue.java:708) at java.awt.EventQueue$4.run(EventQueue.java:706) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76) at java.awt.EventQueue.dispatchEvent(EventQueue.java:705) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138) at java.awt.EventDispatchThread.run(EventDispatchThread.java:91){code} Doing a check in saveDestinationPanel would fix it, but we should also get rid of the null check in ChannelWriter since it's no longer necessary.

    Mirth Project | 2 years ago | Nick Rupley
    java.lang.NullPointerException

    Root Cause Analysis

    1. java.lang.NullPointerException

      No message provided

      at com.mirth.connect.client.ui.ChannelSetup.saveDestinationPanel()
    2. com.mirth.connect
      ChannelSetup$31.actionPerformed
      1. com.mirth.connect.client.ui.ChannelSetup.saveDestinationPanel(ChannelSetup.java:1133)
      2. com.mirth.connect.client.ui.panels.connectors.DestinationSettingsPanel.updateQueueMessages(DestinationSettingsPanel.java:135)
      3. com.mirth.connect.client.ui.panels.connectors.DestinationSettingsPanel.setProperties(DestinationSettingsPanel.java:83)
      4. com.mirth.connect.client.ui.panels.connectors.ConnectorPanel.setProperties(ConnectorPanel.java:164)
      5. com.mirth.connect.client.ui.ChannelSetup.generateMultipleDestinationPage(ChannelSetup.java:3124)
      6. com.mirth.connect.client.ui.ChannelSetup.destinationSourceDropdownActionPerformed(ChannelSetup.java:2840)
      7. com.mirth.connect.client.ui.ChannelSetup.access$38(ChannelSetup.java:2818)
      8. com.mirth.connect.client.ui.ChannelSetup$31.actionPerformed(ChannelSetup.java:2497)
      8 frames
    3. Java RT
      EventDispatchThread.run
      1. javax.swing.JComboBox.fireActionEvent(JComboBox.java:1260)
      2. javax.swing.JComboBox.setSelectedItem(JComboBox.java:588)
      3. javax.swing.JComboBox.setSelectedIndex(JComboBox.java:624)
      4. javax.swing.plaf.basic.BasicComboPopup$Handler.mouseReleased(BasicComboPopup.java:835)
      5. java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:290)
      6. java.awt.Component.processMouseEvent(Component.java:6516)
      7. javax.swing.JComponent.processMouseEvent(JComponent.java:3320)
      8. javax.swing.plaf.basic.BasicComboPopup$1.processMouseEvent(BasicComboPopup.java:499)
      9. java.awt.Component.processEvent(Component.java:6281)
      10. java.awt.Container.processEvent(Container.java:2229)
      11. java.awt.Component.dispatchEventImpl(Component.java:4872)
      12. java.awt.Container.dispatchEventImpl(Container.java:2287)
      13. java.awt.Component.dispatchEvent(Component.java:4698)
      14. java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4832)
      15. java.awt.LightweightDispatcher.processMouseEvent(Container.java:4492)
      16. java.awt.LightweightDispatcher.dispatchEvent(Container.java:4422)
      17. java.awt.Container.dispatchEventImpl(Container.java:2273)
      18. java.awt.Window.dispatchEventImpl(Window.java:2719)
      19. java.awt.Component.dispatchEvent(Component.java:4698)
      20. java.awt.EventQueue.dispatchEventImpl(EventQueue.java:735)
      21. java.awt.EventQueue.access$200(EventQueue.java:103)
      22. java.awt.EventQueue$3.run(EventQueue.java:694)
      23. java.awt.EventQueue$3.run(EventQueue.java:692)
      24. java.security.AccessController.doPrivileged(Native Method)
      25. java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
      26. java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87)
      27. java.awt.EventQueue$4.run(EventQueue.java:708)
      28. java.awt.EventQueue$4.run(EventQueue.java:706)
      29. java.security.AccessController.doPrivileged(Native Method)
      30. java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
      31. java.awt.EventQueue.dispatchEvent(EventQueue.java:705)
      32. java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
      33. java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
      34. java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
      35. java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
      36. java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
      37. java.awt.EventDispatchThread.run(EventDispatchThread.java:91)
      37 frames