Hitachi Vantara Pentaho Community Forums
Results 1 to 5 of 5

Thread: ERROR Give me a real type.

  1. #1
    Join Date
    Jul 2010
    Posts
    13

    Default ERROR Give me a real type.

    Hi all,

    I am using biserver-ce-3.6.0-stable.tar.gz on Linux and Mysql 5.
    I design a report using PRD3.6, and the report works fine when executed on the PRD application.

    however, when I publish it to the server, and try to execute it, I get the following error:

    ERROR [org.pentaho.reporting.platform.plugin.ReportContentGenerator] Give me a real type.
    java.lang.ClassCastException: Give me a real type.

    Any help will be appreciated, specially one that solves this problem

    regards,
    Martin

  2. #2
    Join Date
    Mar 2003
    Posts
    8,085

    Default

    This error comes up when the declared type of a parameter does not match the value that is given.

    The most likely source: you use a database driven parameter and declared it to be of one type (lets say int) and it actually comes back as another type (string, or double, etc).

    Give me a full stacktrace (you find that in the logs) and I can tell you exactly what went wrong.
    Get the latest news and tips and tricks for Pentaho Reporting at the Pentaho Reporting Blog.

  3. #3
    Join Date
    Jul 2010
    Posts
    13

    Default ERROR Give me a real type.

    Please find the pentaho.log file attached to this message.

    regards,
    Martin
    Attached Files Attached Files

  4. #4
    Join Date
    Jul 2010
    Posts
    13

    Default

    by the way,

    here is the SQL Query for my parameters

    SELECT
    sum(`hec_sva`.`monto`) AS montoTotal,
    count(`hec_sva`.`cantidad`) AS cantidadTotal,
    `dim_sello`.`nombre` AS sello,
    `dim_fecha`.`fecha` as fecha
    FROM
    `dim_sello` INNER JOIN `hec_sva` ON `dim_sello`.`id` = `hec_sva`.`sello_id`
    INNER JOIN `dim_fecha` ON `hec_sva`.`fecha_id` = `dim_fecha`.`id`
    WHERE
    `dim_sello`.`id` IN (${sello_param})
    AND `dim_fecha`.`fecha` BETWEEN ${fecha_param1} AND ${fecha_param2}
    GROUP BY
    fecha, sello
    ORDER BY
    fecha,sello ASC

    As you can see I use 3 parameters:
    ${sello_param} defined as String in the parameter
    ${fecha_param1}
    defined as Date (SQL)
    ${fecha_param2} defined as Date (SQL)

    in the Tables,

    describe dim_sello;
    +--------+-------------+------+-----+---------+-------+
    | Field | Type | Null | Key | Default | Extra |
    +--------+-------------+------+-----+---------+-------+
    | id | int(3) | NO | PRI | NULL | |
    | nombre | varchar(45) | YES | | NULL | |
    +--------+-------------+------+-----+---------+-------+

    describe dim_fecha;
    +----------------------+-------------+------+-----+---------+----------------+
    | Field | Type | Null | Key | Default | Extra |
    +----------------------+-------------+------+-----+---------+----------------+
    | id | bigint(20) | NO | PRI | NULL | auto_increment |
    | fecha | date | YES | | NULL | |
    +----------------------+-------------+------+-----+---------+----------------+

    Regards,
    Martin


  5. #5
    Join Date
    Jul 2010
    Posts
    13

    Default

    I followed your previous recommendations and it turned out that I was setting the parameter 'Value Type' as string, for a Multi Value List.

    I changed it to Object, and the Error disappeared.

    thanks a lot!

    regards,
    Martin

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.