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

Sonatype JIRA | Rich Seddon | 2 years ago
  1. 0

    Running the snapshot remover against a maven 2 snapshot repository that has a virtual maven 1 repository associated with it fails: {quote} 2015-01-16 12:30:32,411-0600 WARN [pxpool-1-thread-1] admin org.sonatype.nexus.proxy.maven.maven1.M1LayoutedM2ShadowRepository - Could not sync shadow M1LayoutedM2ShadowRepository(id=m1shadow) for event RepositoryItemEventDeleteRoot(sender="Snapshots" [id=snapshots], snapshots:/com/foo/project/1.0.3-SNAPSHOT/project-1.0.3-20150116.182835-2.pom.sha1) java.lang.StringIndexOutOfBoundsException: String index out of range: -1 at java.lang.String.substring(String.java:1954) ~[na:1.8.0_25] at org.sonatype.nexus.proxy.maven.LayoutConverterShadowRepository.deleteLink(LayoutConverterShadowRepository.java:495) ~[nexus-core-2.11.1-01.jar:2.11.1-01] at org.sonatype.nexus.proxy.repository.AbstractShadowRepository.onRepositoryItemEvent(AbstractShadowRepository.java:116) ~[nexus-core-2.11.1-01.jar:2.11.1-01] at sun.reflect.GeneratedMethodAccessor36.invoke(Unknown Source) ~[na:na] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_25] at java.lang.reflect.Method.invoke(Method.java:483) ~[na:1.8.0_25] at org.sonatype.sisu.goodies.eventbus.internal.guava.EventHandler.handleEvent(EventHandler.java:80) [goodies-eventbus-1.9.jar:1.9] at org.sonatype.sisu.goodies.eventbus.internal.guava.EventBus.dispatch(EventBus.java:329) [goodies-eventbus-1.9.jar:1.9] at org.sonatype.sisu.goodies.eventbus.internal.DefaultGuavaEventBus.dispatch(DefaultGuavaEventBus.java:34) [goodies-eventbus-1.9.jar:1.9] at org.sonatype.sisu.goodies.eventbus.internal.ReentrantGuavaEventBus.dispatchQueuedEvents(ReentrantGuavaEventBus.java:57) [goodies-eventbus-1.9.jar:1.9] at org.sonatype.sisu.goodies.eventbus.internal.guava.EventBus.post(EventBus.java:281) [goodies-eventbus-1.9.jar:1.9] at org.sonatype.sisu.goodies.eventbus.internal.DefaultEventBus.post(DefaultEventBus.java:78) [goodies-eventbus-1.9.jar:1.9] at org.sonatype.nexus.proxy.repository.AbstractRepository.deleteItem(AbstractRepository.java:916) [nexus-core-2.11.1-01.jar:2.11.1-01] at org.sonatype.nexus.maven.tasks.DefaultSnapshotRemover$SnapshotRemoverWalkerProcessor.doOnCollectionExit(DefaultSnapshotRemover.java:535) [nexus-core-2.11.1-01.jar:2.11.1-01] at org.sonatype.nexus.maven.tasks.DefaultSnapshotRemover$SnapshotRemoverWalkerProcessor.onCollectionExit(DefaultSnapshotRemover.java:388) [nexus-core-2.11.1-01.jar:2.11.1-01] at org.sonatype.nexus.proxy.walker.DefaultWalker.onCollectionExit(DefaultWalker.java:325) [nexus-core-2.11.1-01.jar:2.11.1-01] at org.sonatype.nexus.proxy.walker.DefaultWalker.walkRecursive(DefaultWalker.java:226) [nexus-core-2.11.1-01.jar:2.11.1-01] at org.sonatype.nexus.proxy.walker.DefaultWalker.walkRecursive(DefaultWalker.java:231) [nexus-core-2.11.1-01.jar:2.11.1-01] at org.sonatype.nexus.proxy.walker.DefaultWalker.walkRecursive(DefaultWalker.java:231) [nexus-core-2.11.1-01.jar:2.11.1-01] at org.sonatype.nexus.proxy.walker.DefaultWalker.walkRecursive(DefaultWalker.java:231) [nexus-core-2.11.1-01.jar:2.11.1-01] at org.sonatype.nexus.proxy.walker.DefaultWalker.walkRecursive(DefaultWalker.java:231) [nexus-core-2.11.1-01.jar:2.11.1-01] at org.sonatype.nexus.proxy.walker.DefaultWalker.walk(DefaultWalker.java:89) [nexus-core-2.11.1-01.jar:2.11.1-01] at org.sonatype.nexus.maven.tasks.DefaultSnapshotRemover.removeSnapshotsFromMavenRepository(DefaultSnapshotRemover.java:215) [nexus-core-2.11.1-01.jar:2.11.1-01] at org.sonatype.nexus.maven.tasks.DefaultSnapshotRemover.process(DefaultSnapshotRemover.java:158) [nexus-core-2.11.1-01.jar:2.11.1-01] at org.sonatype.nexus.maven.tasks.DefaultSnapshotRemover.removeSnapshots(DefaultSnapshotRemover.java:117) [nexus-core-2.11.1-01.jar:2.11.1-01] at org.sonatype.nexus.maven.tasks.SnapshotRemoverTask.doRun(SnapshotRemoverTask.java:98) [nexus-core-2.11.1-01.jar:2.11.1-01] at org.sonatype.nexus.maven.tasks.SnapshotRemoverTask.doRun(SnapshotRemoverTask.java:28) [nexus-core-2.11.1-01.jar:2.11.1-01] at org.sonatype.nexus.scheduling.AbstractNexusTask.call(AbstractNexusTask.java:151) [nexus-core-2.11.1-01.jar:2.11.1-01] at org.sonatype.scheduling.DefaultScheduledTask.call(DefaultScheduledTask.java:418) [nexus-scheduler-2.11.1-01.jar:2.11.1-01] at org.sonatype.nexus.threads.MDCAwareCallable.call(MDCAwareCallable.java:44) [nexus-core-2.11.1-01.jar:2.11.1-01] at org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90) [shiro-core-1.2.3.jar:1.2.3] at org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83) [shiro-core-1.2.3.jar:1.2.3] at java.util.concurrent.FutureTask.run(FutureTask.java:266) [na:1.8.0_25] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) [na:1.8.0_25] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) [na:1.8.0_25] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_25] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_25] at java.lang.Thread.run(Thread.java:745) [na:1.8.0_25] {quote}

    Sonatype JIRA | 2 years ago | Rich Seddon
    java.lang.StringIndexOutOfBoundsException: String index out of range: -1
  2. 0

    StringIndexOutOfBoundsException in FrameParser

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

    Automated exception search integrated into your IDE

  4. 0

    Package mapping issue

    GitHub | 2 years ago | rahimalizada
    java.lang.StringIndexOutOfBoundsException: String index out of range: -1
  5. 0

    mapPackageFromClass fails for external jar (Maven dependency)

    GitHub | 2 years ago | zmirc
    java.lang.StringIndexOutOfBoundsException: String index out of range: -1
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:1954)[na:1.8.0_25]
    1 frame
  3. ${project.groupId}:${project.artifactId}
    AbstractShadowRepository.onRepositoryItemEvent
    1. org.sonatype.nexus.proxy.maven.LayoutConverterShadowRepository.deleteLink(LayoutConverterShadowRepository.java:495)[nexus-core-2.11.1-01.jar:2.11.1-01]
    2. org.sonatype.nexus.proxy.repository.AbstractShadowRepository.onRepositoryItemEvent(AbstractShadowRepository.java:116)[nexus-core-2.11.1-01.jar:2.11.1-01]
    2 frames
  4. Java RT
    Method.invoke
    1. sun.reflect.GeneratedMethodAccessor36.invoke(Unknown Source)[na:na]
    2. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[na:1.8.0_25]
    3. java.lang.reflect.Method.invoke(Method.java:483)[na:1.8.0_25]
    3 frames
  5. org.sonatype.sisu
    EventBus.dispatch
    1. org.sonatype.sisu.goodies.eventbus.internal.guava.EventHandler.handleEvent(EventHandler.java:80)[goodies-eventbus-1.9.jar:1.9]
    2. org.sonatype.sisu.goodies.eventbus.internal.guava.EventBus.dispatch(EventBus.java:329)[goodies-eventbus-1.9.jar:1.9]
    2 frames
  6. ${project.groupId}:${project.artifactId}
    ReentrantGuavaEventBus.dispatchQueuedEvents
    1. org.sonatype.sisu.goodies.eventbus.internal.DefaultGuavaEventBus.dispatch(DefaultGuavaEventBus.java:34)[goodies-eventbus-1.9.jar:1.9]
    2. org.sonatype.sisu.goodies.eventbus.internal.ReentrantGuavaEventBus.dispatchQueuedEvents(ReentrantGuavaEventBus.java:57)[goodies-eventbus-1.9.jar:1.9]
    2 frames
  7. org.sonatype.sisu
    EventBus.post
    1. org.sonatype.sisu.goodies.eventbus.internal.guava.EventBus.post(EventBus.java:281)[goodies-eventbus-1.9.jar:1.9]
    1 frame
  8. ${project.groupId}:${project.artifactId}
    DefaultEventBus.post
    1. org.sonatype.sisu.goodies.eventbus.internal.DefaultEventBus.post(DefaultEventBus.java:78)[goodies-eventbus-1.9.jar:1.9]
    1 frame
  9. ${project.groupId}:${project.artifactId}
    AbstractNexusTask.call
    1. org.sonatype.nexus.proxy.repository.AbstractRepository.deleteItem(AbstractRepository.java:916)[nexus-core-2.11.1-01.jar:2.11.1-01]
    2. org.sonatype.nexus.maven.tasks.DefaultSnapshotRemover$SnapshotRemoverWalkerProcessor.doOnCollectionExit(DefaultSnapshotRemover.java:535)[nexus-core-2.11.1-01.jar:2.11.1-01]
    3. org.sonatype.nexus.maven.tasks.DefaultSnapshotRemover$SnapshotRemoverWalkerProcessor.onCollectionExit(DefaultSnapshotRemover.java:388)[nexus-core-2.11.1-01.jar:2.11.1-01]
    4. org.sonatype.nexus.proxy.walker.DefaultWalker.onCollectionExit(DefaultWalker.java:325)[nexus-core-2.11.1-01.jar:2.11.1-01]
    5. org.sonatype.nexus.proxy.walker.DefaultWalker.walkRecursive(DefaultWalker.java:226)[nexus-core-2.11.1-01.jar:2.11.1-01]
    6. org.sonatype.nexus.proxy.walker.DefaultWalker.walkRecursive(DefaultWalker.java:231)[nexus-core-2.11.1-01.jar:2.11.1-01]
    7. org.sonatype.nexus.proxy.walker.DefaultWalker.walkRecursive(DefaultWalker.java:231)[nexus-core-2.11.1-01.jar:2.11.1-01]
    8. org.sonatype.nexus.proxy.walker.DefaultWalker.walkRecursive(DefaultWalker.java:231)[nexus-core-2.11.1-01.jar:2.11.1-01]
    9. org.sonatype.nexus.proxy.walker.DefaultWalker.walkRecursive(DefaultWalker.java:231)[nexus-core-2.11.1-01.jar:2.11.1-01]
    10. org.sonatype.nexus.proxy.walker.DefaultWalker.walk(DefaultWalker.java:89)[nexus-core-2.11.1-01.jar:2.11.1-01]
    11. org.sonatype.nexus.maven.tasks.DefaultSnapshotRemover.removeSnapshotsFromMavenRepository(DefaultSnapshotRemover.java:215)[nexus-core-2.11.1-01.jar:2.11.1-01]
    12. org.sonatype.nexus.maven.tasks.DefaultSnapshotRemover.process(DefaultSnapshotRemover.java:158)[nexus-core-2.11.1-01.jar:2.11.1-01]
    13. org.sonatype.nexus.maven.tasks.DefaultSnapshotRemover.removeSnapshots(DefaultSnapshotRemover.java:117)[nexus-core-2.11.1-01.jar:2.11.1-01]
    14. org.sonatype.nexus.maven.tasks.SnapshotRemoverTask.doRun(SnapshotRemoverTask.java:98)[nexus-core-2.11.1-01.jar:2.11.1-01]
    15. org.sonatype.nexus.maven.tasks.SnapshotRemoverTask.doRun(SnapshotRemoverTask.java:28)[nexus-core-2.11.1-01.jar:2.11.1-01]
    16. org.sonatype.nexus.scheduling.AbstractNexusTask.call(AbstractNexusTask.java:151)[nexus-core-2.11.1-01.jar:2.11.1-01]
    16 frames
  10. ${project.groupId}:${project.artifactId}
    DefaultScheduledTask.call
    1. org.sonatype.scheduling.DefaultScheduledTask.call(DefaultScheduledTask.java:418)[nexus-scheduler-2.11.1-01.jar:2.11.1-01]
    1 frame
  11. ${project.groupId}:${project.artifactId}
    MDCAwareCallable.call
    1. org.sonatype.nexus.threads.MDCAwareCallable.call(MDCAwareCallable.java:44)[nexus-core-2.11.1-01.jar:2.11.1-01]
    1 frame
  12. Shiro
    SubjectCallable.call
    1. org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90)[shiro-core-1.2.3.jar:1.2.3]
    2. org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83)[shiro-core-1.2.3.jar:1.2.3]
    2 frames
  13. Java RT
    Thread.run
    1. java.util.concurrent.FutureTask.run(FutureTask.java:266)[na:1.8.0_25]
    2. java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)[na:1.8.0_25]
    3. java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)[na:1.8.0_25]
    4. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[na:1.8.0_25]
    5. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[na:1.8.0_25]
    6. java.lang.Thread.run(Thread.java:745)[na:1.8.0_25]
    6 frames