Model is not initialized

2008-06-10
2013-04-15
  • Cetin Akbulut

    Cetin Akbulut - 2008-06-10

    Hello together,

    when I try to execute a mdx query in the mdx editor of JRubik I always get the message:

    Model is not initialized

    How can I initialize the model?

    Best regards
    cakbulut

     
    • Felix Saz

      Felix Saz - 2008-06-10

      Try:
      String dataSourceInfo="Provider=mondrian;Jdbc=jdbc:derby:data/resources/derby/foodmart; JdbcDriver=org.apache.derby.jdbc.EmbeddedDriver;JdbcUser=foodmart;JdbcPassword=foodmart;PoolNeeded=false; Catalog=file:data/resources/catalogs/FoodMart.xml";
                  String query= "SELECT\n"
                         +"{[Measures].[Unit Sales]} ON COLUMNS,\n"
                         +"{[Customers].[All Customers]} ON ROWS\n"
                         +"FROM Sales";
                  RubikConnection rc=new RubikConnection(dataSourceInfo);
                  try {
                      MdxExecutor.executeMdx(new RubikMdx(query, rc));
                  } catch (Exception e1) {
                      e1.printStackTrace();
                  }

       
    • Cetin Akbulut

      Cetin Akbulut - 2008-06-10

      Dear Felix,

      How I use this code?

      Best regrads
      cakbulut

       
    • Felix Saz

      Felix Saz - 2008-06-10

      In the es.aeat.eett.rubik.mdx plugin:
      the class es.aeat.eett.rubik.mdx.MainMdx implements ModelChangeListener.

      this code save the last query valid;
      RubikMdx lastQuery;
      if(MdxExecutor.isModelInitialized(olapModel)){
          lastQuery=MdxExecutor.getRubikMdx(OlapModelManager
                  .getInstance().getDefaultModel());
      }
      and this code restore the query;

      try {
      MdxExecutor.executeMdx(lastQuery);
      } catch (Exception e1) {
      e1.printStackTrace();
      }

       
    • Cetin Akbulut

      Cetin Akbulut - 2008-06-10

      Dear Felix,

      now its work, and I can start with the debuging.

      Can you say me where I sholt start, when I want extract the Pivot table and the mdx generator.

      Best regards
      cakbulut

       
    • Felix Saz

      Felix Saz - 2008-06-10

      -The pivot table is in es.aeat.eett.rubik.tableRubik plugin.
      The entry poin is es.aeat.eett.rubik.tableRubik.TableRubikPlugin
      Take a look on JRubik_Olap4j_laboratory, In this version there are many improvements.

      -the mdx generator work like jpivot
      OlapModel olapModel=OlapModelManager.getInstance().getDefaultModel();
      Sample1: MdxQuery mdx=(MdxQuery)olapModel.getExtension(MdxQuery.ID);
      Sample other: olapModel.getExtension(otherJpivot.ID);

       
    • Cetin Akbulut

      Cetin Akbulut - 2008-06-11

      Dear Felix,

      can you say me which event handler in which class is called when the user clicks on the drill-position-expand or drill-position-collapsed icon in the table?

      Best regards
      cakbulut

       
    • Cetin Akbulut

      Cetin Akbulut - 2008-06-11

      Dear Felix,

      I think I have found the handler for the mouse click. It is in the CellAdapter class.

      The point which I still have not understanden is when and where JRubik creates the new mdx after an user interaction.

      I think after a mouse click (drill down, drill up) the new MDX must generate. But during the debugging I cannot see code,
      which do the MDX generation after a mouse click.

      So my question is where JRubik generates or call the mdx generator after an user interaction (drill down, drill up).

      Best regards
      cakbulut

       
    • Felix Saz

      Felix Saz - 2008-06-11

      Plugin: es.aeat.eett.rubik.core
      class: es.aeat.eett.rubik.core.Navigator

      Felix.

       
    • Cetin Akbulut

      Cetin Akbulut - 2008-06-11

      Dear Felix,

      is one of the targets in the new version of JRubik to make JRubik indenpendent of JPivot with the help of olap4j?

      Which API you would use when you had a project, where you need a xml generator and a pivot table?

      Is it a good idea to use JRubik 0.9.4 as base or would you implement all functinalities with the help of olap4j?

      Best regards
      cakbulut

       
    • Cetin Akbulut

      Cetin Akbulut - 2008-06-12

      sorrz, I mean mdx generator.

      Best regards
      cakbulut

       
    • Felix Saz

      Felix Saz - 2008-06-12

      Hello cakbulut,

      ->is one of the targets in the new version of JRubik to make JRubik indenpendent of JPivot with the help of olap4j?
      Yes , the main goal is to use olap4j instead of jpivot API.
      ->Which API you would use when you had a project, where you need a xml generator and a pivot table?
      In order to use a pivot table with an XML generator you could use the tool you want but in Jrubik_olap4j_laboratory is not supported XML generation.
      Take a look on jpivot project: package com.tonbeller.jpivot.table (TableComponent.java, etc)
      ->Is it a good idea to use JRubik 0.9.4 as base or would you implement all functinalities with the help of olap4j?
      We are going to develop with olap4j.

      Felix.

       
    • Cetin Akbulut

      Cetin Akbulut - 2008-06-12

      Dear Felix,

      in my second question in my last post I have written XML instead of MDX. I meant:
      Which API you would use when you had a project, where you need a MDX generator and a pivot table? (Sorry)

      If you want just use olap4j for JRubik, that means that you cannot use the MDX Generation classes of JPivot.
      In the specification of olap4j packages for MDX transformation are intend. But the transformation package in olap4j is not implement until now.

      So we think about to write an open source MDX generator on base of olap4j, like JPivots generator.

      Do you know developer who do similar things, with which we can work together?
      Have you got an idea of  the effort, for developing a MDX generator?

      Best regards
      Cetin

       
    • Felix Saz

      Felix Saz - 2008-06-13

        For MDX transformation and generation the correct API is Olap4j (search the sourecforge project). This is an emerging project and is a very good moment for putting there your ideas.
        We think that this standar is currently in development but we think that this is the correct way. We are experimenting in the layout layer of the Olap4j API that is in the Jrubik_olap4j_laboratory JRubik version.

       

Log in to post a comment.