[Mondrian] Internal error: expected primitive type, got class java.lang.Obje

Pedro Alves pedro at neraka.no-ip.org
Wed Apr 1 14:42:20 EDT 2009

I know this isn't a users list, but I can't get my head around this; 

I can't use most of the VB / utility functions in the mondrian docs due to
this error:

mondrian.olap.MondrianException: Mondrian Error:Internal error: expected
primitive type, got class java.lang.Object

And I'm talking about simple stuff like Cast(Int(([Measures].[Sales]/3600))
as String)  or every datetime function over a measure that I have defined

Am I doing something dead wrong?

Seems I'm not the only one:
http://forums.pentaho.org/showthread.php?p=210894 , as he even investigated
it in the source code:


    I did some digging in to the mondrian source code and found out a few
    things. The method throwing the exception is
    mondrian/olap/fun/JavaFunDef.java:160 compileTo().

    I believe the reason it's throwing an exception is that cDate() from
    mondrian/fun/vba/Vba.java:67 takes a java.lang.Object as an argument and
    not one of the types listed in compileTo().

    Perhaps there is a way to modify compileTo() so that it accepts a generic
    object type? 



Pedro Alves

More information about the Mondrian mailing list