java.lang.StringIndexOutOfBoundsException

tip

Thrown by String methods to indicate that an index is either negative or greater than the size of the string. For some methods such as the charAt method, this exception also is thrown when the index is equal to the size of the string.


rafael

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

  • Single and double quotes are not ignored in a comment string within a Execute SQL Script step in a transformation. I entered only the following simple comment string /* "Test */ in a Execute SQL Script object and ran the transformation. I get the following error: 2009/08/26 14:41:38 - Execute SQL script.0 - Connected to database... 2009/08/26 14:41:38 - Execute SQL script - ERROR (version 3.2.0-GA, build 10572 from 2009-05-12 08.45.26 by buildguy) : Error initializing step [Execute SQL script] 2009/08/26 14:41:38 - Execute SQL script - ERROR (version 3.2.0-GA, build 10572 from 2009-05-12 08.45.26 by buildguy) : java.lang.StringIndexOutOfBoundsException: String index out of range: 22 2009/08/26 14:41:38 - Execute SQL script - ERROR (version 3.2.0-GA, build 10572 from 2009-05-12 08.45.26 by buildguy) : at java.lang.String.charAt(Unknown Source) 2009/08/26 14:41:38 - Execute SQL script - ERROR (version 3.2.0-GA, build 10572 from 2009-05-12 08.45.26 by buildguy) : at org.pentaho.di.core.database.Database.execStatements(Database.java:1598) 2009/08/26 14:41:38 - Execute SQL script - ERROR (version 3.2.0-GA, build 10572 from 2009-05-12 08.45.26 by buildguy) : at org.pentaho.di.trans.steps.sql.ExecSQL.init(ExecSQL.java:280) 2009/08/26 14:41:38 - Execute SQL script - ERROR (version 3.2.0-GA, build 10572 from 2009-05-12 08.45.26 by buildguy) : at org.pentaho.di.trans.step.StepInitThread.run(StepInitThread.java:48) 2009/08/26 14:41:38 - Execute SQL script - ERROR (version 3.2.0-GA, build 10572 from 2009-05-12 08.45.26 by buildguy) : at java.lang.Thread.run(Unknown Source) 2009/08/26 14:41:38 - bug - ERROR (version 3.2.0-GA, build 10572 from 2009-05-12 08.45.26 by buildguy) : Step [Execute SQL script.0] failed to initialize! 2009/08/26 14:41:38 - Execute SQL script.0 - Finished reading query, closing connection. 2009/08/26 14:41:41 - BID - Connection to database closed! 2009/08/26 14:41:41 - bug - ERROR (version 3.2.0-GA, build 10572 from 2009-05-12 08.45.26 by buildguy) : Preparing transformation execution failed 2009/08/26 14:41:41 - bug - ERROR (version 3.2.0-GA, build 10572 from 2009-05-12 08.45.26 by buildguy) : org.pentaho.di.core.exception.KettleException: 2009/08/26 14:41:41 - bug - ERROR (version 3.2.0-GA, build 10572 from 2009-05-12 08.45.26 by buildguy) : We failed to initialize at least one step. Execution can not begin! 2009/08/26 14:41:41 - bug - ERROR (version 3.2.0-GA, build 10572 from 2009-05-12 08.45.26 by buildguy) : 2009/08/26 14:41:41 - bug - ERROR (version 3.2.0-GA, build 10572 from 2009-05-12 08.45.26 by buildguy) : 2009/08/26 14:41:41 - bug - ERROR (version 3.2.0-GA, build 10572 from 2009-05-12 08.45.26 by buildguy) : at org.pentaho.di.trans.Trans.prepareExecution(Trans.java:677) 2009/08/26 14:41:41 - bug - ERROR (version 3.2.0-GA, build 10572 from 2009-05-12 08.45.26 by buildguy) : at org.pentaho.di.ui.spoon.trans.TransGraph$25.run(TransGraph.java:3192) 2009/08/26 14:41:41 - bug - ERROR (version 3.2.0-GA, build 10572 from 2009-05-12 08.45.26 by buildguy) : at java.lang.Thread.run(Unknown Source) If I add the correct number of quotes like the following: /* "Test" */ , then no error occurs as expected.
    via by Michael Frysinger,
  • Single and double quotes are not ignored in a comment string within a Execute SQL Script step in a transformation. I entered only the following simple comment string /* "Test */ in a Execute SQL Script object and ran the transformation. I get the following error: 2009/08/26 14:41:38 - Execute SQL script.0 - Connected to database... 2009/08/26 14:41:38 - Execute SQL script - ERROR (version 3.2.0-GA, build 10572 from 2009-05-12 08.45.26 by buildguy) : Error initializing step [Execute SQL script] 2009/08/26 14:41:38 - Execute SQL script - ERROR (version 3.2.0-GA, build 10572 from 2009-05-12 08.45.26 by buildguy) : java.lang.StringIndexOutOfBoundsException: String index out of range: 22 2009/08/26 14:41:38 - Execute SQL script - ERROR (version 3.2.0-GA, build 10572 from 2009-05-12 08.45.26 by buildguy) : at java.lang.String.charAt(Unknown Source) 2009/08/26 14:41:38 - Execute SQL script - ERROR (version 3.2.0-GA, build 10572 from 2009-05-12 08.45.26 by buildguy) : at org.pentaho.di.core.database.Database.execStatements(Database.java:1598) 2009/08/26 14:41:38 - Execute SQL script - ERROR (version 3.2.0-GA, build 10572 from 2009-05-12 08.45.26 by buildguy) : at org.pentaho.di.trans.steps.sql.ExecSQL.init(ExecSQL.java:280) 2009/08/26 14:41:38 - Execute SQL script - ERROR (version 3.2.0-GA, build 10572 from 2009-05-12 08.45.26 by buildguy) : at org.pentaho.di.trans.step.StepInitThread.run(StepInitThread.java:48) 2009/08/26 14:41:38 - Execute SQL script - ERROR (version 3.2.0-GA, build 10572 from 2009-05-12 08.45.26 by buildguy) : at java.lang.Thread.run(Unknown Source) 2009/08/26 14:41:38 - bug - ERROR (version 3.2.0-GA, build 10572 from 2009-05-12 08.45.26 by buildguy) : Step [Execute SQL script.0] failed to initialize! 2009/08/26 14:41:38 - Execute SQL script.0 - Finished reading query, closing connection. 2009/08/26 14:41:41 - BID - Connection to database closed! 2009/08/26 14:41:41 - bug - ERROR (version 3.2.0-GA, build 10572 from 2009-05-12 08.45.26 by buildguy) : Preparing transformation execution failed 2009/08/26 14:41:41 - bug - ERROR (version 3.2.0-GA, build 10572 from 2009-05-12 08.45.26 by buildguy) : org.pentaho.di.core.exception.KettleException: 2009/08/26 14:41:41 - bug - ERROR (version 3.2.0-GA, build 10572 from 2009-05-12 08.45.26 by buildguy) : We failed to initialize at least one step. Execution can not begin! 2009/08/26 14:41:41 - bug - ERROR (version 3.2.0-GA, build 10572 from 2009-05-12 08.45.26 by buildguy) : 2009/08/26 14:41:41 - bug - ERROR (version 3.2.0-GA, build 10572 from 2009-05-12 08.45.26 by buildguy) : 2009/08/26 14:41:41 - bug - ERROR (version 3.2.0-GA, build 10572 from 2009-05-12 08.45.26 by buildguy) : at org.pentaho.di.trans.Trans.prepareExecution(Trans.java:677) 2009/08/26 14:41:41 - bug - ERROR (version 3.2.0-GA, build 10572 from 2009-05-12 08.45.26 by buildguy) : at org.pentaho.di.ui.spoon.trans.TransGraph$25.run(TransGraph.java:3192) 2009/08/26 14:41:41 - bug - ERROR (version 3.2.0-GA, build 10572 from 2009-05-12 08.45.26 by buildguy) : at java.lang.Thread.run(Unknown Source) If I add the correct number of quotes like the following: /* "Test" */ , then no error occurs as expected.
    via by Michael Frysinger,
  • CLOB in BI Publisher Reports
    via by Guest_0607,
    • java.lang.StringIndexOutOfBoundsException: String index out of range: 22 at java.lang.String.charAt(Unknown Source) at org.pentaho.di.core.database.Database.execStatements(Database.java:1598) at org.pentaho.di.trans.steps.sql.ExecSQL.init(ExecSQL.java:280) at org.pentaho.di.trans.step.StepInitThread.run(StepInitThread.java:48) at java.lang.Thread.run(Unknown Source)

    Users with the same issue

    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    poroszd
    12 times, last one,
    olle.hallin
    1 times, last one,
    linxiaolong
    1 times, last one,
    30 more bugmates