mysticfall / pivot4j

Pivot4J provides a common API for OLAP servers which can be used to build an analytical service frontend with pivot style GUI.
Other
128 stars 101 forks source link

Ragged hierarchy in Essbase/XMLA gives IndexOutOfBounds exception #156

Open mysticfall opened 10 years ago

mysticfall commented 10 years ago

Using ragged members with Essbase backend(XMLA) gives an IndexOutOfBounds exception.

The stacktrace is as follows:

Caused by: java.lang.IndexOutOfBoundsException: toIndex = 2
    at java.util.ArrayList.subListRangeCheck(ArrayList.java:962)
    at java.util.ArrayList.subList(ArrayList.java:954)
    at java.util.Collections$UnmodifiableRandomAccessList.subList(Collections.java:1286)
    at com.eyeq.pivot4j.util.RaggedMemberWrapper.<init>(RaggedMemberWrapper.java:79)
    at com.eyeq.pivot4j.util.OlapUtils.wrapRaggedIfNecessary(OlapUtils.java:173)
    at com.eyeq.pivot4j.query.QuaxUtil.expForMember(QuaxUtil.java:566)
    at com.eyeq.pivot4j.query.Quax.addToPosTree(Quax.java:345)
    at com.eyeq.pivot4j.query.Quax.addToPosTree(Quax.java:360)
    at com.eyeq.pivot4j.query.Quax.initPositions(Quax.java:266)
    at com.eyeq.pivot4j.query.Quax.initialize(Quax.java:211)
    at com.eyeq.pivot4j.query.QueryAdapter.afterExecute(QueryAdapter.java:670)
    at com.eyeq.pivot4j.impl.PivotModelImpl.getCellSet(PivotModelImpl.java:487)

It seems that either Essbase or Mondrian has a very peculiar rule regarding the unique name of a ragged member.