campariorange - 2013-05-30

Hi,
i am new to MDX and olap4j. I face a problem for which I haven't found any help in the net yet. I use olap4hj version 1.1.0.

I have a cube with following dimension, hierarchies, levels and members

time
   by_year
     Day Name
        20000101
        ...
     ...
   by_month
     Day Name
        20000101
        ...
     ...
   by_week
     Day Name
        20000101
        ...
     ...
...

I try to execute an MDX query with following WHERE clause

WHERE (
    {..},
    {..},
    {[time].[Day Name].&[20130526]} 
)

Here the hierarchy is omitted. Full version could be:

 [time].[by_year].[Day Name].&[20130526]

The original query works in SQL Studio / SSAS directly. It uses the first hierarchy it can find in the dimension. Olap4j raises an error because it seems to be unable to resolve the default hierarchy. When building the metadata for the response, it fails because it compares the hierarchy information of the current response with the previously fetched hierarchy information:

org.olap4j.OlapException: Internal error: hierarchy '[time].[Day Name]' not found in cube 'xyz_cube'
at org.olap4j.driver.xmla.XmlaHelper.createException(XmlaHelper.java:35)
at org.olap4j.driver.xmla.XmlaOlap4jCellSet.lookupHierarchy(XmlaOlap4jCellSet.java:553)
at org.olap4j.driver.xmla.XmlaOlap4jCellSet.createMetaData(XmlaOlap4jCellSet.java:448)
at org.olap4j.driver.xmla.XmlaOlap4jCellSet.populate(XmlaOlap4jCellSet.java:181)
at org.olap4j.driver.xmla.XmlaOlap4jStatement.executeOlapQuery(XmlaOlap4jStatement.java:372)

Is there a way to get this query running as it is? I am unfortunately not in the position to change the query.