Another user appear offline

i got one problem, there were 2 users A and B. User A could see user B online and chat but user B could not see user A due to offline.

has all of you ever got this error??

how can i read that error?

is it the error?

Apr 3, 2014 11:48:36 AM org.jivesoftware.spark.util.log.Log error

SEVERE: Could not get response: java.net.UnknownHostException: translate.google.com

Apr 3, 2014 11:48:36 AM org.jivesoftware.spark.util.log.Log error

SEVERE: Error sending message

java.lang.StringIndexOutOfBoundsException: String index out of range: -1

at java.lang.String.substring(Unknown Source)

at org.jivesoftware.spark.translator.TranslatorPlugin$1$2.sendingMessage(Translato rPlugin.java:80)

at org.jivesoftware.spark.ui.rooms.ChatRoomImpl.fireOutgoingMessageSending(ChatRoo mImpl.java:551)

at org.jivesoftware.spark.ui.rooms.ChatRoomImpl.sendMessage(ChatRoomImpl.java:309)

at org.jivesoftware.spark.ui.rooms.ChatRoomImpl.sendMessage(ChatRoomImpl.java:264)

at org.jivesoftware.spark.ui.rooms.ChatRoomImpl.sendMessage(ChatRoomImpl.java:239)

at org.jivesoftware.spark.ui.ChatRoom.checkForEnter(ChatRoom.java:706)

at org.jivesoftware.spark.ui.ChatRoom.access$300(ChatRoom.java:89)

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.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)

17 Apr 14 8:58:21 org.jivesoftware.spark.util.log.Log error

SEVERE: Dictionary not found

17 Apr 14 14:49:39 org.jivesoftware.spark.util.log.Log error

SEVERE: Dictionary not found

A StringIndexOutOfBoundsException is thrown when a String or StringBuffer object detects an out-of-range index. An out-of-range index occurs when the index is less than zero, or greater than or equal to the length of the string. Using the substring method, a subset of the character sequence can be extracted from a string. The substring index must be any value from 0 to the length of a string. If the index exceeds the limit, StringIndexOutOfBoundsException is thrown in String substring method.

How to solve the StringIndexOutOfBoundsException

  • Check the length of the string.
  • Exception handling using try…catch.