[Mondrian] mondrian.rolap.RolapMemberBase cannot be cast tomondrian.rolap.RolapCubeMember

Martijn van den Broek mjbroek at gmail.com
Thu Nov 25 06:55:47 EST 2010


It seems the bug is easy reproducable on Foodmart with XMLA. Notice that
this is only over XMLA, doing this from JPivot shows the correct result
without errors.

1. To reproduce the error setup the XMLA service. I used MySQL and only
changed the connection string in datasources.xml:
<DataSourceInfo>Provider=mondrian;JdbcDrivers=com.mysql.jdbc.Driver;Jdbc=jdbc:mysql://localhost:3306/foodmart?user=root&amp;password=fixme;</DataSourceInfo>

2. Go to the XMLA test page:  http://localhost:8080/mondrian/xmlaTest.jsp
3. Select "4. executeHR"
4. Paste the following:

<Execute xmlns="urn:schemas-microsoft-com:xml-analysis">
  <Command>
    <Statement>
    SELECT
    NON EMPTY (CROSSJOIN({[Store].Children}, {[Product].Children})) ON
COLUMNS,
    {[Customers].Children} ON ROWS
    FROM [Sales]
    WHERE {[Measures].[Unit Sales]}
    </Statement>
  </Command>
  <Properties>
    <PropertyList>
      <Catalog>FoodMart</Catalog>

 <DataSourceInfo>Provider=Mondrian;DataSource=MondrianFoodMart;</DataSourceInfo>
      <Format>Multidimensional</Format>
      <AxisFormat>TupleFormat</AxisFormat>
    </PropertyList>
  </Properties>
</Execute>

4. Submit and you should see the exception:
SOAP-ENV:Server.00HSBE03 XMLA Execute unparse results error Mondrian
00HSBE03 The Mondrian XML: mondrian.rolap.RolapMemberBase cannot be cast to
mondrian.rolap.RolapCubeMember

At this point all XMLA queries accessing the broken dimensions will give the
error. The service needs to be reloaded.

I noticed the issue occurs when 'NON EMPTY' is used in combination with a
CROSSJOIN. If the query is executed _without_ 'NON EMPTY' it gives result.
If then the query _with_ 'NON EMPTY' is executed it does give correct
results.



On Mon, Nov 22, 2010 at 5:24 PM, Martijn van den Broek <mjbroek at gmail.com>wrote:

> Attached is some more debug info with backtrace from when the request is
> received till the exception occurs. I hope anyone can help us identifying
> the problem.
>
>
> On Fri, Nov 19, 2010 at 11:10 AM, Martijn van den Broek <mjbroek at gmail.com
> > wrote:
>
>> Ok i managed to reproduce various times on different platforms using the
>> following instructions. I hope you have time to check it out and give us
>> feedback what we are doing wrong.. or is it a bug?
>>
>> * Download and unzip
>> http://ws1.clusterix.basesoft.com/~martijn/mondrian/testcase.zip
>> * If not done already install tomcat, mondrian and libmysql-java (mysql
>> jdbc)
>> * If not done already install mysql jdbc driver into tomcat.. for ubuntu
>> this is:
>>   cp /usr/share/java/mysql-connector-java.jar /var/lib/tomcat6/lib/
>> * Import turnover.sql into mysql:
>>   cat turnover.sql | mysql -u root -p
>> * Copy (or edit) datasources.xml from testcase to mondrian (be sure to set
>> the correct database password):
>>   cp datasources.xml
>> /var/lib/tomcat-6/webapps/mondrian/WEB-INF/datasources.xml
>> * Copy turnover cube to mondrian:
>>   cp turnover.xml
>> /var/lib/tomcat-6/webapps/mondrian/WEB-INF/queries/turnover.xml
>> * Restart tomcat or reload datasources
>> * Run testcase a few times:
>>   python test_xmla.py
>>
>> That should give the output:
>> exception: The Mondrian XML: mondrian.rolap.RolapMemberBase cannot be cast
>> to mondrian.rolap.RolapCubeMember (code: 00HSBE03)
>>
>>
>> On Thu, Nov 18, 2010 at 5:12 PM, Martijn van den Broek <mjbroek at gmail.com
>> > wrote:
>>
>>> Yeah first thing we tried. It seems the same message indeed. However we
>>> have either explicit or default set the
>>> mondrian.rolap.EnableRolapCubeMemberCache=true in properties.
>>>
>>> Is there anything else we can try? How can I give more debug information?
>>> I'm still trying to get a testcase together that demonstrates the issue.
>>>
>>>
>>> On Thu, Nov 18, 2010 at 4:55 PM, Julian Hyde <jhyde at pentaho.com> wrote:
>>>
>>>>  Did you search jira for this issue? There are similar ones, e.g.
>>>> http://jira.pentaho.com/browse/MONDRIAN-762
>>>>
>>>>  ------------------------------
>>>> *From:* mondrian-bounces at pentaho.org [mailto:
>>>> mondrian-bounces at pentaho.org] *On Behalf Of *Martijn van den Broek
>>>> *Sent:* Thursday, November 18, 2010 12:49 AM
>>>> *To:* mondrian at pentaho.org
>>>> *Subject:* [Mondrian] mondrian.rolap.RolapMemberBase cannot be cast
>>>> tomondrian.rolap.RolapCubeMember
>>>>
>>>> Hello,
>>>>
>>>> We are running a mondrian server with multiple datasources configured.
>>>> The XMLA protocol is used to execute MDX queries against mondrian with a
>>>> simple HTTP client written in python. This all works really well till at
>>>> some point the mondrian server wont execute anymore and returns with the
>>>> following exception:
>>>>
>>>> mondrian.rolap.RolapMemberBase cannot be cast to
>>>> mondrian.rolap.RolapCubeMember (code: 00HSBE03)
>>>>
>>>> From that point on we cannot execute the same MDX over XMLA till we
>>>> clear the mondrian cache and restart the tomcat server. While XMLA is still
>>>> broken we can however execute the MDX successfully in JPivot. Does this mean
>>>> its a XMLA problem? Another thing we noticed is that some dimensions are not
>>>> accessable anymore if we execute MDSCHEMA_HIERARCHIES.
>>>>
>>>> The WEB-INF/mondrian.properties has the default config and changing the
>>>> 'mondrian.rolap.EnableRolapCubeMemberCache' to true or false doesnt change
>>>> the behaviour.
>>>>
>>>> We are working on a testcase to reproduce the problem but it seems very
>>>> hard to trigger. Any suggestions on how to debug this issue are welcome.
>>>> Thanks in advance.
>>>>
>>>>
>>>> --
>>>> Martijn van den Broek
>>>>
>>>>
>>>> _______________________________________________
>>>> Mondrian mailing list
>>>> Mondrian at pentaho.org
>>>> http://lists.pentaho.org/mailman/listinfo/mondrian
>>>>
>>>>
>>>
>>>
>>> --
>>> Martijn van den Broek
>>>
>>
>>
>>
>> --
>> Martijn van den Broek
>>
>
>
>
> --
> Martijn van den Broek
>



-- 
Martijn van den Broek
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.pentaho.org/pipermail/mondrian/attachments/20101125/c81b9e7e/attachment.html 


More information about the Mondrian mailing list