java.lang.NullPointerException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • 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
    via by tomas bohunek,
  • 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
    via by tomas bohunek,
  • Build completes satisfactorily, but NPE while triggering dependent builds. I upgraded to 1.623 to see if that resolved the fault, but the results are identical. The log shows only 4 of 10 builds triggered, but it may not have been flushed at the point of the fault. All builds are freestyle using multiple shell steps, with no Java or Groovy components or steps. This problem is 100% repeatable with certain builds. Tail of an example failing build: 17:44:08 Archiving artifacts 17:44:11 Warning: you have no plugins providing access control for builds, so falling back to legacy behavior of permitting any downstream builds to be triggered 17:44:11 Triggering a new build of trap 17:44:11 Triggering a new build of snort-e 17:44:11 Triggering a new build of tcparchive_982 17:44:11 Triggering a new build of deepinspect 17:44:11 FATAL: null 17:44:11 java.lang.NullPointerException 17:44:11 at jenkins.triggers.ReverseBuildTrigger.shouldTrigger(ReverseBuildTrigger.java:111) 17:44:11 at jenkins.triggers.ReverseBuildTrigger.access$000(ReverseBuildTrigger.java:84) 17:44:11 at jenkins.triggers.ReverseBuildTrigger$1.shouldTriggerBuild(ReverseBuildTrigger.java:141) 17:44:11 at hudson.tasks.BuildTrigger.execute(BuildTrigger.java:245) 17:44:11 at hudson.model.AbstractBuild$AbstractBuildExecution.cleanUp(AbstractBuild.java:687) 17:44:11 at hudson.model.Build$BuildExecution.cleanUp(Build.java:200) 17:44:11 at hudson.model.Run.execute(Run.java:1788) 17:44:11 at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) 17:44:11 at hudson.model.ResourceController.execute(ResourceController.java:98) 17:44:11 at hudson.model.Executor.run(Executor.java:381) 17:44:11 Finished: SUCCESS
    via by John Mellor,
  • Build completes satisfactorily, but NPE while triggering dependent builds. I upgraded to 1.623 to see if that resolved the fault, but the results are identical. The log shows only 4 of 10 builds triggered, but it may not have been flushed at the point of the fault. All builds are freestyle using multiple shell steps, with no Java or Groovy components or steps. This problem is 100% repeatable with certain builds. Tail of an example failing build: 17:44:08 Archiving artifacts 17:44:11 Warning: you have no plugins providing access control for builds, so falling back to legacy behavior of permitting any downstream builds to be triggered 17:44:11 Triggering a new build of trap 17:44:11 Triggering a new build of snort-e 17:44:11 Triggering a new build of tcparchive_982 17:44:11 Triggering a new build of deepinspect 17:44:11 FATAL: null 17:44:11 java.lang.NullPointerException 17:44:11 at jenkins.triggers.ReverseBuildTrigger.shouldTrigger(ReverseBuildTrigger.java:111) 17:44:11 at jenkins.triggers.ReverseBuildTrigger.access$000(ReverseBuildTrigger.java:84) 17:44:11 at jenkins.triggers.ReverseBuildTrigger$1.shouldTriggerBuild(ReverseBuildTrigger.java:141) 17:44:11 at hudson.tasks.BuildTrigger.execute(BuildTrigger.java:245) 17:44:11 at hudson.model.AbstractBuild$AbstractBuildExecution.cleanUp(AbstractBuild.java:687) 17:44:11 at hudson.model.Build$BuildExecution.cleanUp(Build.java:200) 17:44:11 at hudson.model.Run.execute(Run.java:1788) 17:44:11 at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) 17:44:11 at hudson.model.ResourceController.execute(ResourceController.java:98) 17:44:11 at hudson.model.Executor.run(Executor.java:381) 17:44:11 Finished: SUCCESS
    via by John Mellor,
    • 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)
    No Bugmate found.