File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Hi, I'm intrying to upload a file into an ORACLE Database, but I got strange errors

 
Leinad Jan
Greenhorn
Posts: 28
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

my code is working fine until the last executeUpdate. I'm trying to upload a file into the Oracle Database.



Here is the last error stack trace I got :



Do you have any idea on what is not working correctly ? How do I define a valid LOB Locator ?

Thank you !
 
Fatih Keles
Ranch Hand
Posts: 182
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Leinad,

I don't know what is "FormFile data" is but using streams for updating BLOBs works.
Here is a sample, you may also find many samples on oracle network.

Regards,

Fatih.
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 33691
316
Eclipse IDE Java VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Leinad,
I usually use setBinaryStream() for BLOBs so I don't have deal with database specific code. It also eliminates the need to get a BLOB object before trying to write to the database.
 
Leinad Jan
Greenhorn
Posts: 28
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you for your help !
 
sonam kapoor
Greenhorn
Posts: 3
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi, checkout the example for uploading a file in oracle database while working with BLOB

1. To upload and retrieve multiple images

2. To upload and retrieve text and image data
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic