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

Jenkins JIRA | tomas bohunek | 7 months ago
  1. 0

    Hi. I get the following error during jenkins job. I thought it was related to Git plugin. Jenkins version: 1.631 Git plugin version: 2.3.5 java.lang.StringIndexOutOfBoundsException: String index out of range: -1 at java.lang.String.substring(String.java:1911) at hudson.plugins.git.GitChangeSet.isoDateFormat(GitChangeSet.java:179) at hudson.plugins.git.GitChangeSet.parseCommit(GitChangeSet.java:118) at hudson.plugins.git.GitChangeSet.<init>(GitChangeSet.java:89) at hudson.plugins.git.GitChangeLogParser.parseCommit(GitChangeLogParser.java:73) at hudson.plugins.git.GitChangeLogParser.parse(GitChangeLogParser.java:57) at hudson.plugins.git.GitChangeLogParser.parse(GitChangeLogParser.java:44) at hudson.plugins.git.GitChangeLogParser.parse(GitChangeLogParser.java:25) at hudson.scm.ChangeLogParser.parse(ChangeLogParser.java:57) at hudson.model.AbstractBuild.calcChangeSet(AbstractBuild.java:924) at hudson.model.AbstractBuild.getChangeSet(AbstractBuild.java:892) at hudson.model.AbstractBuild.getCulprits(AbstractBuild.java:352) at hudson.model.AbstractBuild.getCulprits(AbstractBuild.java:349) at hudson.tasks.MailSender.createEmptyMail(MailSender.java:375) at hudson.tasks.MailSender.createFailureMail(MailSender.java:260) at hudson.tasks.MailSender.createMail(MailSender.java:178) at hudson.tasks.MailSender.run(MailSender.java:107) at hudson.tasks.Mailer.perform(Mailer.java:141) at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:75) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:779) at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:726) at hudson.model.Build$BuildExecution.post2(Build.java:185) at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:671) at hudson.model.Run.execute(Run.java:1766) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:408) Build step 'E-mail Notification' marked build as failure FATAL: String index out of range: -1 java.lang.StringIndexOutOfBoundsException: String index out of range: -1 at java.lang.String.substring(String.java:1911) at hudson.plugins.git.GitChangeSet.isoDateFormat(GitChangeSet.java:179) at hudson.plugins.git.GitChangeSet.parseCommit(GitChangeSet.java:118) at hudson.plugins.git.GitChangeSet.<init>(GitChangeSet.java:89) at hudson.plugins.git.GitChangeLogParser.parseCommit(GitChangeLogParser.java:73) at hudson.plugins.git.GitChangeLogParser.parse(GitChangeLogParser.java:57) at hudson.plugins.git.GitChangeLogParser.parse(GitChangeLogParser.java:44) at hudson.plugins.git.GitChangeLogParser.parse(GitChangeLogParser.java:25) at hudson.scm.ChangeLogParser.parse(ChangeLogParser.java:57) at hudson.model.AbstractBuild.calcChangeSet(AbstractBuild.java:924) at hudson.model.AbstractBuild.getChangeSet(AbstractBuild.java:892) at hudson.model.AbstractBuild.getCulprits(AbstractBuild.java:352) at hudson.model.AbstractBuild.getCulprits(AbstractBuild.java:349) at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:675) at hudson.model.Run.execute(Run.java:1766) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:408) Warning: 'Access Control for Builds' in global security configuration is empty, so falling back to legacy behavior of permitting any downstream builds to be triggered FATAL: null java.lang.NullPointerException at jenkins.triggers.ReverseBuildTrigger.shouldTrigger(ReverseBuildTrigger.java:114) at jenkins.triggers.ReverseBuildTrigger.access$000(ReverseBuildTrigger.java:86) at jenkins.triggers.ReverseBuildTrigger$1.shouldTriggerBuild(ReverseBuildTrigger.java:144) at hudson.tasks.BuildTrigger.execute(BuildTrigger.java:245) at hudson.model.AbstractBuild$AbstractBuildExecution.cleanUp(AbstractBuild.java:687) at hudson.model.Build$BuildExecution.cleanUp(Build.java:200) at hudson.model.Run.execute(Run.java:1788) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:408) Finished: FAILURE

    Jenkins JIRA | 7 months ago | tomas bohunek
    java.lang.StringIndexOutOfBoundsException: String index out of range: -1
  2. 0

    Hi. I get the following error during jenkins job. I thought it was related to Git plugin. Jenkins version: 1.631 Git plugin version: 2.3.5 java.lang.StringIndexOutOfBoundsException: String index out of range: -1 at java.lang.String.substring(String.java:1911) at hudson.plugins.git.GitChangeSet.isoDateFormat(GitChangeSet.java:179) at hudson.plugins.git.GitChangeSet.parseCommit(GitChangeSet.java:118) at hudson.plugins.git.GitChangeSet.<init>(GitChangeSet.java:89) at hudson.plugins.git.GitChangeLogParser.parseCommit(GitChangeLogParser.java:73) at hudson.plugins.git.GitChangeLogParser.parse(GitChangeLogParser.java:57) at hudson.plugins.git.GitChangeLogParser.parse(GitChangeLogParser.java:44) at hudson.plugins.git.GitChangeLogParser.parse(GitChangeLogParser.java:25) at hudson.scm.ChangeLogParser.parse(ChangeLogParser.java:57) at hudson.model.AbstractBuild.calcChangeSet(AbstractBuild.java:924) at hudson.model.AbstractBuild.getChangeSet(AbstractBuild.java:892) at hudson.model.AbstractBuild.getCulprits(AbstractBuild.java:352) at hudson.model.AbstractBuild.getCulprits(AbstractBuild.java:349) at hudson.tasks.MailSender.createEmptyMail(MailSender.java:375) at hudson.tasks.MailSender.createFailureMail(MailSender.java:260) at hudson.tasks.MailSender.createMail(MailSender.java:178) at hudson.tasks.MailSender.run(MailSender.java:107) at hudson.tasks.Mailer.perform(Mailer.java:141) at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:75) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:779) at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:726) at hudson.model.Build$BuildExecution.post2(Build.java:185) at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:671) at hudson.model.Run.execute(Run.java:1766) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:408) Build step 'E-mail Notification' marked build as failure FATAL: String index out of range: -1 java.lang.StringIndexOutOfBoundsException: String index out of range: -1 at java.lang.String.substring(String.java:1911) at hudson.plugins.git.GitChangeSet.isoDateFormat(GitChangeSet.java:179) at hudson.plugins.git.GitChangeSet.parseCommit(GitChangeSet.java:118) at hudson.plugins.git.GitChangeSet.<init>(GitChangeSet.java:89) at hudson.plugins.git.GitChangeLogParser.parseCommit(GitChangeLogParser.java:73) at hudson.plugins.git.GitChangeLogParser.parse(GitChangeLogParser.java:57) at hudson.plugins.git.GitChangeLogParser.parse(GitChangeLogParser.java:44) at hudson.plugins.git.GitChangeLogParser.parse(GitChangeLogParser.java:25) at hudson.scm.ChangeLogParser.parse(ChangeLogParser.java:57) at hudson.model.AbstractBuild.calcChangeSet(AbstractBuild.java:924) at hudson.model.AbstractBuild.getChangeSet(AbstractBuild.java:892) at hudson.model.AbstractBuild.getCulprits(AbstractBuild.java:352) at hudson.model.AbstractBuild.getCulprits(AbstractBuild.java:349) at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:675) at hudson.model.Run.execute(Run.java:1766) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:408) Warning: 'Access Control for Builds' in global security configuration is empty, so falling back to legacy behavior of permitting any downstream builds to be triggered FATAL: null java.lang.NullPointerException at jenkins.triggers.ReverseBuildTrigger.shouldTrigger(ReverseBuildTrigger.java:114) at jenkins.triggers.ReverseBuildTrigger.access$000(ReverseBuildTrigger.java:86) at jenkins.triggers.ReverseBuildTrigger$1.shouldTriggerBuild(ReverseBuildTrigger.java:144) at hudson.tasks.BuildTrigger.execute(BuildTrigger.java:245) at hudson.model.AbstractBuild$AbstractBuildExecution.cleanUp(AbstractBuild.java:687) at hudson.model.Build$BuildExecution.cleanUp(Build.java:200) at hudson.model.Run.execute(Run.java:1788) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:408) Finished: FAILURE

    Jenkins JIRA | 7 months ago | tomas bohunek
    java.lang.StringIndexOutOfBoundsException: String index out of range: -1
  3. 0

    [JENKINS-28260] Java String Index Out of Range - Jenkins JIRA

    jenkins-ci.org | 1 year ago
    java.lang.StringIndexOutOfBoundsException: String index out of range: -1
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    I have a project that is configured to git fetch from Atlassian Stash repository. It then runs buildr to compile it. There are many times that the whole process fails with the following: FATAL: String index out of range: -1 java.lang.StringIndexOutOfBoundsException: String index out of range: -1 at java.lang.String.substring(String.java:1911) at hudson.plugins.git.GitChangeSet.isoDateFormat(GitChangeSet.java:179) at hudson.plugins.git.GitChangeSet.parseCommit(GitChangeSet.java:118) at hudson.plugins.git.GitChangeSet.<init>(GitChangeSet.java:89) at hudson.plugins.git.GitChangeLogParser.parseCommit(GitChangeLogParser.java:73) at hudson.plugins.git.GitChangeLogParser.parse(GitChangeLogParser.java:57) at hudson.plugins.git.GitChangeLogParser.parse(GitChangeLogParser.java:44) at hudson.plugins.git.GitChangeLogParser.parse(GitChangeLogParser.java:25) at hudson.scm.ChangeLogParser.parse(ChangeLogParser.java:57) at hudson.model.AbstractBuild.calcChangeSet(AbstractBuild.java:894) at hudson.model.AbstractBuild.getChangeSet(AbstractBuild.java:862) at hudson.model.AbstractBuild.getCulprits(AbstractBuild.java:349) at hudson.model.AbstractBuild.getCulprits(AbstractBuild.java:346) at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:687) at hudson.model.Run.execute(Run.java:1743) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:89) at hudson.model.Executor.run(Executor.java:240) Sometimes the process fails immediately after it checks out the revision. Other times, it will finish completely but then display this output at the end and 'fail' even though it completed.

    Jenkins JIRA | 2 years ago | Taylor K
    java.lang.StringIndexOutOfBoundsException: String index out of range: -1
  6. 0

    [JENKINS-28260] Java String Index Out of Range - Jenkins JIRA

    jenkins-ci.org | 7 months ago
    java.lang.StringIndexOutOfBoundsException: String index out of range: -1

  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: -1

    at java.lang.String.substring()
  2. Java RT
    String.substring
    1. java.lang.String.substring(String.java:1911)
    1 frame
  3. Hudson GIT plugin
    GitChangeLogParser.parse
    1. hudson.plugins.git.GitChangeSet.isoDateFormat(GitChangeSet.java:179)
    2. hudson.plugins.git.GitChangeSet.parseCommit(GitChangeSet.java:118)
    3. hudson.plugins.git.GitChangeSet.<init>(GitChangeSet.java:89)
    4. hudson.plugins.git.GitChangeLogParser.parseCommit(GitChangeLogParser.java:73)
    5. hudson.plugins.git.GitChangeLogParser.parse(GitChangeLogParser.java:57)
    6. hudson.plugins.git.GitChangeLogParser.parse(GitChangeLogParser.java:44)
    7. hudson.plugins.git.GitChangeLogParser.parse(GitChangeLogParser.java:25)
    7 frames
  4. Hudson
    Executor.run
    1. hudson.scm.ChangeLogParser.parse(ChangeLogParser.java:57)
    2. hudson.model.AbstractBuild.calcChangeSet(AbstractBuild.java:924)
    3. hudson.model.AbstractBuild.getChangeSet(AbstractBuild.java:892)
    4. hudson.model.AbstractBuild.getCulprits(AbstractBuild.java:352)
    5. hudson.model.AbstractBuild.getCulprits(AbstractBuild.java:349)
    6. hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:675)
    7. hudson.model.Run.execute(Run.java:1766)
    8. hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
    9. hudson.model.ResourceController.execute(ResourceController.java:98)
    10. hudson.model.Executor.run(Executor.java:408)
    10 frames