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

Atlassian JIRA | Pierre-Etienne Poirot [Atlassian] | 3 years ago
  1. 0

    The following exception is thrown when calling {{JiraIssueService.getIssuesForChangesets()}} with more changeset ids than the upper bound (specified by the field {{maxAttributeChangesets}}), whose value is 100 by default: {noformat} java.lang.StringIndexOutOfBoundsException: String index out of range: -1 at java.lang.String.substring(String.java:1911) ~[na:1.7.0_45] at com.atlassian.stash.integration.jira.impl.SimpleJiraIssue.<init>(SimpleJiraIssue.java:23) ~[na:na] at com.atlassian.stash.integration.jira.impl.JiraIssueServiceImpl.addSimpleIssues(JiraIssueServiceImpl.java:265) ~[na:na] at com.atlassian.stash.integration.jira.impl.JiraIssueServiceImpl.getIssuesIfLinked(JiraIssueServiceImpl.java:241) ~[na:na] at com.atlassian.stash.integration.jira.impl.JiraIssueServiceImpl.getIssuesForChangesets(JiraIssueServiceImpl.java:136) ~[na:na] at com.sun.proxy.$Proxy1518.getIssuesForChangesets(Unknown Source) ~[na:na] at com.atlassian.stash.internal.summary.job.ActivitySummaryGenerator.findJiraKeys(ActivitySummaryGenerator.java:117) ~[na:na] at com.atlassian.stash.internal.summary.job.ActivitySummaryGenerator.access$200(ActivitySummaryGenerator.java:33) ~[na:na] at com.atlassian.stash.internal.summary.job.ActivitySummaryGenerator$1.perform(ActivitySummaryGenerator.java:71) ~[na:na] at com.atlassian.stash.internal.summary.job.ActivitySummaryGenerator$1.perform(ActivitySummaryGenerator.java:62) ~[na:na] at com.atlassian.stash.internal.user.DefaultEscalatedSecurityContext.call(DefaultEscalatedSecurityContext.java:60) ~[stash-service-impl-3.0.0-SNAPSHOT.jar:na] at com.atlassian.stash.internal.summary.job.ActivitySummaryGenerator.generateContext(ActivitySummaryGenerator.java:61) ~[na:na] at com.atlassian.stash.internal.summary.job.ActivityNotificationSender.generateActivitySummaryFor(ActivityNotificationSender.java:62) ~[na:na] at com.atlassian.stash.internal.summary.job.ActivityNotificationSender.access$000(ActivityNotificationSender.java:22) ~[na:na] at com.atlassian.stash.internal.summary.job.ActivityNotificationSender$1.apply(ActivityNotificationSender.java:55) ~[na:na] at com.atlassian.stash.internal.summary.job.ActivityNotificationSender$1.apply(ActivityNotificationSender.java:53) ~[na:na] at com.atlassian.stash.internal.summary.MapUtils.generateMap(MapUtils.java:14) ~[na:na] at com.atlassian.stash.internal.summary.job.ActivityNotificationSender.send(ActivityNotificationSender.java:53) ~[na:na] at com.atlassian.stash.internal.summary.service.DefaultActivityNotificationService$NotificationJob.execute(DefaultActivityNotificationService.java:102) ~[na:na] at com.atlassian.stash.internal.sal.scheduling.PluginSchedulerAdapter$JobDescriptor.runJob(PluginSchedulerAdapter.java:130) ~[stash-platform-3.0.0-SNAPSHOT.jar:na] at com.atlassian.stash.internal.sal.scheduling.PluginSchedulerAdapter.runJob(PluginSchedulerAdapter.java:86) ~[stash-platform-3.0.0-SNAPSHOT.jar:na] at com.atlassian.scheduler.core.JobLauncher.runJob(JobLauncher.java:121) [atlassian-scheduler-core-1.1.0-STASHDEV-6226-2.jar:na] at com.atlassian.scheduler.core.JobLauncher.launchAndBuildResponse(JobLauncher.java:101) [atlassian-scheduler-core-1.1.0-STASHDEV-6226-2.jar:na] at com.atlassian.scheduler.core.JobLauncher.launch(JobLauncher.java:80) [atlassian-scheduler-core-1.1.0-STASHDEV-6226-2.jar:na] at com.atlassian.scheduler.quartz1.Quartz1Job.execute(Quartz1Job.java:33) [atlassian-scheduler-quartz1-1.1.0-STASHDEV-6226-2.jar:na] at org.quartz.core.JobRunShell.run(JobRunShell.java:223) [quartz-1.8.6.jar:na] at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:549) [quartz-1.8.6.jar:na] ... 20 frames trimmed {noformat}

    Atlassian JIRA | 3 years ago | Pierre-Etienne Poirot [Atlassian]
    java.lang.StringIndexOutOfBoundsException: String index out of range: -1
  2. 0

    The following exception is thrown when calling {{JiraIssueService.getIssuesForChangesets()}} with more changeset ids than the upper bound (specified by the field {{maxAttributeChangesets}}), whose value is 100 by default: {noformat} java.lang.StringIndexOutOfBoundsException: String index out of range: -1 at java.lang.String.substring(String.java:1911) ~[na:1.7.0_45] at com.atlassian.stash.integration.jira.impl.SimpleJiraIssue.<init>(SimpleJiraIssue.java:23) ~[na:na] at com.atlassian.stash.integration.jira.impl.JiraIssueServiceImpl.addSimpleIssues(JiraIssueServiceImpl.java:265) ~[na:na] at com.atlassian.stash.integration.jira.impl.JiraIssueServiceImpl.getIssuesIfLinked(JiraIssueServiceImpl.java:241) ~[na:na] at com.atlassian.stash.integration.jira.impl.JiraIssueServiceImpl.getIssuesForChangesets(JiraIssueServiceImpl.java:136) ~[na:na] at com.sun.proxy.$Proxy1518.getIssuesForChangesets(Unknown Source) ~[na:na] at com.atlassian.stash.internal.summary.job.ActivitySummaryGenerator.findJiraKeys(ActivitySummaryGenerator.java:117) ~[na:na] at com.atlassian.stash.internal.summary.job.ActivitySummaryGenerator.access$200(ActivitySummaryGenerator.java:33) ~[na:na] at com.atlassian.stash.internal.summary.job.ActivitySummaryGenerator$1.perform(ActivitySummaryGenerator.java:71) ~[na:na] at com.atlassian.stash.internal.summary.job.ActivitySummaryGenerator$1.perform(ActivitySummaryGenerator.java:62) ~[na:na] at com.atlassian.stash.internal.user.DefaultEscalatedSecurityContext.call(DefaultEscalatedSecurityContext.java:60) ~[stash-service-impl-3.0.0-SNAPSHOT.jar:na] at com.atlassian.stash.internal.summary.job.ActivitySummaryGenerator.generateContext(ActivitySummaryGenerator.java:61) ~[na:na] at com.atlassian.stash.internal.summary.job.ActivityNotificationSender.generateActivitySummaryFor(ActivityNotificationSender.java:62) ~[na:na] at com.atlassian.stash.internal.summary.job.ActivityNotificationSender.access$000(ActivityNotificationSender.java:22) ~[na:na] at com.atlassian.stash.internal.summary.job.ActivityNotificationSender$1.apply(ActivityNotificationSender.java:55) ~[na:na] at com.atlassian.stash.internal.summary.job.ActivityNotificationSender$1.apply(ActivityNotificationSender.java:53) ~[na:na] at com.atlassian.stash.internal.summary.MapUtils.generateMap(MapUtils.java:14) ~[na:na] at com.atlassian.stash.internal.summary.job.ActivityNotificationSender.send(ActivityNotificationSender.java:53) ~[na:na] at com.atlassian.stash.internal.summary.service.DefaultActivityNotificationService$NotificationJob.execute(DefaultActivityNotificationService.java:102) ~[na:na] at com.atlassian.stash.internal.sal.scheduling.PluginSchedulerAdapter$JobDescriptor.runJob(PluginSchedulerAdapter.java:130) ~[stash-platform-3.0.0-SNAPSHOT.jar:na] at com.atlassian.stash.internal.sal.scheduling.PluginSchedulerAdapter.runJob(PluginSchedulerAdapter.java:86) ~[stash-platform-3.0.0-SNAPSHOT.jar:na] at com.atlassian.scheduler.core.JobLauncher.runJob(JobLauncher.java:121) [atlassian-scheduler-core-1.1.0-STASHDEV-6226-2.jar:na] at com.atlassian.scheduler.core.JobLauncher.launchAndBuildResponse(JobLauncher.java:101) [atlassian-scheduler-core-1.1.0-STASHDEV-6226-2.jar:na] at com.atlassian.scheduler.core.JobLauncher.launch(JobLauncher.java:80) [atlassian-scheduler-core-1.1.0-STASHDEV-6226-2.jar:na] at com.atlassian.scheduler.quartz1.Quartz1Job.execute(Quartz1Job.java:33) [atlassian-scheduler-quartz1-1.1.0-STASHDEV-6226-2.jar:na] at org.quartz.core.JobRunShell.run(JobRunShell.java:223) [quartz-1.8.6.jar:na] at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:549) [quartz-1.8.6.jar:na] ... 20 frames trimmed {noformat}

    Atlassian JIRA | 3 years ago | Pierre-Etienne Poirot [Atlassian]
    java.lang.StringIndexOutOfBoundsException: String index out of range: -1
  3. 0

    How to fix the ERROR [[jsp]] Servlet.service() for servlet jsp threw exception?

    Stack Overflow | 2 years ago | balaguru
    java.lang.StringIndexOutOfBoundsException: String index out of range: -1
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Error On Startup

    GitHub | 4 years ago | N1T3SLAY3R
    org.bukkit.event.EventException
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)[na:1.7.0_45]
    1 frame
  3. com.atlassian.stash
    JiraIssueServiceImpl.getIssuesForChangesets
    1. com.atlassian.stash.integration.jira.impl.SimpleJiraIssue.<init>(SimpleJiraIssue.java:23)[na:na]
    2. com.atlassian.stash.integration.jira.impl.JiraIssueServiceImpl.addSimpleIssues(JiraIssueServiceImpl.java:265)[na:na]
    3. com.atlassian.stash.integration.jira.impl.JiraIssueServiceImpl.getIssuesIfLinked(JiraIssueServiceImpl.java:241)[na:na]
    4. com.atlassian.stash.integration.jira.impl.JiraIssueServiceImpl.getIssuesForChangesets(JiraIssueServiceImpl.java:136)[na:na]
    4 frames
  4. com.sun.proxy
    $Proxy1518.getIssuesForChangesets
    1. com.sun.proxy.$Proxy1518.getIssuesForChangesets(Unknown Source)[na:na]
    1 frame
  5. com.atlassian.stash
    PluginSchedulerAdapter.runJob
    1. com.atlassian.stash.internal.summary.job.ActivitySummaryGenerator.findJiraKeys(ActivitySummaryGenerator.java:117)[na:na]
    2. com.atlassian.stash.internal.summary.job.ActivitySummaryGenerator.access$200(ActivitySummaryGenerator.java:33)[na:na]
    3. com.atlassian.stash.internal.summary.job.ActivitySummaryGenerator$1.perform(ActivitySummaryGenerator.java:71)[na:na]
    4. com.atlassian.stash.internal.summary.job.ActivitySummaryGenerator$1.perform(ActivitySummaryGenerator.java:62)[na:na]
    5. com.atlassian.stash.internal.user.DefaultEscalatedSecurityContext.call(DefaultEscalatedSecurityContext.java:60)[stash-service-impl-3.0.0-SNAPSHOT.jar:na]
    6. com.atlassian.stash.internal.summary.job.ActivitySummaryGenerator.generateContext(ActivitySummaryGenerator.java:61)[na:na]
    7. com.atlassian.stash.internal.summary.job.ActivityNotificationSender.generateActivitySummaryFor(ActivityNotificationSender.java:62)[na:na]
    8. com.atlassian.stash.internal.summary.job.ActivityNotificationSender.access$000(ActivityNotificationSender.java:22)[na:na]
    9. com.atlassian.stash.internal.summary.job.ActivityNotificationSender$1.apply(ActivityNotificationSender.java:55)[na:na]
    10. com.atlassian.stash.internal.summary.job.ActivityNotificationSender$1.apply(ActivityNotificationSender.java:53)[na:na]
    11. com.atlassian.stash.internal.summary.MapUtils.generateMap(MapUtils.java:14)[na:na]
    12. com.atlassian.stash.internal.summary.job.ActivityNotificationSender.send(ActivityNotificationSender.java:53)[na:na]
    13. com.atlassian.stash.internal.summary.service.DefaultActivityNotificationService$NotificationJob.execute(DefaultActivityNotificationService.java:102)[na:na]
    14. com.atlassian.stash.internal.sal.scheduling.PluginSchedulerAdapter$JobDescriptor.runJob(PluginSchedulerAdapter.java:130)[stash-platform-3.0.0-SNAPSHOT.jar:na]
    15. com.atlassian.stash.internal.sal.scheduling.PluginSchedulerAdapter.runJob(PluginSchedulerAdapter.java:86)[stash-platform-3.0.0-SNAPSHOT.jar:na]
    15 frames
  6. com.atlassian.scheduler
    Quartz1Job.execute
    1. com.atlassian.scheduler.core.JobLauncher.runJob(JobLauncher.java:121)[atlassian-scheduler-core-1.1.0-STASHDEV-6226-2.jar:na]
    2. com.atlassian.scheduler.core.JobLauncher.launchAndBuildResponse(JobLauncher.java:101)[atlassian-scheduler-core-1.1.0-STASHDEV-6226-2.jar:na]
    3. com.atlassian.scheduler.core.JobLauncher.launch(JobLauncher.java:80)[atlassian-scheduler-core-1.1.0-STASHDEV-6226-2.jar:na]
    4. com.atlassian.scheduler.quartz1.Quartz1Job.execute(Quartz1Job.java:33)[atlassian-scheduler-quartz1-1.1.0-STASHDEV-6226-2.jar:na]
    4 frames
  7. quartz
    SimpleThreadPool$WorkerThread.run
    1. org.quartz.core.JobRunShell.run(JobRunShell.java:223)[quartz-1.8.6.jar:na]
    2. org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:549)[quartz-1.8.6.jar:na]
    2 frames