• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Issue with inserting a BLOB using IBatis DAO

Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using Oracle Application Server 10g( with latest version of IBatis. I am uploading a file and inserting file data as byte[] in the database field which is a Blob. I keep on getting SQLException:Data size bigger than max size for this type when i try to insert. If i take out the file data from my insert statement , a record is inserted into the table.

My xml mapping file is:

And my sqlmap-config.xml is
Posts: 4223
jQuery Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just a thought but have you tried using a Stream instead of a byte[] array? I know in JDBC clob/blobs can be tricky in that sometimes you have to perform select/insert in two statements instead of one. For example, sometimes you have to read the entire record except the binary data then read each blob/clob separately.
    Bookmark Topic Watch Topic
  • New Topic