Uploaded image for project: 'Pentaho Analysis - Mondrian'
  1. Pentaho Analysis - Mondrian
  2. MONDRIAN-2381

NullPointerException in parent-child hierarchy with closure

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Severity: High
    • Resolution: Incomplete
    • Affects Version/s: 4.0.0 (5.1.0 GA Suite Release)
    • Fix Version/s: Backlog - Mondrian 4.0
    • Component/s: None
    • Labels:
      None
    • Story Points:
      0
    • 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

      In 4.3.0.1-130, as soon as I add a closure table to parent-child hierarchy, Mondrian crashes in schema reader with NullPointerException. As far as I remember I was running into the same issue with 4.2.

      Stacktrace:

      Exception in thread "main" java.lang.NullPointerException
      at mondrian.rolap.RolapSchema$PhysPathBuilder.<init>(RolapSchema.java:2554)
      at mondrian.rolap.RolapSchemaLoader.registerExpr(RolapSchemaLoader.java:2219)
      at mondrian.rolap.RolapSchemaLoader.registerAttribute(RolapSchemaLoader.java:2165)
      at mondrian.rolap.RolapSchemaLoader.registerLevel(RolapSchemaLoader.java:2150)
      at mondrian.rolap.RolapSchemaLoader.registerHierarchy(RolapSchemaLoader.java:2139)
      at mondrian.rolap.RolapSchemaLoader.registerDimension(RolapSchemaLoader.java:2127)
      at mondrian.rolap.RolapSchemaLoader.createCube(RolapSchemaLoader.java:1907)
      at mondrian.rolap.RolapSchemaLoader.sharedDimension(RolapSchemaLoader.java:3062)
      at mondrian.rolap.RolapSchemaLoader.access$500(RolapSchemaLoader.java:62)
      at mondrian.rolap.RolapSchemaLoader$5.apply(RolapSchemaLoader.java:2731)
      at mondrian.rolap.RolapSchemaLoader.loadStage2(RolapSchemaLoader.java:426)
      at mondrian.rolap.RolapSchemaLoader.loadStage1(RolapSchemaLoader.java:336)
      at mondrian.rolap.RolapSchemaLoader.loadStage0(RolapSchemaLoader.java:272)
      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.olap4j.MondrianOlap4jConnection.<init>(MondrianOlap4jConnection.java:153)
      at mondrian.olap4j.FactoryJdbc4Plus$AbstractConnection.<init>(FactoryJdbc4Plus.java:323)
      at mondrian.olap4j.FactoryJdbc41Impl$MondrianOlap4jConnectionJdbc41.<init>(FactoryJdbc41Impl.java:118)
      at mondrian.olap4j.FactoryJdbc41Impl.newConnection(FactoryJdbc41Impl.java:32)
      at mondrian.olap4j.MondrianOlap4jDriver.connect(MondrianOlap4jDriver.java:139)
      at java.sql.DriverManager.getConnection(DriverManager.java:664)
      at java.sql.DriverManager.getConnection(DriverManager.java:270)
      at Tester.main(Tester.java:25)

      Relevant pieces of schema:

      <Table name="organization_dimension_closure" alias="organization_dimension_closure"></Table>
      
      <Level
              name="Organization Unit"
              visible="true"
              attribute="Organization Unit"
              parentAttribute="Organization Unit$Parent"
              nullParentValue="null"
              hideMemberIf="Never">
          <Closure
                  parentColumn="ancestor_key"
                  childColumn="descendant_key"
                  distanceColumn="distance"
                  table="organization_dimension_closure">
          </Closure>
      </Level>
      

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            trzmiel Konrad Garus
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: