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

Atlassian JIRA | Janet Albion [Atlassian] | 5 years ago
  1. 0

    Steps to reproduce: # install a new vanilla JIRA instance # create a new project. Let's say with key "ADD" # create a ticket with description "tea". Issue Key ADD-1 # create another ticket (ADD-2) with description contain: {noformat} Try to find a point where there is some load (BT off, LEDs on, display on) {noformat} Refer to screenshot Description-Edit.png # change Project Key Pattern via _Administration > General Configuration > Advanced > jira.projectkey.pattern_ to: {noformat} ([A-Z][A-Z]+)|(PJ[0-9]{4}) {noformat} # try to create a new Project with key "PJ0223". JIRA doesn't throw any error. # go to both ADD-1 and ADD-2. ADD-1 is correct as shown in ADD-1.png. However, ADD-2 will have the description broken as shown in the screenshot Description-View.png # JIRA also throw following error if : {noformat} 2012-03-26 21:33:07,110 http-8084-2 ERROR admin 1293x162x1 9tevgj 127.0.0.1 /browse/ADD-2 [atlassian.renderer.v2.V2Renderer] Unable to render content due to system error: String index out of range: -1 java.lang.StringIndexOutOfBoundsException: String index out of range: -1 at java.lang.String.substring(String.java:1931) at java.lang.String.substring(String.java:1904) at com.atlassian.jira.issue.fields.renderer.wiki.links.JiraIssueLinkRendererComponent.linkBugKeys(JiraIssueLinkRendererComponent.java:77) at com.atlassian.jira.issue.fields.renderer.wiki.links.JiraIssueLinkRendererComponent.render(JiraIssueLinkRendererComponent.java:26) {noformat} or {noformat} 2012-03-26 21:23:40,665 http-8084-2 ERROR admin 1283x107x1 9tevgj 127.0.0.1 /browse/ADD-2 [webwork.util.ValueStack] METHOD: "renderedContent", exception: java.lang.StringIndexOutOfBoundsException: String index out of range: -1 at java.lang.String.substring(String.java:1931) at java.lang.String.substring(String.java:1904) at com.atlassian.jira.util.JiraKeyUtils.linkBugKeys(JiraKeyUtils.java:372) at com.atlassian.jira.issue.fields.renderer.text.DefaultTextRenderer.render(DefaultTextRenderer.java:20) {noformat} This is tested in JIRA 4.4.3

    Atlassian JIRA | 5 years ago | Janet Albion [Atlassian]
    java.lang.StringIndexOutOfBoundsException: String index out of range: -1
  2. 0

    Steps to reproduce: # install a new vanilla JIRA instance # create a new project. Let's say with key "ADD" # create a ticket with description "tea". Issue Key ADD-1 # create another ticket (ADD-2) with description contain: {noformat} Try to find a point where there is some load (BT off, LEDs on, display on) {noformat} Refer to screenshot Description-Edit.png # change Project Key Pattern via _Administration > General Configuration > Advanced > jira.projectkey.pattern_ to: {noformat} ([A-Z][A-Z]+)|(PJ[0-9]{4}) {noformat} # try to create a new Project with key "PJ0223". JIRA doesn't throw any error. # go to both ADD-1 and ADD-2. ADD-1 is correct as shown in ADD-1.png. However, ADD-2 will have the description broken as shown in the screenshot Description-View.png # JIRA also throw following error if : {noformat} 2012-03-26 21:33:07,110 http-8084-2 ERROR admin 1293x162x1 9tevgj 127.0.0.1 /browse/ADD-2 [atlassian.renderer.v2.V2Renderer] Unable to render content due to system error: String index out of range: -1 java.lang.StringIndexOutOfBoundsException: String index out of range: -1 at java.lang.String.substring(String.java:1931) at java.lang.String.substring(String.java:1904) at com.atlassian.jira.issue.fields.renderer.wiki.links.JiraIssueLinkRendererComponent.linkBugKeys(JiraIssueLinkRendererComponent.java:77) at com.atlassian.jira.issue.fields.renderer.wiki.links.JiraIssueLinkRendererComponent.render(JiraIssueLinkRendererComponent.java:26) {noformat} or {noformat} 2012-03-26 21:23:40,665 http-8084-2 ERROR admin 1283x107x1 9tevgj 127.0.0.1 /browse/ADD-2 [webwork.util.ValueStack] METHOD: "renderedContent", exception: java.lang.StringIndexOutOfBoundsException: String index out of range: -1 at java.lang.String.substring(String.java:1931) at java.lang.String.substring(String.java:1904) at com.atlassian.jira.util.JiraKeyUtils.linkBugKeys(JiraKeyUtils.java:372) at com.atlassian.jira.issue.fields.renderer.text.DefaultTextRenderer.render(DefaultTextRenderer.java:20) {noformat} This is tested in JIRA 4.4.3

    Atlassian JIRA | 5 years ago | Janet Albion [Atlassian]
    java.lang.StringIndexOutOfBoundsException: String index out of range: -1
  3. 0

    Vanity URLs configured to redirect to a directory name fail

    GitHub | 3 years ago | brentgriffin
    java.lang.StringIndexOutOfBoundsException: String index out of range: -1
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Java lang stringindexoutofboundsexception string index out of range 1 - Java Programming - KnowCoding.com

    knowcoding.com | 8 months ago
    java.lang.StringIndexOutOfBoundsException: String index out of range: -1
  6. 0

    Exception while sending email - Java Programming Help - KnowCoding.com

    knowcoding.com | 1 year ago
    org.pentaho.di.core.exception.KettleException: An unexpected error occurred String index out of range: -1

  1. archenroot 17 times, last 1 week ago
  2. Alexandru Popa 2 times, last 3 weeks ago
  3. poroszd 3 times, last 3 weeks ago
  4. DoktorDoener666 6 times, last 4 weeks ago
  5. eti22 3 times, last 1 month ago
16 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: -1

    at java.lang.String.substring()
  2. Java RT
    String.substring
    1. java.lang.String.substring(String.java:1931)
    2. java.lang.String.substring(String.java:1904)
    2 frames
  3. com.atlassian.jira
    DefaultTextRenderer.render
    1. com.atlassian.jira.util.JiraKeyUtils.linkBugKeys(JiraKeyUtils.java:372)
    2. com.atlassian.jira.issue.fields.renderer.text.DefaultTextRenderer.render(DefaultTextRenderer.java:20)
    2 frames