Pentaho Analysis - Mondrian
  1. Pentaho Analysis - Mondrian
  2. MONDRIAN-524

VB functions: expected primitive type, got java.lang.Object

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Severe Severe
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.1 GA
    • Component/s: None
    • Labels:
      None
    • Notice:
      When an issue is open, the "Fix Version/s" field conveys a target, not necessarily a commitment. When an issue is closed, the "Fix Version/s" field conveys the version that the issue was fixed in.

      Description

      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
      earlier.



      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:

      [quote]

          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?

      [/quote]


      Cheers

        Activity

        Hide
        Mondrian Importer User added a comment -
        {pmgalves}, 04/02/2009: IP, Artifact Created: 85.242.76.38
        Show
        Mondrian Importer User added a comment - {pmgalves}, 04/02/2009: IP, Artifact Created: 85.242.76.38
        Hide
        Julian Hyde added a comment -
        Fixed in change 12581. Will be in 3.1.1.
        Show
        Julian Hyde added a comment - Fixed in change 12581. Will be in 3.1.1.

          People

          • Assignee:
            Julian Hyde
            Reporter:
            pmgalves
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: