When Spark fails to show that the message is sent, it is logging such error:
Rgp 12, 2013 2:07:11 PM org.jivesoftware.spark.util.log.Log error
SEVERE: Error sending message
java.lang.NullPointerException
at java.util.Hashtable.put(Unknown Source)
at javax.swing.text.SimpleAttributeSet.addAttribute(Unknown Source)
at javax.swing.text.StyleConstants.setForeground(Unknown Source)
at org.jivesoftware.spark.ui.TranscriptWindow.insertMessage(TranscriptWindow.java: 191)
at org.jivesoftware.spark.ui.rooms.ChatRoomImpl.sendMessage(ChatRoomImpl.java:363)
at org.jivesoftware.spark.ui.rooms.ChatRoomImpl.sendMessage(ChatRoomImpl.java:346)
at org.jivesoftware.spark.ui.rooms.ChatRoomImpl.sendMessage(ChatRoomImpl.java:319)
at org.jivesoftware.spark.ui.ChatRoom.checkForEnter(ChatRoom.java:698)
at org.jivesoftware.spark.ui.ChatRoom.access$300(ChatRoom.java:90)
at org.jivesoftware.spark.ui.ChatRoom$3.keyPressed(ChatRoom.java:335)
at java.awt.AWTEventMulticaster.keyPressed(Unknown Source)
at java.awt.Component.processKeyEvent(Unknown Source)
at javax.swing.JComponent.processKeyEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.KeyboardFocusManager.redispatchEvent(Unknown Source)
at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(Unknown Source)
at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(Unknown Source)
at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(Unknown Source)
at java.awt.DefaultKeyboardFocusManager.dispatchEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$000(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue$4.run(Unknown Source)
at java.awt.EventQueue$4.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
I can’t understand anything, but this looks interesting:
at org.jivesoftware.spark.ui.ChatRoom.checkForEnter(ChatRoom.java:698)
at org.jivesoftware.spark.ui.ChatRoom.access$300(ChatRoom.java:90)
Maybe Spark is checking for Enter press, but can’t register it for showing that message was sent, though it is enough to send actual message on the background and add it to the transcript.
Btw, so far Spark restart is enough to mitigate this issue for some time. Log out and login doesn’t fix this error.
P.S. Wonder what would happen if Spark had “Send” button. Maybe it would be possible to show that message was sent, when sent with that button and not the Enter key.