java.lang.StringIndexOutOfBoundsException

tip

You need to make sure that capitalisation of the case for the plugin in the
properties file is exactly: "AllocinePlugin" and not "allocineplugin"


rprp
tip

This is a bug when using Micromax devices with VideoView. You can either exclude these devices or look at this workaround: http://stackoverflow.com/a/31942841/4347859

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

  • 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.
    via by Daniel Henninger,
  • 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.
    via by Daniel Henninger,
  • 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.
    via by Daniel Henninger,
  • Index out of Bound
    via by Sen George,
  • Java String index out of range: -4
    via Stack Overflow by Gratin
    ,
  • Marshilling an SAML response object
    via Stack Overflow by user3565706
    ,
  • RUN BIMServer from SourceCode
    via GitHub by howlDream
    ,
  • I want get the last four characters of the string
    via by Unknown author,
    • 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)

    Users with the same issue

    Andreas HäberAndreas Häber
    2 times, last one,
    poroszdporoszd
    2 times, last one,
    HandemelindoHandemelindo
    1 times, last one,
    CasperCasper
    8 times, last one,
    zsambokizsamboki
    1 times, last one,
    92 more bugmates