Jump to content
JasperReports Library 7.0 is now available ×

Text in a BLOB-Field


Recommended Posts

By: Juergen - schumhan

Text in a BLOB-Field

2003-07-25 10:56

Hi,

I have a BLOB in mysql. This BLOB I use for text only. Its a BLOB because this can be a large text. I tried now to use jasperreport to show this field. It doesnt work. When I use inputstream it doesnt work. I got always an "java.io.IOException: java.awt.Image fetch aborted or errored". Is anybody here with an Idea???

 

thx in advance,

juergen

 

 

 

 

By: Eric Everman - eeverman

RE: Text in a BLOB-Field

2003-07-25 11:47

Juergen-

 

Without looking at the JR source code, it looks to me that JR assumes that any field of type java.sql.Blob is an image, since its an awt image that throws the error.

 

It may be difficult to fix this, since BLOBs and CLOBs are provided as streams. An awt.Image is prepared to handle its data coming as a stream - I assume that the data structure holding text data in JR is not.

 

My *guess* is that you will need to create a custom data source for JR that will read in your text field all at once (and convert it to unicode), then provide it as a String to JR.

 

$.02

 

Eric Everman

 

 

 

 

By: Teodor Danciu - teodord

RE: Text in a BLOB-Field

2003-10-04 12:53

 

Hi,

 

If it is text only, you should probably use CLOB

instead of BLOB.

 

This might be a problem with the JDBC driver.

 

Thank you,

Teodor

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...