Uploaded image for project: 'Pentaho Metadata'
  1. Pentaho Metadata
  2. PMD-1079

PME - Unable to reopen MQL.

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Severity: High
    • Resolution: Fixed
    • Affects Version/s: Master, 8.0.0 GA
    • Fix Version/s: 8.2.0 GA
    • Component/s: None
    • Story Points:
      2
    • 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.
    • Operating System/s:
      Ubuntu 14.x
    • Steps to Reproduce:
      Hide

      1. Open PME and create New Domain file.
      2. Create a connection default DB in hive or impala, test it, and click OK to close it. Choose all the tables and click OK.
      3. Create New Business Model and choose the created connection in it. Click OK.
      4. Create 2 Business tables:
      PT_SALES_FACT_1997
      PT_CUSTOMER
      5. Create Relationship using Customer_ID column.
      6. Right Click on Business Views - Manage Categories - Add Views for both tables.
      7. Open Query builder, add:
      Selected Columns: Fullname, Store Sales
      Condition: Unit Sales where Unit sales > 2
      Order by: FullName
      8. Run query and verify it works. Click on SQL button and check the correctness of SQL query, click on MQL button and check it shows the connect xml.
      9. Save the MQL, reset Query builder and try to reopen saved MQL.
      Expected Result:
      MQL Query should be reopened successfully.
      Actual Result:
      Error message:
      There was an error loading the metadata query!
      java.lang.NullPointerException

      Show
      1. Open PME and create New Domain file. 2. Create a connection default DB in hive or impala, test it, and click OK to close it. Choose all the tables and click OK. 3. Create New Business Model and choose the created connection in it. Click OK. 4. Create 2 Business tables: PT_SALES_FACT_1997 PT_CUSTOMER 5. Create Relationship using Customer_ID column. 6. Right Click on Business Views - Manage Categories - Add Views for both tables. 7. Open Query builder, add: Selected Columns: Fullname, Store Sales Condition: Unit Sales where Unit sales > 2 Order by: FullName 8. Run query and verify it works. Click on SQL button and check the correctness of SQL query, click on MQL button and check it shows the connect xml. 9. Save the MQL, reset Query builder and try to reopen saved MQL. Expected Result: MQL Query should be reopened successfully. Actual Result: Error message: There was an error loading the metadata query! java.lang.NullPointerException

      Description

      There is an error when trying to reopen MQL in query builder of PME.

      java.lang.NullPointerException
      	at org.pentaho.commons.metadata.mqleditor.editor.service.util.MQLEditorServiceCWMDelegate.convertModelToThin(MQLEditorServiceCWMDelegate.java:582)
      	at org.pentaho.commons.metadata.mqleditor.editor.OldSwtMqlEditor.setMqlQuery(OldSwtMqlEditor.java:158)
      	at org.pentaho.pms.ui.QueryBuilderDialog.openQuery(QueryBuilderDialog.java:446)
      	at org.pentaho.pms.ui.QueryBuilderDialog.access$100(QueryBuilderDialog.java:68)
      	at org.pentaho.pms.ui.QueryBuilderDialog$2.widgetSelected(QueryBuilderDialog.java:178)
      	at org.eclipse.swt.widgets.TypedListener.handleEvent(Unknown Source)
      	at org.eclipse.swt.widgets.EventTable.sendEvent(Unknown Source)
      	at org.eclipse.swt.widgets.Widget.sendEvent(Unknown Source)
      	at org.eclipse.swt.widgets.Display.runDeferredEvents(Unknown Source)
      	at org.eclipse.swt.widgets.Display.readAndDispatch(Unknown Source)
      	at org.eclipse.jface.window.Window.runEventLoop(Window.java:820)
      	at org.eclipse.jface.window.Window.open(Window.java:796)
      	at org.pentaho.pms.ui.MetaEditor.testQR(MetaEditor.java:3913)
      	at org.pentaho.pms.ui.MetaEditor$42.widgetSelected(MetaEditor.java:1305)
      	at org.eclipse.swt.widgets.TypedListener.handleEvent(Unknown Source)
      	at org.eclipse.swt.widgets.EventTable.sendEvent(Unknown Source)
      	at org.eclipse.swt.widgets.Widget.sendEvent(Unknown Source)
      	at org.eclipse.swt.widgets.Display.runDeferredEvents(Unknown Source)
      	at org.eclipse.swt.widgets.Display.readAndDispatch(Unknown Source)
      	at org.pentaho.pms.ui.MetaEditor.readAndDispatch(MetaEditor.java:876)
      	at org.pentaho.pms.ui.MetaEditor.main(MetaEditor.java:3737)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:497)
      	at org.pentaho.commons.launcher.Launcher.main(Launcher.java:92)
      
      12:11:16,513 ERROR [MQLQueryFactory] MQLQueryFactory.ERROR_0006 - Failed to invoke class org.pentaho.pms.mql.MQLQueryImpl
      java.lang.reflect.InvocationTargetException
      	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
      	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
      	at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
      	at org.pentaho.pms.mql.MQLQueryFactory.getMQLQuery(MQLQueryFactory.java:57)
      	at org.pentaho.pms.mql.MQLQueryFactory.getMQLQuery(MQLQueryFactory.java:41)
      	at org.pentaho.pms.ui.MetaEditor.loadQuery(MetaEditor.java:3965)
      	at org.pentaho.pms.ui.MetaEditor.<init>(MetaEditor.java:334)
      	at org.pentaho.pms.ui.MetaEditor.main(MetaEditor.java:3693)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:497)
      	at org.pentaho.commons.launcher.Launcher.main(Launcher.java:92)
      Caused by: java.lang.IllegalArgumentException: CWM.ERROR_0005 - CWM.getInstance's domainName parameter cannot be null.
      	at org.pentaho.pms.core.CWM.getInstance(CWM.java:511)
      	at org.pentaho.pms.core.CWM.getInstance(CWM.java:491)
      	at org.pentaho.pms.mql.MQLQueryImpl.fromXML(MQLQueryImpl.java:484)
      	at org.pentaho.pms.mql.MQLQueryImpl.fromXML(MQLQueryImpl.java:445)
      	at org.pentaho.pms.mql.MQLQueryImpl.<init>(MQLQueryImpl.java:126)
      	... 14 more
      

        Attachments

          Activity

            People

            Assignee:
            ooliveira Octavio Oliveira
            Reporter:
            pmikhnevich Pavel Mikhnevich (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: