I am trying to connect to a SAP Hana XMLA service using olap4j.
I am able to create connection and access the dimension members & Hierarchies.
But when i am trying to execute any olap query it is giving error.
--------Dimensions(AN_ARTICLE_FACT1)------
Measures
AT_ARTICLE
AT_OUTLET
AT_COLOR
AT_CALENDER
--------MDX Query--------
SELECT
{[AT_CALENDER].[Hie_Year].[All].[(all)]} ON COLUMNS,
{[AT_OUTLET].[Hie_state].[All].[(all)]} ON ROWS
FROM [AN_ARTICLE_FACT1]
---------------------
org.olap4j.OlapException: Internal error: hierarchy 'AT_CALENDER].[Hie_Year' not found in cube 'AN_ARTICLE_FACT1'
at org.olap4j.driver.xmla.XmlaHelper.createException(XmlaHelper.java:38)
at org.olap4j.driver.xmla.XmlaOlap4jCellSet.lookupHierarchy(XmlaOlap4jCellSet.java:555)
at org.olap4j.driver.xmla.XmlaOlap4jCellSet.createMetaData(XmlaOlap4jCellSet.java:450)
at org.olap4j.driver.xmla.XmlaOlap4jCellSet.populate(XmlaOlap4jCellSet.java:184)
at org.olap4j.driver.xmla.XmlaOlap4jStatement.executeOlapQuery(XmlaOlap4jStatement.java:353)
at org.olap4j.driver.xmla.XmlaOlap4jStatement.executeOlapQuery(XmlaOlap4jStatement.java:362)
at org.olap4j.query.Query.execute(Query.java:302)
at ConnectClass.main(ConnectClass.java:56)
-----------------
I am not able to understand where is the error.
As i try to run the generated MDX query using the SAP Hana Studio it is working fine.
I tried some other mdx queries also which are working fine in Hana but giving similar issue
i.e it's removing starting and end bracket "[" of Member Name and giving error member not found.
Please suggest me where i am doing it wrong.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I am trying to connect to a SAP Hana XMLA service using olap4j.
I am able to create connection and access the dimension members & Hierarchies.
But when i am trying to execute any olap query it is giving error.
Please check my class
Code:
public class ConnectClass {
}
----------------- OUTPUT ---------
--------Dimensions(AN_ARTICLE_FACT1)------
Measures
AT_ARTICLE
AT_OUTLET
AT_COLOR
AT_CALENDER
--------MDX Query--------
SELECT
{[AT_CALENDER].[Hie_Year].[All].[(all)]} ON COLUMNS,
{[AT_OUTLET].[Hie_state].[All].[(all)]} ON ROWS
FROM [AN_ARTICLE_FACT1]
---------------------
org.olap4j.OlapException: Internal error: hierarchy 'AT_CALENDER].[Hie_Year' not found in cube 'AN_ARTICLE_FACT1'
at org.olap4j.driver.xmla.XmlaHelper.createException(XmlaHelper.java:38)
at org.olap4j.driver.xmla.XmlaOlap4jCellSet.lookupHierarchy(XmlaOlap4jCellSet.java:555)
at org.olap4j.driver.xmla.XmlaOlap4jCellSet.createMetaData(XmlaOlap4jCellSet.java:450)
at org.olap4j.driver.xmla.XmlaOlap4jCellSet.populate(XmlaOlap4jCellSet.java:184)
at org.olap4j.driver.xmla.XmlaOlap4jStatement.executeOlapQuery(XmlaOlap4jStatement.java:353)
at org.olap4j.driver.xmla.XmlaOlap4jStatement.executeOlapQuery(XmlaOlap4jStatement.java:362)
at org.olap4j.query.Query.execute(Query.java:302)
at ConnectClass.main(ConnectClass.java:56)
-----------------
I am not able to understand where is the error.
As i try to run the generated MDX query using the SAP Hana Studio it is working fine.
I tried some other mdx queries also which are working fine in Hana but giving similar issue
i.e it's removing starting and end bracket "[" of Member Name and giving error member not found.
Please suggest me where i am doing it wrong.
Looks like a bug in olap4j's XmlaOlap4jCellSet.lookupHierarchy. It is
getting confused by the brackets.
Luc
Thanks for replying..
Is there any workaround to run mdx??
Last edit: Nox Bakht 2013-09-25
Hello:
Did you find the solution to this problem yet?