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

Pentaho BI Platform Tracking | Viktoryia Shalkova | 3 years ago
  1. 0

    "Error editing job entry" message appears in case Internal variable defined like: %%VARIABLE%%. To reproduce: 1. Open attached transformation/job and try to specify internal variable from ${VARIABLE} to format like %%VARIABLE%% as follows: ${Internal.Transformation.Filename.Directory} change to %%Internal.Transformation.Filename.Directory%% As a result, the "Error editing job entry" message appears. In addition, transformation/Job steps works fine in case internal variable defined both ways, but after the Error message has been appeared twice, the Spoon fatal error has taken a place (issue screenshot attached). PDI-CE Version 4.4.0-stable works fine. Error details and exceptions stacktrace: java.lang.StringIndexOutOfBoundsException: String index out of range: -2 at java.lang.String.substring(String.java:1958) at org.pentaho.di.core.util.StringUtil.substitute(StringUtil.java:139) at org.pentaho.di.core.util.StringUtil.substitute(StringUtil.java:104) at org.pentaho.di.core.util.StringUtil.substituteWindows(StringUtil.java:270) at org.pentaho.di.core.util.StringUtil.environmentSubstitute(StringUtil.java:238) at org.pentaho.di.core.variables.Variables.environmentSubstitute(Variables.java:165) at org.pentaho.di.trans.TransMeta.environmentSubstitute(TransMeta.java:6492) at org.pentaho.di.ui.core.widget.TextVar$1.modifyText(TextVar.java:170) at org.eclipse.swt.widgets.TypedListener.handleEvent(Unknown Source) at org.eclipse.swt.widgets.EventTable.sendEvent(Unknown Source) at org.eclipse.swt.widgets.Widget.sendEvent(Unknown Source) at org.eclipse.swt.widgets.Widget.sendEvent(Unknown Source) at org.eclipse.swt.widgets.Widget.sendEvent(Unknown Source) at org.eclipse.swt.widgets.Text.wmCommandChild(Unknown Source) at org.eclipse.swt.widgets.Control.WM_COMMAND(Unknown Source) at org.eclipse.swt.widgets.Control.windowProc(Unknown Source) at org.eclipse.swt.widgets.Display.windowProc(Unknown Source) at org.eclipse.swt.internal.win32.OS.CallWindowProcW(Native Method) at org.eclipse.swt.internal.win32.OS.CallWindowProc(Unknown Source) at org.eclipse.swt.widgets.Text.callWindowProc(Unknown Source) at org.eclipse.swt.widgets.Control.windowProc(Unknown Source) at org.eclipse.swt.widgets.Text.windowProc(Unknown Source) at org.eclipse.swt.widgets.Display.windowProc(Unknown Source) at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method) at org.eclipse.swt.internal.win32.OS.DispatchMessage(Unknown Source) at org.eclipse.swt.widgets.Display.readAndDispatch(Unknown Source) at org.pentaho.di.ui.spoon.Spoon.readAndDispatch(Spoon.java:1250) at org.pentaho.di.ui.spoon.Spoon.waitForDispose(Spoon.java:7564) at org.pentaho.di.ui.spoon.Spoon.start(Spoon.java:8885) at org.pentaho.di.ui.spoon.Spoon.main(Spoon.java:626) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at org.pentaho.commons.launcher.Launcher.main(Launcher.java:151)

    Pentaho BI Platform Tracking | 3 years ago | Viktoryia Shalkova
    java.lang.StringIndexOutOfBoundsException: String index out of range: -2
  2. 0

    "Error editing job entry" message appears in case Internal variable defined like: %%VARIABLE%%. To reproduce: 1. Open attached transformation/job and try to specify internal variable from ${VARIABLE} to format like %%VARIABLE%% as follows: ${Internal.Transformation.Filename.Directory} change to %%Internal.Transformation.Filename.Directory%% As a result, the "Error editing job entry" message appears. In addition, transformation/Job steps works fine in case internal variable defined both ways, but after the Error message has been appeared twice, the Spoon fatal error has taken a place (issue screenshot attached). PDI-CE Version 4.4.0-stable works fine. Error details and exceptions stacktrace: java.lang.StringIndexOutOfBoundsException: String index out of range: -2 at java.lang.String.substring(String.java:1958) at org.pentaho.di.core.util.StringUtil.substitute(StringUtil.java:139) at org.pentaho.di.core.util.StringUtil.substitute(StringUtil.java:104) at org.pentaho.di.core.util.StringUtil.substituteWindows(StringUtil.java:270) at org.pentaho.di.core.util.StringUtil.environmentSubstitute(StringUtil.java:238) at org.pentaho.di.core.variables.Variables.environmentSubstitute(Variables.java:165) at org.pentaho.di.trans.TransMeta.environmentSubstitute(TransMeta.java:6492) at org.pentaho.di.ui.core.widget.TextVar$1.modifyText(TextVar.java:170) at org.eclipse.swt.widgets.TypedListener.handleEvent(Unknown Source) at org.eclipse.swt.widgets.EventTable.sendEvent(Unknown Source) at org.eclipse.swt.widgets.Widget.sendEvent(Unknown Source) at org.eclipse.swt.widgets.Widget.sendEvent(Unknown Source) at org.eclipse.swt.widgets.Widget.sendEvent(Unknown Source) at org.eclipse.swt.widgets.Text.wmCommandChild(Unknown Source) at org.eclipse.swt.widgets.Control.WM_COMMAND(Unknown Source) at org.eclipse.swt.widgets.Control.windowProc(Unknown Source) at org.eclipse.swt.widgets.Display.windowProc(Unknown Source) at org.eclipse.swt.internal.win32.OS.CallWindowProcW(Native Method) at org.eclipse.swt.internal.win32.OS.CallWindowProc(Unknown Source) at org.eclipse.swt.widgets.Text.callWindowProc(Unknown Source) at org.eclipse.swt.widgets.Control.windowProc(Unknown Source) at org.eclipse.swt.widgets.Text.windowProc(Unknown Source) at org.eclipse.swt.widgets.Display.windowProc(Unknown Source) at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method) at org.eclipse.swt.internal.win32.OS.DispatchMessage(Unknown Source) at org.eclipse.swt.widgets.Display.readAndDispatch(Unknown Source) at org.pentaho.di.ui.spoon.Spoon.readAndDispatch(Spoon.java:1250) at org.pentaho.di.ui.spoon.Spoon.waitForDispose(Spoon.java:7564) at org.pentaho.di.ui.spoon.Spoon.start(Spoon.java:8885) at org.pentaho.di.ui.spoon.Spoon.main(Spoon.java:626) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at org.pentaho.commons.launcher.Launcher.main(Launcher.java:151)

    Pentaho BI Platform Tracking | 3 years ago | Viktoryia Shalkova
    java.lang.StringIndexOutOfBoundsException: String index out of range: -2
  3. 0

    StringIndexOutOfBoundsException in com.googlecode.sardine.SardineImpl.getResources(SardineImpl.java:221)

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

    Automated exception search integrated into your IDE

  5. 0

    String index out of range while opening php file

    GitHub | 4 years ago | dinamic
    java.lang.StringIndexOutOfBoundsException: String index out of range: -2

  1. richard77 2 times, last 1 day ago
  2. kjhdofjosvs 2 times, last 5 days ago
  3. archenroot 17 times, last 2 weeks ago
  4. Alexandru Popa 2 times, last 3 weeks ago
  5. poroszd 3 times, last 4 weeks ago
18 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: -2

    at java.lang.String.substring()
  2. Java RT
    String.substring
    1. java.lang.String.substring(String.java:1958)
    1 frame
  3. org.pentaho.di
    TextVar$1.modifyText
    1. org.pentaho.di.core.util.StringUtil.substitute(StringUtil.java:139)
    2. org.pentaho.di.core.util.StringUtil.substitute(StringUtil.java:104)
    3. org.pentaho.di.core.util.StringUtil.substituteWindows(StringUtil.java:270)
    4. org.pentaho.di.core.util.StringUtil.environmentSubstitute(StringUtil.java:238)
    5. org.pentaho.di.core.variables.Variables.environmentSubstitute(Variables.java:165)
    6. org.pentaho.di.trans.TransMeta.environmentSubstitute(TransMeta.java:6492)
    7. org.pentaho.di.ui.core.widget.TextVar$1.modifyText(TextVar.java:170)
    7 frames
  4. RWT
    Display.windowProc
    1. org.eclipse.swt.widgets.TypedListener.handleEvent(Unknown Source)
    2. org.eclipse.swt.widgets.EventTable.sendEvent(Unknown Source)
    3. org.eclipse.swt.widgets.Widget.sendEvent(Unknown Source)
    4. org.eclipse.swt.widgets.Widget.sendEvent(Unknown Source)
    5. org.eclipse.swt.widgets.Widget.sendEvent(Unknown Source)
    6. org.eclipse.swt.widgets.Text.wmCommandChild(Unknown Source)
    7. org.eclipse.swt.widgets.Control.WM_COMMAND(Unknown Source)
    8. org.eclipse.swt.widgets.Control.windowProc(Unknown Source)
    9. org.eclipse.swt.widgets.Display.windowProc(Unknown Source)
    9 frames
  5. org.eclipse.swt
    OS.CallWindowProc
    1. org.eclipse.swt.internal.win32.OS.CallWindowProcW(Native Method)
    2. org.eclipse.swt.internal.win32.OS.CallWindowProc(Unknown Source)
    2 frames
  6. RWT
    Display.windowProc
    1. org.eclipse.swt.widgets.Text.callWindowProc(Unknown Source)
    2. org.eclipse.swt.widgets.Control.windowProc(Unknown Source)
    3. org.eclipse.swt.widgets.Text.windowProc(Unknown Source)
    4. org.eclipse.swt.widgets.Display.windowProc(Unknown Source)
    4 frames
  7. org.eclipse.swt
    OS.DispatchMessage
    1. org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method)
    2. org.eclipse.swt.internal.win32.OS.DispatchMessage(Unknown Source)
    2 frames
  8. RWT
    Display.readAndDispatch
    1. org.eclipse.swt.widgets.Display.readAndDispatch(Unknown Source)
    1 frame
  9. org.pentaho.di
    Spoon.main
    1. org.pentaho.di.ui.spoon.Spoon.readAndDispatch(Spoon.java:1250)
    2. org.pentaho.di.ui.spoon.Spoon.waitForDispose(Spoon.java:7564)
    3. org.pentaho.di.ui.spoon.Spoon.start(Spoon.java:8885)
    4. org.pentaho.di.ui.spoon.Spoon.main(Spoon.java:626)
    4 frames
  10. Java RT
    Method.invoke
    1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    4. java.lang.reflect.Method.invoke(Method.java:601)
    4 frames
  11. org.pentaho.commons
    Launcher.main
    1. org.pentaho.commons.launcher.Launcher.main(Launcher.java:151)
    1 frame