org.eclipse.swt.SWTException: Failed to execute runnable (java.lang.StringIndexOutOfBoundsException: String index out of range: -1)

SpringSource Issue Tracker | Martin Lippert | 2 years ago
  1. 0

    [STS-4148] petclinic throws exception - SpringSource Issue Tracker

    springsource.com | 1 year ago
    org.eclipse.swt.SWTException: Failed to execute runnable (java.lang.StringIndexOutOfBoundsException: String index out of range: -1)
  2. 0

    I imported petclinic (via the wizard to import the getting started guide content) and I see this exception being thrown under the hood (showing up in the Error Log View): {noformat} org.eclipse.swt.SWTException: Failed to execute runnable (java.lang.StringIndexOutOfBoundsException: String index out of range: -1) at org.eclipse.swt.SWT.error(SWT.java:4491) at org.eclipse.swt.SWT.error(SWT.java:4406) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:138) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4024) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3700) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1127) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:337) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1018) at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:156) at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:654) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:337) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:598) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:139) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:380) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:235) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:669) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:608) at org.eclipse.equinox.launcher.Main.run(Main.java:1515) Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range: -1 at java.lang.String.substring(String.java:1915) at org.springframework.util.AntPathMatcher$AntPatternComparator$PatternInfo.initCounters(AntPathMatcher.java:711) at org.springframework.util.AntPathMatcher$AntPatternComparator$PatternInfo.<init>(AntPathMatcher.java:690) at org.springframework.util.AntPathMatcher$AntPatternComparator.compare(AntPathMatcher.java:609) at org.springframework.util.AntPathMatcher$AntPatternComparator.compare(AntPathMatcher.java:593) at org.springframework.ide.eclipse.metadata.ui.RequestMappingViewSorter.sortByUrl(RequestMappingViewSorter.java:101) at org.springframework.ide.eclipse.metadata.ui.RequestMappingViewSorter.compareColumn(RequestMappingViewSorter.java:58) at org.springframework.ide.eclipse.metadata.ui.RequestMappingViewSorter.compare(RequestMappingViewSorter.java:41) at org.eclipse.jface.viewers.ViewerComparator$1.compare(ViewerComparator.java:192) at java.util.TimSort.countRunAndMakeAscending(TimSort.java:351) at java.util.TimSort.sort(TimSort.java:216) at java.util.Arrays.sort(Arrays.java:1438) at org.eclipse.jface.viewers.ViewerComparator.sort(ViewerComparator.java:189) at org.eclipse.jface.viewers.StructuredViewer.getSortedChildren(StructuredViewer.java:1087) at org.eclipse.jface.viewers.AbstractTableViewer.internalRefreshAll(AbstractTableViewer.java:667) at org.eclipse.jface.viewers.AbstractTableViewer.internalRefresh(AbstractTableViewer.java:615) at org.eclipse.jface.viewers.AbstractTableViewer.internalRefresh(AbstractTableViewer.java:607) at org.eclipse.jface.viewers.AbstractTableViewer$1.run(AbstractTableViewer.java:567) at org.eclipse.jface.viewers.StructuredViewer.preservingSelection(StructuredViewer.java:1462) at org.eclipse.jface.viewers.StructuredViewer.preservingSelection(StructuredViewer.java:1423) at org.eclipse.jface.viewers.AbstractTableViewer.inputChanged(AbstractTableViewer.java:564) at org.eclipse.jface.viewers.ContentViewer.setInput(ContentViewer.java:292) at org.eclipse.jface.viewers.StructuredViewer.setInput(StructuredViewer.java:1701) at org.springframework.ide.eclipse.metadata.ui.RequestMappingView$7.run(RequestMappingView.java:617) at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:135) ... 23 more {noformat}

    SpringSource Issue Tracker | 2 years ago | Martin Lippert (c)
    org.eclipse.swt.SWTException: Failed to execute runnable (java.lang.StringIndexOutOfBoundsException: String index out of range: -1)
  3. 0

    I imported petclinic (via the wizard to import the getting started guide content) and I see this exception being thrown under the hood (showing up in the Error Log View): {noformat} org.eclipse.swt.SWTException: Failed to execute runnable (java.lang.StringIndexOutOfBoundsException: String index out of range: -1) at org.eclipse.swt.SWT.error(SWT.java:4491) at org.eclipse.swt.SWT.error(SWT.java:4406) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:138) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4024) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3700) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1127) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:337) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1018) at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:156) at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:654) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:337) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:598) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:139) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:380) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:235) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:669) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:608) at org.eclipse.equinox.launcher.Main.run(Main.java:1515) Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range: -1 at java.lang.String.substring(String.java:1915) at org.springframework.util.AntPathMatcher$AntPatternComparator$PatternInfo.initCounters(AntPathMatcher.java:711) at org.springframework.util.AntPathMatcher$AntPatternComparator$PatternInfo.<init>(AntPathMatcher.java:690) at org.springframework.util.AntPathMatcher$AntPatternComparator.compare(AntPathMatcher.java:609) at org.springframework.util.AntPathMatcher$AntPatternComparator.compare(AntPathMatcher.java:593) at org.springframework.ide.eclipse.metadata.ui.RequestMappingViewSorter.sortByUrl(RequestMappingViewSorter.java:101) at org.springframework.ide.eclipse.metadata.ui.RequestMappingViewSorter.compareColumn(RequestMappingViewSorter.java:58) at org.springframework.ide.eclipse.metadata.ui.RequestMappingViewSorter.compare(RequestMappingViewSorter.java:41) at org.eclipse.jface.viewers.ViewerComparator$1.compare(ViewerComparator.java:192) at java.util.TimSort.countRunAndMakeAscending(TimSort.java:351) at java.util.TimSort.sort(TimSort.java:216) at java.util.Arrays.sort(Arrays.java:1438) at org.eclipse.jface.viewers.ViewerComparator.sort(ViewerComparator.java:189) at org.eclipse.jface.viewers.StructuredViewer.getSortedChildren(StructuredViewer.java:1087) at org.eclipse.jface.viewers.AbstractTableViewer.internalRefreshAll(AbstractTableViewer.java:667) at org.eclipse.jface.viewers.AbstractTableViewer.internalRefresh(AbstractTableViewer.java:615) at org.eclipse.jface.viewers.AbstractTableViewer.internalRefresh(AbstractTableViewer.java:607) at org.eclipse.jface.viewers.AbstractTableViewer$1.run(AbstractTableViewer.java:567) at org.eclipse.jface.viewers.StructuredViewer.preservingSelection(StructuredViewer.java:1462) at org.eclipse.jface.viewers.StructuredViewer.preservingSelection(StructuredViewer.java:1423) at org.eclipse.jface.viewers.AbstractTableViewer.inputChanged(AbstractTableViewer.java:564) at org.eclipse.jface.viewers.ContentViewer.setInput(ContentViewer.java:292) at org.eclipse.jface.viewers.StructuredViewer.setInput(StructuredViewer.java:1701) at org.springframework.ide.eclipse.metadata.ui.RequestMappingView$7.run(RequestMappingView.java:617) at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:135) ... 23 more {noformat}

    SpringSource Issue Tracker | 2 years ago | Martin Lippert
    org.eclipse.swt.SWTException: Failed to execute runnable (java.lang.StringIndexOutOfBoundsException: String index out of range: -1)
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0
    You need to make sure that capitalisation of the case for the plugin in the properties file is exactly: "AllocinePlugin" and not "allocineplugin"
    via GitHub by Omertron
  6. 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

  1. jokester 3 times, last 2 weeks ago
  2. richard77 2 times, last 1 month ago
  3. MoYapro 1 times, last 1 month ago
  4. kjhdofjosvs 2 times, last 2 months ago
  5. archenroot 17 times, last 2 months ago
20 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:1915)
    1 frame
  3. Spring Core
    AntPathMatcher$AntPatternComparator.compare
    1. org.springframework.util.AntPathMatcher$AntPatternComparator$PatternInfo.initCounters(AntPathMatcher.java:711)
    2. org.springframework.util.AntPathMatcher$AntPatternComparator$PatternInfo.<init>(AntPathMatcher.java:690)
    3. org.springframework.util.AntPathMatcher$AntPatternComparator.compare(AntPathMatcher.java:609)
    4. org.springframework.util.AntPathMatcher$AntPatternComparator.compare(AntPathMatcher.java:593)
    4 frames
  4. org.springframework.ide
    RequestMappingViewSorter.compare
    1. org.springframework.ide.eclipse.metadata.ui.RequestMappingViewSorter.sortByUrl(RequestMappingViewSorter.java:101)
    2. org.springframework.ide.eclipse.metadata.ui.RequestMappingViewSorter.compareColumn(RequestMappingViewSorter.java:58)
    3. org.springframework.ide.eclipse.metadata.ui.RequestMappingViewSorter.compare(RequestMappingViewSorter.java:41)
    3 frames
  5. JFace
    ViewerComparator$1.compare
    1. org.eclipse.jface.viewers.ViewerComparator$1.compare(ViewerComparator.java:192)
    1 frame
  6. Java RT
    Arrays.sort
    1. java.util.TimSort.countRunAndMakeAscending(TimSort.java:351)
    2. java.util.TimSort.sort(TimSort.java:216)
    3. java.util.Arrays.sort(Arrays.java:1438)
    3 frames
  7. JFace
    StructuredViewer.setInput
    1. org.eclipse.jface.viewers.ViewerComparator.sort(ViewerComparator.java:189)
    2. org.eclipse.jface.viewers.StructuredViewer.getSortedChildren(StructuredViewer.java:1087)
    3. org.eclipse.jface.viewers.AbstractTableViewer.internalRefreshAll(AbstractTableViewer.java:667)
    4. org.eclipse.jface.viewers.AbstractTableViewer.internalRefresh(AbstractTableViewer.java:615)
    5. org.eclipse.jface.viewers.AbstractTableViewer.internalRefresh(AbstractTableViewer.java:607)
    6. org.eclipse.jface.viewers.AbstractTableViewer$1.run(AbstractTableViewer.java:567)
    7. org.eclipse.jface.viewers.StructuredViewer.preservingSelection(StructuredViewer.java:1462)
    8. org.eclipse.jface.viewers.StructuredViewer.preservingSelection(StructuredViewer.java:1423)
    9. org.eclipse.jface.viewers.AbstractTableViewer.inputChanged(AbstractTableViewer.java:564)
    10. org.eclipse.jface.viewers.ContentViewer.setInput(ContentViewer.java:292)
    11. org.eclipse.jface.viewers.StructuredViewer.setInput(StructuredViewer.java:1701)
    11 frames
  8. org.springframework.ide
    RequestMappingView$7.run
    1. org.springframework.ide.eclipse.metadata.ui.RequestMappingView$7.run(RequestMappingView.java:617)
    1 frame
  9. RWT
    Display.readAndDispatch
    1. org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
    2. org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:135)
    3. org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4024)
    4. org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3700)
    4 frames
  10. Eclipse Workbench SWT
    PartRenderingEngine$4.run
    1. org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1127)
    1 frame
  11. Databinding
    Realm.runWithDefault
    1. org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:337)
    1 frame
  12. Eclipse Workbench SWT
    PartRenderingEngine.run
    1. org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1018)
    1 frame
  13. Eclipse Workbench
    E4Workbench.createAndRunUI
    1. org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:156)
    1 frame
  14. Eclipse UI
    Workbench$5.run
    1. org.eclipse.ui.internal.Workbench$5.run(Workbench.java:654)
    1 frame
  15. Databinding
    Realm.runWithDefault
    1. org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:337)
    1 frame
  16. Eclipse UI
    Workbench.createAndRunWorkbench
    1. org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:598)
    1 frame
  17. Eclipse UI
    PlatformUI.createAndRunWorkbench
    1. org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
    1 frame
  18. Eclipse IDE
    IDEApplication.start
    1. org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:139)
    1 frame
  19. Equinox Container
    EclipseAppHandle.run
    1. org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
    1 frame
  20. Eclipse OSGi
    EclipseStarter.run
    1. org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
    2. org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
    3. org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:380)
    4. org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:235)
    4 frames
  21. Java RT
    Method.invoke
    1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    4. java.lang.reflect.Method.invoke(Method.java:497)
    4 frames
  22. Equinox
    Main.run
    1. org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:669)
    2. org.eclipse.equinox.launcher.Main.basicRun(Main.java:608)
    3. org.eclipse.equinox.launcher.Main.run(Main.java:1515)
    3 frames