Pentaho Analysis - Mondrian
  1. Pentaho Analysis - Mondrian
  2. MONDRIAN-397

Connect string parser gives StringIndexOutOfBoundsException

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Severe Severe
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Notice:
      When an issue is open, the "Fix Version/s" field conveys a target, not necessarily a commitment. When an issue is closed, the "Fix Version/s" field conveys the version that the issue was fixed in.

      Description

      When passing an invalid ConnectionString, mondrian dies with a StringIndexOutOfBoundsException. I dont mind that it crashes, but it should give a checked Exception that makes more sense to the user. Such low-level exceptions like StringIndexOutOfBounds should be caught by mondrian and transformed into a Mondrian-Specific exception.


       <java.lang.StringIndexOutOfBoundsException: String index out of range: 223>java.lang.StringIndexOutOfBoundsException: String index out of range: 223
       at java.lang.String.charAt(String.java:687)
       at mondrian.olap.Util$ConnectStringParser.parseName(Util.java:1646)
       at mondrian.olap.Util$ConnectStringParser.parsePair(Util.java:1627)
       at mondrian.olap.Util$ConnectStringParser.parse(Util.java:1619)
       at mondrian.olap.Util.parseConnectString(Util.java:1598)
       at mondrian.olap.DriverManager.getConnection(DriverManager.java:54)

        Activity

        Hide
        Mondrian Importer User added a comment -
        {taqua}, 04/08/2008: IP, Artifact Created: 64.132.248.34 |
        {jhyde}, 04/08/2008: IP, Comment Added: 66.92.12.96 |
        {nobody}, 04/08/2008: IP, Comment Added: 207.59.58.130 |
        {jhyde}, 04/09/2008: IP, Comment Added: 66.92.12.96 |
        {jhyde}, 04/09/2008: status_id, 1 |
        {jhyde}, 04/09/2008: resolution_id, 100 |
        {jhyde}, 04/09/2008: assigned_to, 100 |
        {jhyde}, 04/09/2008: summary, StringIndexOutOfBoundsException instead of a meaninful error |
        {jhyde}, 04/09/2008: close_date, 0
        Show
        Mondrian Importer User added a comment - {taqua}, 04/08/2008: IP, Artifact Created: 64.132.248.34 | {jhyde}, 04/08/2008: IP, Comment Added: 66.92.12.96 | {nobody}, 04/08/2008: IP, Comment Added: 207.59.58.130 | {jhyde}, 04/09/2008: IP, Comment Added: 66.92.12.96 | {jhyde}, 04/09/2008: status_id, 1 | {jhyde}, 04/09/2008: resolution_id, 100 | {jhyde}, 04/09/2008: assigned_to, 100 | {jhyde}, 04/09/2008: summary, StringIndexOutOfBoundsException instead of a meaninful error | {jhyde}, 04/09/2008: close_date, 0
        Hide
        Mondrian Importer User added a comment -
        {jhyde}, 04/08/2008: Logged In: YES
        user_id=312935
        Originator: NO

        I totally agree. What was the string, Thomas? Obfuscate if you need to. :)
        Show
        Mondrian Importer User added a comment - {jhyde}, 04/08/2008: Logged In: YES user_id=312935 Originator: NO I totally agree. What was the string, Thomas? Obfuscate if you need to. :)
        Hide
        Mondrian Importer User added a comment -
        {nobody}, 04/08/2008: Logged In: NO

        Simple (hehe, after some debugging): take any string and let it end in a ";".

        provider=mondrian; JdbcDrivers=org.hsqldb.jdbcDriver; Jdbc=jdbc:hsqldb:./sql/sampledata; Catalog=C:\cygwin\home\src\jfreereport\engines\classic\extensions-mondrian\demo\steelwheels.mondrian.xml; JdbcUser=sa; JdbcPassword=;

        (JdbcPassword is an empty string. This is based on the schema and HSQL-Database from the Pentaho-Demo.)
        Show
        Mondrian Importer User added a comment - {nobody}, 04/08/2008: Logged In: NO Simple (hehe, after some debugging): take any string and let it end in a ";". provider=mondrian; JdbcDrivers=org.hsqldb.jdbcDriver; Jdbc=jdbc:hsqldb:./sql/sampledata; Catalog=C:\cygwin\home\src\jfreereport\engines\classic\extensions-mondrian\demo\steelwheels.mondrian.xml; JdbcUser=sa; JdbcPassword=; (JdbcPassword is an empty string. This is based on the schema and HSQL-Database from the Pentaho-Demo.)
        Hide
        Mondrian Importer User added a comment -
        {jhyde}, 04/09/2008: Logged In: YES
        user_id=312935
        Originator: NO

        Even a semicolon isn't enough - needs to be a semicolon followed by a space.

        Fixed in change 10843, will be in mondrian-3.0.3 or mondrian-3.1. Also fixed corresponding code in olap4j code base.
        Show
        Mondrian Importer User added a comment - {jhyde}, 04/09/2008: Logged In: YES user_id=312935 Originator: NO Even a semicolon isn't enough - needs to be a semicolon followed by a space. Fixed in change 10843, will be in mondrian-3.0.3 or mondrian-3.1. Also fixed corresponding code in olap4j code base.

          People

          • Assignee:
            Julian Hyde
            Reporter:
            taqua
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: