Win a copy of Head First Android this week in the Android forum!
  • 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:
  • Tim Cooke
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Jesse Silverman
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Al Hobbs
  • salvin francis

XML EOFException Serialization Deserialization

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I've big problem about xml serialization-deserialization in Java.
First step is to create ObjectOutputStream for serialization with a standard JVM (ver.jdk1.6.0_25); second step consist of the resulting xml, must be
deserialize by another JVM (Hewlett-Packard Co., java.vm.version = 17.0-b17-jre1.6.0.08-rc1 ). This process throw an EOFException with result stacktrace below:
RuntimeException: java.io.EOFException
at org.ow2.bonita.services.impl.FileLargeDataRepository.getData(FileLargeDataRepository.java:313)
at org.ow2.bonita.services.impl.FileLargeDataRepository.getDataFromRegex(FileLargeDataRepository.java:187)
at org.ow2.bonita.services.impl.FileLargeDataRepository.getData(FileLargeDataRepository.java:231)
...
Caused by: java.io.EOFException
at java.io.ObjectInputStream$BlockDataInputStream.readFully(ObjectInputStream.java:2700)
at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1648)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1323)
Thanks to everyone,
with reguard.
Mauro.
 
Mauro Mauro One
Greenhorn
Posts: 2
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ok i've understand the true problem that don't reside on use of different JVM about serialization/deserialization process.
WinSCP that is one of most popular FTP client permits to create settings on file trasferring mode.
From WinSCP documentation three notes http://winscp.net/eng/docs/transfer_mode:
"1) The file is not only transferred, but also converted to format used by the target platform. ...
2) WinSCP offers you the chance to select between Text and Binary transfer modes...
3) WinSCP also has a special Automatic mode (default). With this mode WinSCP decides automatically about transfer mode
for a particular file based on its filename (usually the file extension)."
In this case client machine is based on Windows platform, while target platform on Unix platform.
The first note explain that WinSCP execute a conversion while transfer file on server that likely on xml data produce an EOFException.

I've resolved selecting Binary Transfer mode and not Automatic mode that apply ASCII Transfer on xml file.

Mauro.
 
Rancher
Posts: 1776
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for sharing the resolution and welcome to the Ranch
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic