• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Oracle Serialization

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
reply
    Bookmark Topic Watch Topic
  • New Topic