• 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

Problem with serialization

 
Ranch Hand
Posts: 502
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am having a problem with serialization. I am serializing to a string a CachedRowSetImpl object in a server.

and I return the string in an HTTP request. I am getting the error "java.io.StreamCorruptedException: invalid stream header:EFBFDEF" trying to deserialize the object in the line "cachedRowSet = (CachedRowSet) objectInputStream.readObject(); "

 
Alejandro Barrero
Ranch Hand
Posts: 502
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am also having problem with XML serialization. On the server I have

In the client I have

But the text that I am getting is only "<?xml version="1.0" encoding="UTF-8"?> <java version="1.6.0_20" class="java.beans.XMLDecoder"> <object class="com.sun.rowset.CachedRowSetImpl"/> </java>"; there is no data!

Also, I was trying originally to transer the CachedRowSetImpl object constructing a JSON string (Google JSON ) but I was getting an error that the object had a circular reference.

What I really want to do is to serialize and transfer a JDBC ResultSet. Can anybody tell me how to do that?
 
Alejandro Barrero
Ranch Hand
Posts: 502
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
RESOLVED. I am using Java serialization and I use URL encode to send and URL decode to receive.
 
reply
    Bookmark Topic Watch Topic
  • New Topic