Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

XML EOFException Serialization Deserialization  RSS feed

 
Mauro Mauro One
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • 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
  • 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.
 
John Jai
Rancher
Posts: 1776
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for sharing the resolution and welcome to the Ranch
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!