File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Issue with inserting a BLOB using IBatis DAO

 
hasina kumar
Greenhorn
Posts: 9
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using Oracle Application Server 10g(9.0.4.0.0) 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
 
Scott Selikoff
author
Saloon Keeper
Posts: 3896
16
Eclipse IDE Flex Google Web Toolkit
  • 0
  • 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.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic