java.lang.ClassCastException because of "WHERE" condition in Query Dialog??

Hello,

after modifying my SQL Query inside the query dialog I, all of a sudden, got this error message when previewing my report:

java.lang.ClassCastException: java.math.BigDecimal cannot be cast to java.lang.String

Here is the query: (very simple one!)

select top 200001 "ProjectType"."ProjectType" as "ProjectType",

"hours_costs"."period_type" as "period_type"

from blablabla

where "INVESTMENTS"."OBJECT_CODE" = 'project' and "mapping_v"."level3" like 'R&D%%' and "mapping_v"."type_id" = 'depts'

and "hours_costs"."period_type" like '%Actual Year%' <------ Removing this line allow the report to run!!!! why?!?!? is this a bug??? group by "ProjectType"."ProjectType" order by "ProjectType"."ProjectType"

 

Is there a known bug and/or workaround for this??? Thanks in advance for any help :)

ocarrier's picture
Joined: Oct 24 2016 - 1:49am
Last seen: 4 years 7 months ago

1 Answer:

ClassCastException here indicates that some BigDecimal value is attempted to be used where String is expected. The query itself should run successfully, it's the resultset that is most likely causing this problem. Does your report have any BigDecimal fields? Where are they used?

Friendly User's picture
Joined: Oct 8 2009 - 5:59am
Last seen: 2 months 3 weeks ago
Feedback
randomness