If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > updateBlob() fails (ArrayIndexOutOfBoundsException)

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-25-03, 13:09
sascha sascha is offline
Registered User
 
Join Date: Nov 2003
Posts: 2
updateBlob() fails (ArrayIndexOutOfBoundsException)

Hi!

I'm using MySQL Connector/J 3.0.9 with MySQL 4.0.16 on a Debian Linux system. I would like to update a blob field using jdbc2.0 calls like:

byte[] cover = some_byte_data;
Blob blobCover = rs.getBlob("cover");
blobCover.setBytes(1, cover);
rs.updateBlob("cover", blobCover);


The last line always throws following exception:

java.lang.ArrayIndexOutOfBoundsException: 181980
at com.mysql.jdbc.PreparedStatement.escapeblockFast(P reparedStatement.java:2338)
at com.mysql.jdbc.PreparedStatement.setBlob(PreparedS tatement.java:358)
at com.mysql.jdbc.UpdatableResultSet.updateBlob(Updat ableResultSet.java:957)
at com.mysql.jdbc.UpdatableResultSet.updateBlob(Updat ableResultSet.java:974)


Also using prepared statements results in the same error (since updateBlob() relays on prepared statements internally, I guess).

Does anyone know a workaround for this? Or am I using the jdbc calls completely wrong? Any hints are highly appreciated.

Thanks,
Sascha
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On