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

Coderanch | Kudret Serin | 1 decade ago
tip
Do you find the tips below useful? Click on the to mark them and say thanks to rp and rafael . Or join the community to write better ones.
  1. 0

    Why do i get this exception?

    Coderanch | 1 decade ago | Kudret Serin
    java.lang.StringIndexOutOfBoundsException: String index out of range: -2
  2. 0
    samebug tip
    You need to make sure that capitalisation of the case for the plugin in the properties file is exactly: "AllocinePlugin" and not "allocineplugin"
    via GitHub by Omertron
  3. 0
    samebug 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
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    GWT 2 CssResource how to

    Stack Overflow | 7 years ago | Shahid
    java.lang.StringIndexOutOfBoundsException: String index out of range: -2
  6. 0

    missing module, missing string

    GitHub | 2 years ago | jzakula
    org.mozilla.javascript.WrappedException: Wrapped java.lang.StringIndexOutOfBoundsException: String index out of range: -2

  1. osvzs 1 times, last 2 weeks ago
  2. Indri Yunita 7 times, last 4 weeks ago
  3. Pilleo 1 times, last 1 month ago
  4. Andreas Häber 2 times, last 2 months ago
  5. QrCeric 1 times, last 2 months ago
25 more registered users
59 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: -2

    at java.lang.String.substring()
  2. Java RT
    String.substring
    1. java.lang.String.substring(Unknown Source)
    1 frame
  3. certifier
    Certifier$Quiz$1.mouseClicked
    1. certifier.Certifier$Quiz.getQuestion(Certifier.java:228)
    2. certifier.Certifier$Quiz.access$600(Certifier.java:84)
    3. certifier.Certifier$Quiz$1.mouseClicked(Certifier.java:195)
    3 frames
  4. Java RT
    EventDispatchThread.run
    1. java.awt.AWTEventMulticaster.mouseClicked(Unknown Source)
    2. java.awt.Component.processMouseEvent(Unknown Source)
    3. javax.swing.JComponent.processMouseEvent(Unknown Source)
    4. java.awt.Component.processEvent(Unknown Source)
    5. java.awt.Container.processEvent(Unknown Source)
    6. java.awt.Component.dispatchEventImpl(Unknown Source)
    7. java.awt.Container.dispatchEventImpl(Unknown Source)
    8. java.awt.Component.dispatchEvent(Unknown Source)
    9. java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
    10. java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
    11. java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
    12. java.awt.Container.dispatchEventImpl(Unknown Source)
    13. java.awt.Window.dispatchEventImpl(Unknown Source)
    14. java.awt.Component.dispatchEvent(Unknown Source)
    15. java.awt.EventQueue.dispatchEvent(Unknown Source)
    16. java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
    17. java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
    18. java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    19. java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    20. java.awt.EventDispatchThread.run(Unknown Source)
    20 frames