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

Insert CLOB data upto 2 GB data

 
Vamsi bhujanga
Greenhorn
Posts: 16
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I need to store huge data (which is a xml data) in a CLOB datatype which is running on JBoss server.Iam successful in writing the code but my code has a big limitation that it can store upto 32523 (approx) characters.But,my application will be receiving the xml's of upto 2 GB (Approximately). But,iam unable to find the alternate for this.



When iam using to create CLOB object directly,it is giving Class Cast exception,thats the reason, i have tried using the above code.

I have tried to create clob in the following way which is giving Class cast exception.




Hence i tried using WrappedConnection of JBoss

But still throwing class cast exception.
Did anyone had this kind of issue/problem of storing more than 2 GB data into CLOB datatype?Is there any another alternate for this?
Please let me know

Thanks in advance.
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13048
6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How about storing the monster data as a file with a unique name and putting the name in the database?

Bill
 
Vamsi bhujanga
Greenhorn
Posts: 16
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We cant save it in the form of a file as we have many challenges in using it.
Is there any other alternate?
 
Ulf Dittmer
Rancher
Pie
Posts: 42966
73
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What kinds of challenges? Storing it in the DB will present substantial challenges as well (larger challenges probably than using the file system).
 
Martijn Verburg
author
Bartender
Posts: 3275
5
Eclipse IDE Java Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Adding a "Me too!"

We have a similar problem to this and storing a handle to the file and using a file system to store the actual file is definitely the way to go, for all sorts of performance reasons etc.
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13048
6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As I understand it, the underlying mechanism by which DBs store large Blob and Clob objects is in fact by writing a file and only storing the file location in the DB tables.

Bill
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic