Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Oracle Serialization

 
AFM
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm having big problems with Oracle 8i writing and reading Java objects. Basically, it writes fine using the oracle.sql.BLOB class
Example code:
(this is done after running a select for update on the row)

Sometimes (but not all the time) the read fails and throws the following exception:
java.io.StreamCorruptedException: Caught EOFException while reading the stream header
at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:845)
at java.io.ObjectInputStream.<init>(ObjectInputStream.java:168)
The code to read the BLOB back is like this:

Any suggestions or tips welcome
AFM
[ Edited by Dave to format code ]
[ June 25, 2002: Message edited by: David O'Meara ]
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not something I've ever done myself (I have a phobia against binary data in the database) but I remember something about Oracle having a 64k limit on Blobs

Maybe try a search in this forum to see if I'm right (no idea...)
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"AFM",
The Java Ranch has thousands of visitors every week, many with surprisingly similar names. To avoid confusion we have a naming convention, described at http://www.javaranch.com/name.jsp.
We require names to have at least two words, separated by a space, and strongly recommend that you use your full real name. Please edit your profile and select a new name which meets the requirements.
Thanks.
Dave
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic