Home > Site > Jasper Reports Class Cast Exception for Field

Jasper Reports Class Cast Exception for Field

October 25th, 2006 siker Leave a comment Go to comments

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.

Share and Enjoy:
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • email
  • Slashdot
  • StumbleUpon
Categories: Site Tags:
  1. No comments yet.
  1. No trackbacks yet.