Uploaded image for project: 'Calcite'
  1. Calcite
  2. CALCITE-665

ClassCastException in MongoDB adapter

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.1.0-incubating
    • Fix Version/s: 1.4.0-incubating
    • Component/s: None
    • Labels:
      None
    • Environment:

      Windows x64, MongoDB , JDK 1.7

      Description

      When using with Mondrian 4.2 and With MongoDB (foodmart data),
      The following exception is raised.

      Exception in thread "main" java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.Long
      at org.apache.calcite.avatica.util.AbstractCursor$LongAccessor.getLong(AbstractCursor.java:483)
      at org.apache.calcite.avatica.util.AbstractCursor$AccessorImpl.getInt(AbstractCursor.java:252)
      at org.apache.calcite.avatica.AvaticaResultSet.getInt(AvaticaResultSet.java:248)
      at org.apache.commons.dbcp.DelegatingResultSet.getInt(DelegatingResultSet.java:225)
      at org.apache.commons.dbcp.DelegatingResultSet.getInt(DelegatingResultSet.java:225)
      at mondrian.spi.impl.SqlStatisticsProvider.getTableCardinality(SqlStatisticsProvider.java:52)
      at mondrian.rolap.RolapSchema$PhysStatistic.getTableCardinality(RolapSchema.java:2888)
      at mondrian.rolap.RolapSchema$PhysStatistic.getRelationCardinality(RolapSchema.java:2860)
      at mondrian.rolap.RolapSchema$PhysTable.populateColumns(RolapSchema.java:1859)
      at mondrian.rolap.RolapSchema$PhysRelationImpl.ensurePopulated(RolapSchema.java:1519)
      at mondrian.rolap.RolapSchema$PhysTable.ensurePopulated(RolapSchema.java:1729)
      at mondrian.rolap.RolapSchemaUpgrader.toPhysRelation(RolapSchemaUpgrader.java:1866)
      at mondrian.rolap.RolapSchemaUpgrader.convertCube(RolapSchemaUpgrader.java:179)
      at mondrian.rolap.RolapSchemaUpgrader.convertSchema(RolapSchemaUpgrader.java:2208)
      at mondrian.rolap.RolapSchemaUpgrader.upgrade(RolapSchemaUpgrader.java:125)
      at mondrian.rolap.RolapSchemaLoader.loadStage0(RolapSchemaLoader.java:254)
      at mondrian.rolap.RolapSchemaLoader.createSchema(RolapSchemaLoader.java:4303)
      at mondrian.rolap.RolapSchemaPool.get(RolapSchemaPool.java:210)
      at mondrian.rolap.RolapSchemaPool.get(RolapSchemaPool.java:62)
      at mondrian.rolap.RolapConnection.<init>(RolapConnection.java:160)
      at mondrian.rolap.RolapConnection.<init>(RolapConnection.java:84)
      at mondrian.olap.DriverManager.getConnection(DriverManager.java:112)
      at mondrian.olap.DriverManager.getConnection(DriverManager.java:68)
      at mondrian.olap.DriverManager.getConnection(DriverManager.java:50)
      at ....

        Attachments

          Activity

            People

            • Assignee:
              julianhyde Julian Hyde
              Reporter:
              nareshjois Naresh Jois
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: