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

Appcelerator JIRA | Wojciech Bajcar | 5 years ago
  1. 0

    After installing Aptana Studio 3, build: *3.0.3.201106241312* getting *Could not open the editor: Editor could not be initialized* error while trying to open some *ctp*/*php* files (using Web perspective, project is of PHP nature). Below related log entries: !ENTRY org.eclipse.ui 4 0 2011-06-27 12:00:16.793 !MESSAGE Unable to create editor ID com.aptana.editor.php: Editor could not be initialized. !STACK 0 java.lang.StringIndexOutOfBoundsException: String index out of range: -1 at java.lang.AbstractStringBuilder.setLength(Unknown Source) at java.lang.StringBuilder.setLength(Unknown Source) at com.aptana.editor.common.text.rules.CollectingCharacterScanner.unread(CollectingCharacterScanner.java:67) at com.aptana.editor.common.text.rules.PrefixedCharacterScanner.unread(PrefixedCharacterScanner.java:61) at org.eclipse.jface.text.rules.PatternRule.endSequenceDetected(PatternRule.java:268) at org.eclipse.jface.text.rules.PatternRule.doEvaluate(PatternRule.java:195) at org.eclipse.jface.text.rules.PatternRule.evaluate(PatternRule.java:308) at org.eclipse.jface.text.rules.PatternRule.evaluate(PatternRule.java:209) at com.aptana.editor.common.text.rules.TagRule.endSequenceDetected(TagRule.java:108) at org.eclipse.jface.text.rules.PatternRule.doEvaluate(PatternRule.java:187) at com.aptana.editor.common.text.rules.TagRule.doEvaluate(TagRule.java:85) at org.eclipse.jface.text.rules.PatternRule.evaluate(PatternRule.java:308) at com.aptana.editor.common.text.rules.CompositePartitionScanner.doResumeContentType(CompositePartitionScanner.java:210) at com.aptana.editor.common.text.rules.CompositePartitionScanner.nextToken(CompositePartitionScanner.java:182) at org.eclipse.jface.text.rules.FastPartitioner.initialize(FastPartitioner.java:176) at org.eclipse.jface.text.rules.FastPartitioner.checkInitialization(FastPartitioner.java:151) at org.eclipse.jface.text.rules.FastPartitioner.connect(FastPartitioner.java:143) at org.eclipse.jface.text.rules.FastPartitioner.connect(FastPartitioner.java:125) at com.aptana.editor.common.CompositeDocumentProvider.connect(CompositeDocumentProvider.java:53) at com.aptana.editor.php.internal.ui.editor.PHPDocumentProvider.connect(PHPDocumentProvider.java:38)

    Appcelerator JIRA | 5 years ago | Wojciech Bajcar
    java.lang.StringIndexOutOfBoundsException: String index out of range: -1
  2. 0

    After installing Aptana Studio 3, build: *3.0.3.201106241312* getting *Could not open the editor: Editor could not be initialized* error while trying to open some *ctp*/*php* files (using Web perspective, project is of PHP nature). Below related log entries: !ENTRY org.eclipse.ui 4 0 2011-06-27 12:00:16.793 !MESSAGE Unable to create editor ID com.aptana.editor.php: Editor could not be initialized. !STACK 0 java.lang.StringIndexOutOfBoundsException: String index out of range: -1 at java.lang.AbstractStringBuilder.setLength(Unknown Source) at java.lang.StringBuilder.setLength(Unknown Source) at com.aptana.editor.common.text.rules.CollectingCharacterScanner.unread(CollectingCharacterScanner.java:67) at com.aptana.editor.common.text.rules.PrefixedCharacterScanner.unread(PrefixedCharacterScanner.java:61) at org.eclipse.jface.text.rules.PatternRule.endSequenceDetected(PatternRule.java:268) at org.eclipse.jface.text.rules.PatternRule.doEvaluate(PatternRule.java:195) at org.eclipse.jface.text.rules.PatternRule.evaluate(PatternRule.java:308) at org.eclipse.jface.text.rules.PatternRule.evaluate(PatternRule.java:209) at com.aptana.editor.common.text.rules.TagRule.endSequenceDetected(TagRule.java:108) at org.eclipse.jface.text.rules.PatternRule.doEvaluate(PatternRule.java:187) at com.aptana.editor.common.text.rules.TagRule.doEvaluate(TagRule.java:85) at org.eclipse.jface.text.rules.PatternRule.evaluate(PatternRule.java:308) at com.aptana.editor.common.text.rules.CompositePartitionScanner.doResumeContentType(CompositePartitionScanner.java:210) at com.aptana.editor.common.text.rules.CompositePartitionScanner.nextToken(CompositePartitionScanner.java:182) at org.eclipse.jface.text.rules.FastPartitioner.initialize(FastPartitioner.java:176) at org.eclipse.jface.text.rules.FastPartitioner.checkInitialization(FastPartitioner.java:151) at org.eclipse.jface.text.rules.FastPartitioner.connect(FastPartitioner.java:143) at org.eclipse.jface.text.rules.FastPartitioner.connect(FastPartitioner.java:125) at com.aptana.editor.common.CompositeDocumentProvider.connect(CompositeDocumentProvider.java:53) at com.aptana.editor.php.internal.ui.editor.PHPDocumentProvider.connect(PHPDocumentProvider.java:38)

    Appcelerator JIRA | 5 years ago | Wojciech Bajcar
    java.lang.StringIndexOutOfBoundsException: String index out of range: -1
  3. 0

    Very similar to the bug https://jira.appcelerator.org/browse/APSTUD-2806 Opening the file gives you the 'Editor could not be initialized' error cause by 'java.lang.StringIndexOutOfBoundsException: String index out of range: -1' The following line of php causes the bug (full php file attached) <i class="icon" aria-hidden="true"><svg class="style1"><use xlink:href="/templates/main/images/icons.svg#<?php echo $article->alias; ?>"></use></svg></i> Edit: Narrowed it down further: <i class="icon" aria-hidden="true"><svg viewBox="0 0 64 57"><use xlink:href="/templates/main/images/icons.svg"></use></svg></i> and try to paste "#<?php echo $article->alias; ?>" after the svg filename it gives the following error "startLine (14) does not match endLine (15)" It's the php block in the xlink:href attribute that causes the problem. Full error: java.lang.StringIndexOutOfBoundsException: String index out of range: -1 at java.lang.AbstractStringBuilder.setLength(Unknown Source) at java.lang.StringBuilder.setLength(Unknown Source) at com.aptana.editor.common.text.rules.CollectingCharacterScanner.unread(CollectingCharacterScanner.java:67) at org.eclipse.jface.text.rules.PatternRule.doEvaluate(PatternRule.java:201) at org.eclipse.jface.text.rules.PatternRule.evaluate(PatternRule.java:308) at org.eclipse.jface.text.rules.PatternRule.evaluate(PatternRule.java:209) at com.aptana.editor.common.text.rules.TagRule.doDetectEndSequence(TagRule.java:92) at com.aptana.editor.common.text.rules.ResumableMultiLineRule.endSequenceDetected(ResumableMultiLineRule.java:56) at org.eclipse.jface.text.rules.PatternRule.doEvaluate(PatternRule.java:187) at com.aptana.editor.common.text.rules.ResumableMultiLineRule.doEvaluate(ResumableMultiLineRule.java:43) at org.eclipse.jface.text.rules.PatternRule.evaluate(PatternRule.java:308) at com.aptana.editor.common.text.rules.CompositePartitionScanner.doResumeContentType(CompositePartitionScanner.java:225) at com.aptana.editor.common.text.rules.CompositePartitionScanner.nextToken(CompositePartitionScanner.java:197) at org.eclipse.jface.text.rules.FastPartitioner.initialize(FastPartitioner.java:176) at org.eclipse.jface.text.rules.FastPartitioner.checkInitialization(FastPartitioner.java:151) at org.eclipse.jface.text.rules.FastPartitioner.connect(FastPartitioner.java:143) at org.eclipse.jface.text.rules.FastPartitioner.connect(FastPartitioner.java:125) at com.aptana.editor.common.CompositeDocumentProvider.connect(CompositeDocumentProvider.java:53) at com.aptana.editor.php.internal.ui.editor.PHPDocumentProvider.connect(PHPDocumentProvider.java:38) at org.eclipse.ui.texteditor.AbstractTextEditor.doSetInput(AbstractTextEditor.java:4230) at org.eclipse.ui.texteditor.StatusTextEditor.doSetInput(StatusTextEditor.java:237) at org.eclipse.ui.texteditor.AbstractDecoratedTextEditor.doSetInput(AbstractDecoratedTextEditor.java:1480) at com.aptana.editor.common.AbstractThemeableEditor.doSetInput(AbstractThemeableEditor.java:1160) at com.aptana.editor.php.internal.ui.editor.PHPSourceEditor.doSetInput(PHPSourceEditor.java:233) at org.eclipse.ui.texteditor.AbstractTextEditor$19.run(AbstractTextEditor.java:3217) at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:464) at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:372) at org.eclipse.ui.internal.WorkbenchWindow$13.run(WorkbenchWindow.java:1829) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70) at org.eclipse.ui.internal.WorkbenchWindow.run(WorkbenchWindow.java:1826) at org.eclipse.ui.texteditor.AbstractTextEditor.internalInit(AbstractTextEditor.java:3235) at org.eclipse.ui.texteditor.AbstractTextEditor.init(AbstractTextEditor.java:3262) at com.aptana.editor.common.AbstractThemeableEditor.init(AbstractThemeableEditor.java:640) at org.eclipse.ui.internal.EditorReference.initialize(EditorReference.java:359) at org.eclipse.ui.internal.e4.compatibility.CompatibilityPart.create(CompatibilityPart.java:306) at sun.reflect.GeneratedMethodAccessor63.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:56) at org.eclipse.e4.core.internal.di.InjectorImpl.processAnnotated(InjectorImpl.java:877) at org.eclipse.e4.core.internal.di.InjectorImpl.processAnnotated(InjectorImpl.java:857) at org.eclipse.e4.core.internal.di.InjectorImpl.inject(InjectorImpl.java:119) at org.eclipse.e4.core.internal.di.InjectorImpl.internalMake(InjectorImpl.java:333) at org.eclipse.e4.core.internal.di.InjectorImpl.make(InjectorImpl.java:254) at org.eclipse.e4.core.contexts.ContextInjectionFactory.make(ContextInjectionFactory.java:162) at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.createFromBundle(ReflectionContributionFactory.java:102) at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.doCreate(ReflectionContributionFactory.java:71) at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.create(ReflectionContributionFactory.java:53) at org.eclipse.e4.ui.workbench.renderers.swt.ContributedPartRenderer.createWidget(ContributedPartRenderer.java:129) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createWidget(PartRenderingEngine.java:949) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:633) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:735) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.access$2(PartRenderingEngine.java:706) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$7.run(PartRenderingEngine.java:700) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createGui(PartRenderingEngine.java:685) at org.eclipse.e4.ui.internal.workbench.PartServiceImpl$1.handleEvent(PartServiceImpl.java:90) at org.eclipse.e4.ui.services.internal.events.UIEventHandler$1.run(UIEventHandler.java:41) at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:180) at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:150) at org.eclipse.swt.widgets.Display.syncExec(Display.java:4688) at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:205) at org.eclipse.e4.ui.services.internal.events.UIEventHandler.handleEvent(UIEventHandler.java:38) at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:197) at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197) at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1) at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135) at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78) at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39) at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:80) at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:58) at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374) at org.eclipse.e4.ui.model.application.ui.impl.ElementContainerImpl.setSelectedElement(ElementContainerImpl.java:171) at org.eclipse.e4.ui.internal.workbench.ModelServiceImpl.showElementInWindow(ModelServiceImpl.java:576) at org.eclipse.e4.ui.internal.workbench.ModelServiceImpl.bringToTop(ModelServiceImpl.java:543) at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.delegateBringToTop(PartServiceImpl.java:619) at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.bringToTop(PartServiceImpl.java:331) at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.showPart(PartServiceImpl.java:1046) at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:3112) at org.eclipse.ui.internal.WorkbenchPage.access$21(WorkbenchPage.java:3034) at org.eclipse.ui.internal.WorkbenchPage$8.run(WorkbenchPage.java:3016) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70) at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:3012) at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2976) at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2967) at org.eclipse.ui.ide.IDE.openEditor(IDE.java:534) at org.eclipse.ui.ide.IDE.openEditor(IDE.java:493) at org.eclipse.ui.actions.OpenFileAction.openFile(OpenFileAction.java:99) at org.eclipse.ui.actions.OpenSystemEditorAction.run(OpenSystemEditorAction.java:99) at org.eclipse.ui.actions.RetargetAction.run(RetargetAction.java:221) at org.eclipse.ui.navigator.CommonNavigatorManager$3.open(CommonNavigatorManager.java:185) at org.eclipse.ui.OpenAndLinkWithEditorHelper$InternalListener.open(OpenAndLinkWithEditorHelper.java:47) at org.eclipse.jface.viewers.StructuredViewer$2.run(StructuredViewer.java:866) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:49) at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175) at org.eclipse.jface.viewers.StructuredViewer.fireOpen(StructuredViewer.java:864) at org.eclipse.jface.viewers.StructuredViewer.handleOpen(StructuredViewer.java:1152) at org.eclipse.ui.navigator.CommonViewer.handleOpen(CommonViewer.java:462) at org.eclipse.jface.viewers.StructuredViewer$6.handleOpen(StructuredViewer.java:1256) at org.eclipse.jface.util.OpenStrategy.fireOpenEvent(OpenStrategy.java:275) at org.eclipse.jface.util.OpenStrategy.access$2(OpenStrategy.java:269) at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:309) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1057) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4170) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3759) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1113) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:997) at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:140) at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:611) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:567) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150) at com.aptana.rcp.IDEApplication.start(IDEApplication.java:125) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:354) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:181) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:636) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:591) at org.eclipse.equinox.launcher.Main.run(Main.java:1450)

    Appcelerator JIRA | 2 years ago | Jonny Rimes
    java.lang.StringIndexOutOfBoundsException: String index out of range: -1
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Very similar to the bug https://jira.appcelerator.org/browse/APSTUD-2806 Opening the file gives you the 'Editor could not be initialized' error cause by 'java.lang.StringIndexOutOfBoundsException: String index out of range: -1' The following line of php causes the bug (full php file attached) <i class="icon" aria-hidden="true"><svg class="style1"><use xlink:href="/templates/main/images/icons.svg#<?php echo $article->alias; ?>"></use></svg></i> Edit: Narrowed it down further: <i class="icon" aria-hidden="true"><svg viewBox="0 0 64 57"><use xlink:href="/templates/main/images/icons.svg"></use></svg></i> and try to paste "#<?php echo $article->alias; ?>" after the svg filename it gives the following error "startLine (14) does not match endLine (15)" It's the php block in the xlink:href attribute that causes the problem. Full error: java.lang.StringIndexOutOfBoundsException: String index out of range: -1 at java.lang.AbstractStringBuilder.setLength(Unknown Source) at java.lang.StringBuilder.setLength(Unknown Source) at com.aptana.editor.common.text.rules.CollectingCharacterScanner.unread(CollectingCharacterScanner.java:67) at org.eclipse.jface.text.rules.PatternRule.doEvaluate(PatternRule.java:201) at org.eclipse.jface.text.rules.PatternRule.evaluate(PatternRule.java:308) at org.eclipse.jface.text.rules.PatternRule.evaluate(PatternRule.java:209) at com.aptana.editor.common.text.rules.TagRule.doDetectEndSequence(TagRule.java:92) at com.aptana.editor.common.text.rules.ResumableMultiLineRule.endSequenceDetected(ResumableMultiLineRule.java:56) at org.eclipse.jface.text.rules.PatternRule.doEvaluate(PatternRule.java:187) at com.aptana.editor.common.text.rules.ResumableMultiLineRule.doEvaluate(ResumableMultiLineRule.java:43) at org.eclipse.jface.text.rules.PatternRule.evaluate(PatternRule.java:308) at com.aptana.editor.common.text.rules.CompositePartitionScanner.doResumeContentType(CompositePartitionScanner.java:225) at com.aptana.editor.common.text.rules.CompositePartitionScanner.nextToken(CompositePartitionScanner.java:197) at org.eclipse.jface.text.rules.FastPartitioner.initialize(FastPartitioner.java:176) at org.eclipse.jface.text.rules.FastPartitioner.checkInitialization(FastPartitioner.java:151) at org.eclipse.jface.text.rules.FastPartitioner.connect(FastPartitioner.java:143) at org.eclipse.jface.text.rules.FastPartitioner.connect(FastPartitioner.java:125) at com.aptana.editor.common.CompositeDocumentProvider.connect(CompositeDocumentProvider.java:53) at com.aptana.editor.php.internal.ui.editor.PHPDocumentProvider.connect(PHPDocumentProvider.java:38) at org.eclipse.ui.texteditor.AbstractTextEditor.doSetInput(AbstractTextEditor.java:4230) at org.eclipse.ui.texteditor.StatusTextEditor.doSetInput(StatusTextEditor.java:237) at org.eclipse.ui.texteditor.AbstractDecoratedTextEditor.doSetInput(AbstractDecoratedTextEditor.java:1480) at com.aptana.editor.common.AbstractThemeableEditor.doSetInput(AbstractThemeableEditor.java:1160) at com.aptana.editor.php.internal.ui.editor.PHPSourceEditor.doSetInput(PHPSourceEditor.java:233) at org.eclipse.ui.texteditor.AbstractTextEditor$19.run(AbstractTextEditor.java:3217) at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:464) at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:372) at org.eclipse.ui.internal.WorkbenchWindow$13.run(WorkbenchWindow.java:1829) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70) at org.eclipse.ui.internal.WorkbenchWindow.run(WorkbenchWindow.java:1826) at org.eclipse.ui.texteditor.AbstractTextEditor.internalInit(AbstractTextEditor.java:3235) at org.eclipse.ui.texteditor.AbstractTextEditor.init(AbstractTextEditor.java:3262) at com.aptana.editor.common.AbstractThemeableEditor.init(AbstractThemeableEditor.java:640) at org.eclipse.ui.internal.EditorReference.initialize(EditorReference.java:359) at org.eclipse.ui.internal.e4.compatibility.CompatibilityPart.create(CompatibilityPart.java:306) at sun.reflect.GeneratedMethodAccessor63.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:56) at org.eclipse.e4.core.internal.di.InjectorImpl.processAnnotated(InjectorImpl.java:877) at org.eclipse.e4.core.internal.di.InjectorImpl.processAnnotated(InjectorImpl.java:857) at org.eclipse.e4.core.internal.di.InjectorImpl.inject(InjectorImpl.java:119) at org.eclipse.e4.core.internal.di.InjectorImpl.internalMake(InjectorImpl.java:333) at org.eclipse.e4.core.internal.di.InjectorImpl.make(InjectorImpl.java:254) at org.eclipse.e4.core.contexts.ContextInjectionFactory.make(ContextInjectionFactory.java:162) at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.createFromBundle(ReflectionContributionFactory.java:102) at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.doCreate(ReflectionContributionFactory.java:71) at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.create(ReflectionContributionFactory.java:53) at org.eclipse.e4.ui.workbench.renderers.swt.ContributedPartRenderer.createWidget(ContributedPartRenderer.java:129) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createWidget(PartRenderingEngine.java:949) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:633) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:735) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.access$2(PartRenderingEngine.java:706) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$7.run(PartRenderingEngine.java:700) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createGui(PartRenderingEngine.java:685) at org.eclipse.e4.ui.internal.workbench.PartServiceImpl$1.handleEvent(PartServiceImpl.java:90) at org.eclipse.e4.ui.services.internal.events.UIEventHandler$1.run(UIEventHandler.java:41) at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:180) at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:150) at org.eclipse.swt.widgets.Display.syncExec(Display.java:4688) at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:205) at org.eclipse.e4.ui.services.internal.events.UIEventHandler.handleEvent(UIEventHandler.java:38) at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:197) at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197) at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1) at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135) at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78) at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39) at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:80) at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:58) at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374) at org.eclipse.e4.ui.model.application.ui.impl.ElementContainerImpl.setSelectedElement(ElementContainerImpl.java:171) at org.eclipse.e4.ui.internal.workbench.ModelServiceImpl.showElementInWindow(ModelServiceImpl.java:576) at org.eclipse.e4.ui.internal.workbench.ModelServiceImpl.bringToTop(ModelServiceImpl.java:543) at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.delegateBringToTop(PartServiceImpl.java:619) at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.bringToTop(PartServiceImpl.java:331) at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.showPart(PartServiceImpl.java:1046) at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:3112) at org.eclipse.ui.internal.WorkbenchPage.access$21(WorkbenchPage.java:3034) at org.eclipse.ui.internal.WorkbenchPage$8.run(WorkbenchPage.java:3016) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70) at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:3012) at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2976) at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2967) at org.eclipse.ui.ide.IDE.openEditor(IDE.java:534) at org.eclipse.ui.ide.IDE.openEditor(IDE.java:493) at org.eclipse.ui.actions.OpenFileAction.openFile(OpenFileAction.java:99) at org.eclipse.ui.actions.OpenSystemEditorAction.run(OpenSystemEditorAction.java:99) at org.eclipse.ui.actions.RetargetAction.run(RetargetAction.java:221) at org.eclipse.ui.navigator.CommonNavigatorManager$3.open(CommonNavigatorManager.java:185) at org.eclipse.ui.OpenAndLinkWithEditorHelper$InternalListener.open(OpenAndLinkWithEditorHelper.java:47) at org.eclipse.jface.viewers.StructuredViewer$2.run(StructuredViewer.java:866) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:49) at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175) at org.eclipse.jface.viewers.StructuredViewer.fireOpen(StructuredViewer.java:864) at org.eclipse.jface.viewers.StructuredViewer.handleOpen(StructuredViewer.java:1152) at org.eclipse.ui.navigator.CommonViewer.handleOpen(CommonViewer.java:462) at org.eclipse.jface.viewers.StructuredViewer$6.handleOpen(StructuredViewer.java:1256) at org.eclipse.jface.util.OpenStrategy.fireOpenEvent(OpenStrategy.java:275) at org.eclipse.jface.util.OpenStrategy.access$2(OpenStrategy.java:269) at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:309) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1057) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4170) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3759) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1113) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:997) at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:140) at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:611) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:567) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150) at com.aptana.rcp.IDEApplication.start(IDEApplication.java:125) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:354) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:181) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:636) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:591) at org.eclipse.equinox.launcher.Main.run(Main.java:1450)

    Appcelerator JIRA | 2 years ago | Jonny Rimes
    java.lang.StringIndexOutOfBoundsException: String index out of range: -1
  6. 0

    @Path("/") in handler throws error

    GitHub | 2 years ago | poornachandra
    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.AbstractStringBuilder.setLength()
    2. Java RT
      StringBuilder.setLength
      1. java.lang.AbstractStringBuilder.setLength(Unknown Source)
      2. java.lang.StringBuilder.setLength(Unknown Source)
      2 frames
    3. com.aptana.editor
      PrefixedCharacterScanner.unread
      1. com.aptana.editor.common.text.rules.CollectingCharacterScanner.unread(CollectingCharacterScanner.java:67)
      2. com.aptana.editor.common.text.rules.PrefixedCharacterScanner.unread(PrefixedCharacterScanner.java:61)
      2 frames
    4. JFace Text
      PatternRule.evaluate
      1. org.eclipse.jface.text.rules.PatternRule.endSequenceDetected(PatternRule.java:268)
      2. org.eclipse.jface.text.rules.PatternRule.doEvaluate(PatternRule.java:195)
      3. org.eclipse.jface.text.rules.PatternRule.evaluate(PatternRule.java:308)
      4. org.eclipse.jface.text.rules.PatternRule.evaluate(PatternRule.java:209)
      4 frames
    5. com.aptana.editor
      TagRule.endSequenceDetected
      1. com.aptana.editor.common.text.rules.TagRule.endSequenceDetected(TagRule.java:108)
      1 frame
    6. JFace Text
      PatternRule.doEvaluate
      1. org.eclipse.jface.text.rules.PatternRule.doEvaluate(PatternRule.java:187)
      1 frame
    7. com.aptana.editor
      TagRule.doEvaluate
      1. com.aptana.editor.common.text.rules.TagRule.doEvaluate(TagRule.java:85)
      1 frame
    8. JFace Text
      PatternRule.evaluate
      1. org.eclipse.jface.text.rules.PatternRule.evaluate(PatternRule.java:308)
      1 frame
    9. com.aptana.editor
      CompositePartitionScanner.nextToken
      1. com.aptana.editor.common.text.rules.CompositePartitionScanner.doResumeContentType(CompositePartitionScanner.java:210)
      2. com.aptana.editor.common.text.rules.CompositePartitionScanner.nextToken(CompositePartitionScanner.java:182)
      2 frames
    10. JFace Text
      FastPartitioner.connect
      1. org.eclipse.jface.text.rules.FastPartitioner.initialize(FastPartitioner.java:176)
      2. org.eclipse.jface.text.rules.FastPartitioner.checkInitialization(FastPartitioner.java:151)
      3. org.eclipse.jface.text.rules.FastPartitioner.connect(FastPartitioner.java:143)
      4. org.eclipse.jface.text.rules.FastPartitioner.connect(FastPartitioner.java:125)
      4 frames
    11. com.aptana.editor
      PHPDocumentProvider.connect
      1. com.aptana.editor.common.CompositeDocumentProvider.connect(CompositeDocumentProvider.java:53)
      2. com.aptana.editor.php.internal.ui.editor.PHPDocumentProvider.connect(PHPDocumentProvider.java:38)
      2 frames