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

JIRA | Daniel Henninger | 9 years ago
  1. 0

    If someone typoes a, for example, MSN related JID, and puts account/40msn.com@msn.myserver.org The following exception is thrown: java.lang.StringIndexOutOfBoundsException: String index out of range: -4 at java.lang.String.substring(String.java:1768) at org.xmpp.packet.JID.getParts(JID.java:299) at org.xmpp.packet.Packet.<init>(Packet.java:72) at org.xmpp.packet.IQ.<init>(IQ.java:82) at org.jivesoftware.openfire.net.StanzaHandler.getIQ(StanzaHandler.java:272) at org.jivesoftware.openfire.net.StanzaHandler.process(StanzaHandler.java:236) at org.jivesoftware.openfire.net.StanzaHandler.process(StanzaHandler.java:153) at org.jivesoftware.openfire.nio.ConnectionHandler.messageReceived(ConnectionHandler.java:132) at org.apache.mina.common.support.AbstractIoFilterChain$TailFilter.messageReceived(AbstractIoFilterChain.java:703) at org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageReceived(AbstractIoFilterChain.java:362) at org.apache.mina.common.support.AbstractIoFilterChain.access$1100(AbstractIoFilterChain.java:54) at org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.messageReceived(AbstractIoFilterChain.java:800) at org.apache.mina.filter.codec.support.SimpleProtocolDecoderOutput.flush(SimpleProtocolDecoderOutput.java:62) at org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(ProtocolCodecFilter.java:200) at org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageReceived(AbstractIoFilterChain.java:362) at org.apache.mina.common.support.AbstractIoFilterChain.access$1100(AbstractIoFilterChain.java:54) at org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.messageReceived(AbstractIoFilterChain.java:800) at org.apache.mina.filter.executor.ExecutorFilter.processEvent(ExecutorFilter.java:266) at org.apache.mina.filter.executor.ExecutorFilter$ProcessEventsRunnable.run(ExecutorFilter.java:326) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675) at java.lang.Thread.run(Thread.java:595) Should handle this in a cleaner manner.

    Jive Software Open Source | 9 years ago | Daniel Henninger
    java.lang.StringIndexOutOfBoundsException: String index out of range: -4
  2. 0

    If someone typoes a, for example, MSN related JID, and puts account/40msn.com@msn.myserver.org The following exception is thrown: java.lang.StringIndexOutOfBoundsException: String index out of range: -4 at java.lang.String.substring(String.java:1768) at org.xmpp.packet.JID.getParts(JID.java:299) at org.xmpp.packet.Packet.<init>(Packet.java:72) at org.xmpp.packet.IQ.<init>(IQ.java:82) at org.jivesoftware.openfire.net.StanzaHandler.getIQ(StanzaHandler.java:272) at org.jivesoftware.openfire.net.StanzaHandler.process(StanzaHandler.java:236) at org.jivesoftware.openfire.net.StanzaHandler.process(StanzaHandler.java:153) at org.jivesoftware.openfire.nio.ConnectionHandler.messageReceived(ConnectionHandler.java:132) at org.apache.mina.common.support.AbstractIoFilterChain$TailFilter.messageReceived(AbstractIoFilterChain.java:703) at org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageReceived(AbstractIoFilterChain.java:362) at org.apache.mina.common.support.AbstractIoFilterChain.access$1100(AbstractIoFilterChain.java:54) at org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.messageReceived(AbstractIoFilterChain.java:800) at org.apache.mina.filter.codec.support.SimpleProtocolDecoderOutput.flush(SimpleProtocolDecoderOutput.java:62) at org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(ProtocolCodecFilter.java:200) at org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageReceived(AbstractIoFilterChain.java:362) at org.apache.mina.common.support.AbstractIoFilterChain.access$1100(AbstractIoFilterChain.java:54) at org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.messageReceived(AbstractIoFilterChain.java:800) at org.apache.mina.filter.executor.ExecutorFilter.processEvent(ExecutorFilter.java:266) at org.apache.mina.filter.executor.ExecutorFilter$ProcessEventsRunnable.run(ExecutorFilter.java:326) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675) at java.lang.Thread.run(Thread.java:595) Should handle this in a cleaner manner.

    JIRA | 9 years ago | Daniel Henninger
    java.lang.StringIndexOutOfBoundsException: String index out of range: -4
  3. 0

    If someone typoes a, for example, MSN related JID, and puts account/40msn.com@msn.myserver.org The following exception is thrown: java.lang.StringIndexOutOfBoundsException: String index out of range: -4 at java.lang.String.substring(String.java:1768) at org.xmpp.packet.JID.getParts(JID.java:299) at org.xmpp.packet.Packet.<init>(Packet.java:72) at org.xmpp.packet.IQ.<init>(IQ.java:82) at org.jivesoftware.openfire.net.StanzaHandler.getIQ(StanzaHandler.java:272) at org.jivesoftware.openfire.net.StanzaHandler.process(StanzaHandler.java:236) at org.jivesoftware.openfire.net.StanzaHandler.process(StanzaHandler.java:153) at org.jivesoftware.openfire.nio.ConnectionHandler.messageReceived(ConnectionHandler.java:132) at org.apache.mina.common.support.AbstractIoFilterChain$TailFilter.messageReceived(AbstractIoFilterChain.java:703) at org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageReceived(AbstractIoFilterChain.java:362) at org.apache.mina.common.support.AbstractIoFilterChain.access$1100(AbstractIoFilterChain.java:54) at org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.messageReceived(AbstractIoFilterChain.java:800) at org.apache.mina.filter.codec.support.SimpleProtocolDecoderOutput.flush(SimpleProtocolDecoderOutput.java:62) at org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(ProtocolCodecFilter.java:200) at org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageReceived(AbstractIoFilterChain.java:362) at org.apache.mina.common.support.AbstractIoFilterChain.access$1100(AbstractIoFilterChain.java:54) at org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.messageReceived(AbstractIoFilterChain.java:800) at org.apache.mina.filter.executor.ExecutorFilter.processEvent(ExecutorFilter.java:266) at org.apache.mina.filter.executor.ExecutorFilter$ProcessEventsRunnable.run(ExecutorFilter.java:326) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675) at java.lang.Thread.run(Thread.java:595) Should handle this in a cleaner manner.

    Jive Software Open Source | 9 years ago | Daniel Henninger
    java.lang.StringIndexOutOfBoundsException: String index out of range: -4
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Index out of Bound

    Coderanch | 1 decade ago | Sen George
    java.lang.StringIndexOutOfBoundsException: String index out of range: -4
  6. 0

    Java String index out of range: -4

    Stack Overflow | 3 years ago | Gratin
    java.lang.StringIndexOutOfBoundsException: String index out of range: -4

  1. richard77 2 times, last 5 days ago
  2. kjhdofjosvs 2 times, last 1 week ago
  3. archenroot 17 times, last 2 weeks ago
  4. Alexandru Popa 2 times, last 4 weeks ago
  5. poroszd 3 times, last 1 month ago
18 more registered users
58 unregistered visitors
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.StringIndexOutOfBoundsException

    String index out of range: -4

    at java.lang.String.substring()
  2. Java RT
    String.substring
    1. java.lang.String.substring(String.java:1768)
    1 frame
  3. org.xmpp.packet
    IQ.<init>
    1. org.xmpp.packet.JID.getParts(JID.java:299)
    2. org.xmpp.packet.Packet.<init>(Packet.java:72)
    3. org.xmpp.packet.IQ.<init>(IQ.java:82)
    3 frames
  4. org.jivesoftware.openfire
    ConnectionHandler.messageReceived
    1. org.jivesoftware.openfire.net.StanzaHandler.getIQ(StanzaHandler.java:272)
    2. org.jivesoftware.openfire.net.StanzaHandler.process(StanzaHandler.java:236)
    3. org.jivesoftware.openfire.net.StanzaHandler.process(StanzaHandler.java:153)
    4. org.jivesoftware.openfire.nio.ConnectionHandler.messageReceived(ConnectionHandler.java:132)
    4 frames
  5. org.apache.mina
    SimpleProtocolDecoderOutput.flush
    1. org.apache.mina.common.support.AbstractIoFilterChain$TailFilter.messageReceived(AbstractIoFilterChain.java:703)
    2. org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageReceived(AbstractIoFilterChain.java:362)
    3. org.apache.mina.common.support.AbstractIoFilterChain.access$1100(AbstractIoFilterChain.java:54)
    4. org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.messageReceived(AbstractIoFilterChain.java:800)
    5. org.apache.mina.filter.codec.support.SimpleProtocolDecoderOutput.flush(SimpleProtocolDecoderOutput.java:62)
    5 frames
  6. Apache MINA Core
    ProtocolCodecFilter.messageReceived
    1. org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(ProtocolCodecFilter.java:200)
    1 frame
  7. org.apache.mina
    AbstractIoFilterChain$EntryImpl$1.messageReceived
    1. org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageReceived(AbstractIoFilterChain.java:362)
    2. org.apache.mina.common.support.AbstractIoFilterChain.access$1100(AbstractIoFilterChain.java:54)
    3. org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.messageReceived(AbstractIoFilterChain.java:800)
    3 frames
  8. Apache MINA Core
    ExecutorFilter$ProcessEventsRunnable.run
    1. org.apache.mina.filter.executor.ExecutorFilter.processEvent(ExecutorFilter.java:266)
    2. org.apache.mina.filter.executor.ExecutorFilter$ProcessEventsRunnable.run(ExecutorFilter.java:326)
    2 frames
  9. Java RT
    Thread.run
    1. java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
    2. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
    3. java.lang.Thread.run(Thread.java:595)
    3 frames