java.lang.NullPointerException

Mirth Project | Eduardo Armendariz | 3 months ago
  1. 0

    Found that uncaught exceptions can lead to panels not initializing correctly. Issue 1 - setting text in a JEditTextArea while transformer pane is loading {code} Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException at org.syntax.jedit.tokenmarker.JSONTokenMarker.markTokensImpl(JSONTokenMarker.java:58) at org.syntax.jedit.tokenmarker.TokenMarker.markTokens(TokenMarker.java:57) at org.syntax.jedit.JEditTextArea._offsetToX(JEditTextArea.java:704) at org.syntax.jedit.JEditTextArea.scrollTo(JEditTextArea.java:581) at org.syntax.jedit.JEditTextArea.scrollToCaret(JEditTextArea.java:543) at org.syntax.jedit.JEditTextArea.select(JEditTextArea.java:1323) at org.syntax.jedit.JEditTextArea$DocumentHandler.insertUpdate(JEditTextArea.java:2072) at javax.swing.text.AbstractDocument.fireInsertUpdate(AbstractDocument.java:201) at org.syntax.jedit.SyntaxDocument.fireInsertUpdate(SyntaxDocument.java:150) at javax.swing.text.AbstractDocument.handleInsertString(AbstractDocument.java:748) at javax.swing.text.AbstractDocument.insertString(AbstractDocument.java:707) at org.syntax.jedit.MirthPlainDocument.insertString(MirthPlainDocument.java:122) at org.syntax.jedit.JEditTextArea.setText(JEditTextArea.java:1024) at com.mirth.connect.client.ui.components.MirthSyntaxTextArea.setText(MirthSyntaxTextArea.java:167) at com.mirth.connect.client.ui.TemplatePanel.setMessage(TemplatePanel.java:240) at com.mirth.connect.client.ui.editors.MessageTemplatePanel.setOutboundMessage(MessageTemplatePanel.java:104) at com.mirth.connect.client.ui.editors.TabbedTemplatePanel.setOutgoingMessage(TabbedTemplatePanel.java:115) at com.mirth.connect.client.ui.editors.transformer.TransformerPane.load(TransformerPane.java:206) at com.mirth.connect.client.ui.ChannelSetup.editTransformer(ChannelSetup.java:279) at com.mirth.connect.client.ui.Frame.doEditTransformer(Frame.java:2965) 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:497) 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:497) 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.$Proxy49.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:3324) 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:2750) at java.awt.Component.dispatchEvent(Component.java:4703) 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$1.doIntersectionPrivilege(ProtectionDomain.java:75) at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:86) at java.awt.EventQueue$4.run(EventQueue.java:731) at java.awt.EventQueue$4.run(EventQueue.java:729) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75) at java.awt.EventQueue.dispatchEvent(EventQueue.java:728) 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} Issue 2 - tokenizing all lines when setting the data type when transformer pane is loading {code} java.lang.NullPointerException at org.syntax.jedit.tokenmarker.JSONTokenMarker.markTokensImpl(JSONTokenMarker.java:61) at org.syntax.jedit.tokenmarker.TokenMarker.markTokens(TokenMarker.java:62) at org.syntax.jedit.SyntaxDocument.tokenizeLines(SyntaxDocument.java:92) at org.syntax.jedit.SyntaxDocument.tokenizeLines(SyntaxDocument.java:62) at org.syntax.jedit.SyntaxDocument.setTokenMarker(SyntaxDocument.java:53) at com.mirth.connect.client.ui.TemplatePanel.setDocType(TemplatePanel.java:261) at com.mirth.connect.client.ui.TemplatePanel.dataTypeComboBoxActionPerformed(TemplatePanel.java:448) at com.mirth.connect.client.ui.TemplatePanel.access$8(TemplatePanel.java:432) at com.mirth.connect.client.ui.TemplatePanel$3.actionPerformed(TemplatePanel.java:306) at javax.swing.JComboBox.fireActionEvent(JComboBox.java:1258) at javax.swing.JComboBox.setSelectedItem(JComboBox.java:586) at com.mirth.connect.client.ui.TemplatePanel.setDataType(TemplatePanel.java:253) at com.mirth.connect.client.ui.editors.MessageTemplatePanel.setOutboundDataType(MessageTemplatePanel.java:120) at com.mirth.connect.client.ui.editors.TabbedTemplatePanel.setOutgoingDataType(TabbedTemplatePanel.java:123) at com.mirth.connect.client.ui.editors.transformer.TransformerPane.load(TransformerPane.java:200) at com.mirth.connect.client.ui.ChannelSetup.editTransformer(ChannelSetup.java:280) at com.mirth.connect.client.ui.Frame.doEditTransformer(Frame.java:2965) 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:497) 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:497) 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.$Proxy49.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:3324) 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:2750) at java.awt.Component.dispatchEvent(Component.java:4703) 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$1.doIntersectionPrivilege(ProtectionDomain.java:75) at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:86) at java.awt.EventQueue$4.run(EventQueue.java:731) at java.awt.EventQueue$4.run(EventQueue.java:729) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75) at java.awt.EventQueue.dispatchEvent(EventQueue.java:728) 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 | 3 months ago | Eduardo Armendariz
    java.lang.NullPointerException
  2. 0

    Android: Saving Map State in Google map

    Stack Overflow | 11 months ago | Junie Negentien
    java.lang.RuntimeException: Unable to resume activity {com.ourThesis.junieNegentien2015/com.ourThesis.junieNegentien2015.MainActivity}: java.lang.NullPointerException
  3. Speed up your debug routine!

    Automated exception search integrated into your IDE

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.NullPointerException

      No message provided

      at org.syntax.jedit.tokenmarker.JSONTokenMarker.markTokensImpl()
    2. org.syntax.jedit
      SyntaxDocument.setTokenMarker
      1. org.syntax.jedit.tokenmarker.JSONTokenMarker.markTokensImpl(JSONTokenMarker.java:61)
      2. org.syntax.jedit.tokenmarker.TokenMarker.markTokens(TokenMarker.java:62)
      3. org.syntax.jedit.SyntaxDocument.tokenizeLines(SyntaxDocument.java:92)
      4. org.syntax.jedit.SyntaxDocument.tokenizeLines(SyntaxDocument.java:62)
      5. org.syntax.jedit.SyntaxDocument.setTokenMarker(SyntaxDocument.java:53)
      5 frames
    3. com.mirth.connect
      TemplatePanel$3.actionPerformed
      1. com.mirth.connect.client.ui.TemplatePanel.setDocType(TemplatePanel.java:261)
      2. com.mirth.connect.client.ui.TemplatePanel.dataTypeComboBoxActionPerformed(TemplatePanel.java:448)
      3. com.mirth.connect.client.ui.TemplatePanel.access$8(TemplatePanel.java:432)
      4. com.mirth.connect.client.ui.TemplatePanel$3.actionPerformed(TemplatePanel.java:306)
      4 frames
    4. Java RT
      JComboBox.setSelectedItem
      1. javax.swing.JComboBox.fireActionEvent(JComboBox.java:1258)
      2. javax.swing.JComboBox.setSelectedItem(JComboBox.java:586)
      2 frames
    5. com.mirth.connect
      Frame.doEditTransformer
      1. com.mirth.connect.client.ui.TemplatePanel.setDataType(TemplatePanel.java:253)
      2. com.mirth.connect.client.ui.editors.MessageTemplatePanel.setOutboundDataType(MessageTemplatePanel.java:120)
      3. com.mirth.connect.client.ui.editors.TabbedTemplatePanel.setOutgoingDataType(TabbedTemplatePanel.java:123)
      4. com.mirth.connect.client.ui.editors.transformer.TransformerPane.load(TransformerPane.java:200)
      5. com.mirth.connect.client.ui.ChannelSetup.editTransformer(ChannelSetup.java:280)
      6. com.mirth.connect.client.ui.Frame.doEditTransformer(Frame.java:2965)
      6 frames
    6. 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:497)
      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:497)
      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
    7. com.sun.proxy
      $Proxy49.actionPerformed
      1. com.sun.proxy.$Proxy49.actionPerformed(Unknown Source)
      1 frame
    8. org.jdesktop.swingx
      BoundAction.actionPerformed
      1. org.jdesktop.swingx.action.BoundAction.actionPerformed(BoundAction.java:231)
      1 frame
    9. Java RT
      AbstractButton.fireActionPerformed
      1. javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)
      1 frame
    10. SwingX Core
      JXHyperlink.fireActionPerformed
      1. org.jdesktop.swingx.JXHyperlink.fireActionPerformed(JXHyperlink.java:264)
      1 frame
    11. 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:3324)
      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:2750)
      18. java.awt.Component.dispatchEvent(Component.java:4703)
      19. java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
      20. java.awt.EventQueue.access$500(EventQueue.java:97)
      21. java.awt.EventQueue$3.run(EventQueue.java:709)
      22. java.awt.EventQueue$3.run(EventQueue.java:703)
      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:731)
      27. java.awt.EventQueue$4.run(EventQueue.java:729)
      28. java.security.AccessController.doPrivileged(Native Method)
      29. java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75)
      30. java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
      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