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

    It looks like several people have run into this: [http://www.mirthcorp.com/community/forums/showthread.php?t=12505] In the setBackground method we're also setting the background on the export panel. However it appears that in some cases, setBackground may be called by the superclass' constructor, before the subclass has a chance to initialize the panel. The exception: {code}Exception in thread "AWT-EventQueue-2" java.lang.NullPointerException at com.mirth.connect.client.ui.MessageExportDialog.setBackground(MessageExportDialog.java:85) at javax.swing.JDialog.dialogInit(JDialog.java:649) at javax.swing.JDialog.<init>(JDialog.java:279) at javax.swing.JDialog.<init>(JDialog.java:206) at javax.swing.JDialog.<init>(JDialog.java:179) at com.mirth.connect.client.ui.MirthDialog.<init>(MirthDialog.java:24) at com.mirth.connect.client.ui.MessageExportDialog.<init>(MessageExportDialog.java:50) at com.mirth.connect.client.ui.Frame.doExportMessages(Frame.java:3676) 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 sun.reflect.misc.Trampoline.invoke(MethodUtil.java:71) at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:483) at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:275) at java.beans.EventHandler.invokeInternal(EventHandler.java:482) at java.beans.EventHandler.access$000(EventHandler.java:279) at java.beans.EventHandler$1.run(EventHandler.java:430) at java.security.AccessController.doPrivileged(Native Method) at java.beans.EventHandler.invoke(EventHandler.java:428) at com.sun.proxy.$Proxy10.actionPerformed(Unknown Source) at org.jdesktop.swingx.action.BoundAction.actionPerformed(BoundAction.java:231) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022) at org.jdesktop.swingx.JXHyperlink.fireActionPerformed(JXHyperlink.java:264) at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2346) at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402) at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252) at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:289) at java.awt.Component.processMouseEvent(Component.java:6525) at javax.swing.JComponent.processMouseEvent(JComponent.java:3321) at java.awt.Component.processEvent(Component.java:6290) at java.awt.Container.processEvent(Container.java:2234) at java.awt.Component.dispatchEventImpl(Component.java:4881) at java.awt.Container.dispatchEventImpl(Container.java:2292) at java.awt.Component.dispatchEvent(Component.java:4703) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4898) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4533) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4462) at java.awt.Container.dispatchEventImpl(Container.java:2278) at java.awt.Window.dispatchEventImpl(Window.java:2739) at java.awt.Component.dispatchEvent(Component.java:4703) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:746) 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.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:86) at java.awt.EventQueue$4.run(EventQueue.java:719) at java.awt.EventQueue$4.run(EventQueue.java:717) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75) at java.awt.EventQueue.dispatchEvent(EventQueue.java:716) 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){code}

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

    It looks like several people have run into this: [http://www.mirthcorp.com/community/forums/showthread.php?t=12505] In the setBackground method we're also setting the background on the export panel. However it appears that in some cases, setBackground may be called by the superclass' constructor, before the subclass has a chance to initialize the panel. The exception: {code}Exception in thread "AWT-EventQueue-2" java.lang.NullPointerException at com.mirth.connect.client.ui.MessageExportDialog.setBackground(MessageExportDialog.java:85) at javax.swing.JDialog.dialogInit(JDialog.java:649) at javax.swing.JDialog.<init>(JDialog.java:279) at javax.swing.JDialog.<init>(JDialog.java:206) at javax.swing.JDialog.<init>(JDialog.java:179) at com.mirth.connect.client.ui.MirthDialog.<init>(MirthDialog.java:24) at com.mirth.connect.client.ui.MessageExportDialog.<init>(MessageExportDialog.java:50) at com.mirth.connect.client.ui.Frame.doExportMessages(Frame.java:3676) 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 sun.reflect.misc.Trampoline.invoke(MethodUtil.java:71) at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:483) at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:275) at java.beans.EventHandler.invokeInternal(EventHandler.java:482) at java.beans.EventHandler.access$000(EventHandler.java:279) at java.beans.EventHandler$1.run(EventHandler.java:430) at java.security.AccessController.doPrivileged(Native Method) at java.beans.EventHandler.invoke(EventHandler.java:428) at com.sun.proxy.$Proxy10.actionPerformed(Unknown Source) at org.jdesktop.swingx.action.BoundAction.actionPerformed(BoundAction.java:231) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022) at org.jdesktop.swingx.JXHyperlink.fireActionPerformed(JXHyperlink.java:264) at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2346) at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402) at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252) at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:289) at java.awt.Component.processMouseEvent(Component.java:6525) at javax.swing.JComponent.processMouseEvent(JComponent.java:3321) at java.awt.Component.processEvent(Component.java:6290) at java.awt.Container.processEvent(Container.java:2234) at java.awt.Component.dispatchEventImpl(Component.java:4881) at java.awt.Container.dispatchEventImpl(Container.java:2292) at java.awt.Component.dispatchEvent(Component.java:4703) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4898) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4533) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4462) at java.awt.Container.dispatchEventImpl(Container.java:2278) at java.awt.Window.dispatchEventImpl(Window.java:2739) at java.awt.Component.dispatchEvent(Component.java:4703) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:746) 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.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:86) at java.awt.EventQueue$4.run(EventQueue.java:719) at java.awt.EventQueue$4.run(EventQueue.java:717) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75) at java.awt.EventQueue.dispatchEvent(EventQueue.java:716) 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){code}

    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.MessageExportDialog.setBackground()
    2. com.mirth.connect
      MessageExportDialog.setBackground
      1. com.mirth.connect.client.ui.MessageExportDialog.setBackground(MessageExportDialog.java:85)
      1 frame
    3. Java RT
      JDialog.<init>
      1. javax.swing.JDialog.dialogInit(JDialog.java:649)
      2. javax.swing.JDialog.<init>(JDialog.java:279)
      3. javax.swing.JDialog.<init>(JDialog.java:206)
      4. javax.swing.JDialog.<init>(JDialog.java:179)
      4 frames
    4. com.mirth.connect
      Frame.doExportMessages
      1. com.mirth.connect.client.ui.MirthDialog.<init>(MirthDialog.java:24)
      2. com.mirth.connect.client.ui.MessageExportDialog.<init>(MessageExportDialog.java:50)
      3. com.mirth.connect.client.ui.Frame.doExportMessages(Frame.java:3676)
      3 frames
    5. Java RT
      EventHandler.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      4. java.lang.reflect.Method.invoke(Method.java:483)
      5. sun.reflect.misc.Trampoline.invoke(MethodUtil.java:71)
      6. sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
      7. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      8. java.lang.reflect.Method.invoke(Method.java:483)
      9. sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:275)
      10. java.beans.EventHandler.invokeInternal(EventHandler.java:482)
      11. java.beans.EventHandler.access$000(EventHandler.java:279)
      12. java.beans.EventHandler$1.run(EventHandler.java:430)
      13. java.security.AccessController.doPrivileged(Native Method)
      14. java.beans.EventHandler.invoke(EventHandler.java:428)
      14 frames
    6. com.sun.proxy
      $Proxy10.actionPerformed
      1. com.sun.proxy.$Proxy10.actionPerformed(Unknown Source)
      1 frame
    7. org.jdesktop.swingx
      BoundAction.actionPerformed
      1. org.jdesktop.swingx.action.BoundAction.actionPerformed(BoundAction.java:231)
      1 frame
    8. Java RT
      AbstractButton.fireActionPerformed
      1. javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)
      1 frame
    9. SwingX Core
      JXHyperlink.fireActionPerformed
      1. org.jdesktop.swingx.JXHyperlink.fireActionPerformed(JXHyperlink.java:264)
      1 frame
    10. Java RT
      EventDispatchThread.run
      1. javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2346)
      2. javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
      3. javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
      4. javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252)
      5. java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:289)
      6. java.awt.Component.processMouseEvent(Component.java:6525)
      7. javax.swing.JComponent.processMouseEvent(JComponent.java:3321)
      8. java.awt.Component.processEvent(Component.java:6290)
      9. java.awt.Container.processEvent(Container.java:2234)
      10. java.awt.Component.dispatchEventImpl(Component.java:4881)
      11. java.awt.Container.dispatchEventImpl(Container.java:2292)
      12. java.awt.Component.dispatchEvent(Component.java:4703)
      13. java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4898)
      14. java.awt.LightweightDispatcher.processMouseEvent(Container.java:4533)
      15. java.awt.LightweightDispatcher.dispatchEvent(Container.java:4462)
      16. java.awt.Container.dispatchEventImpl(Container.java:2278)
      17. java.awt.Window.dispatchEventImpl(Window.java:2739)
      18. java.awt.Component.dispatchEvent(Component.java:4703)
      19. java.awt.EventQueue.dispatchEventImpl(EventQueue.java:746)
      20. java.awt.EventQueue.access$400(EventQueue.java:97)
      21. java.awt.EventQueue$3.run(EventQueue.java:697)
      22. java.awt.EventQueue$3.run(EventQueue.java:691)
      23. java.security.AccessController.doPrivileged(Native Method)
      24. java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75)
      25. java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:86)
      26. java.awt.EventQueue$4.run(EventQueue.java:719)
      27. java.awt.EventQueue$4.run(EventQueue.java:717)
      28. java.security.AccessController.doPrivileged(Native Method)
      29. java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75)
      30. java.awt.EventQueue.dispatchEvent(EventQueue.java:716)
      31. java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
      32. java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
      33. java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
      34. java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
      35. java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
      36. java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
      36 frames