Jasper Reports Class Cast Exception for Field
I had a field like so,
$F{image_blob}
which I was converting to an image by treating the field as an InputStream and then feeding it to an image object. However, I started getting class cast exceptions suddenly.
Turns out that after editing the report query I had reread the fields from the database and Jasper had ‘forgotten’ about the fact that $F{image_blob} was an InputStream, and it was treating it as an Object. Editing the field and changing it back to InputStream solved the problem.
Categories: Site
