Questions tagged [optionaldataexception]
10 questions
2
votes
0 answers
Java OptionalDataException using ObjectInputStream.readObject()
The object class I am writing to disk is defined as follows:
public class EntityTableLink implements Index>, Serializable
{
private Map>>> idx;
public EntityTableLink()
{
…

Martin Pekár
- 71
- 9
2
votes
0 answers
Java Exception java.io.OptionalDataException
I getting the following exception when deserializing an Object:
java.io.OptionalDataException
java.io.ObjectInputStream.readObject0(Unknown Source)
java.io.ObjectInputStream.readObject(Unknown Source)
java.util.HashSet.readObject(Unknown…

Georges Lteif
- 17
- 4
1
vote
1 answer
OptionalDataException Java
I am making a voice chat program and I got the OptionalDataException error and I never had this problem with the code before I added voice. The voice communication is handles by a different socket so I don't see the problem.
Code:
public…

Marcus Mardis
- 59
- 1
- 8
1
vote
1 answer
Using readObject to get byte[][] giving OptionalDataException
I have a slight problem reading some files I have made. I am making a game and have decided to make my own file type for the maps. I have made a special application to make these map files. Once I instantiate a map I can choose to call…

707090
- 102
- 6
0
votes
0 answers
Java OptionalDataException when sending data from client to server
I am writing a program in Java that sends data from client to server. I'm getting an OptionalDataException while sending a file from client to server.
I've tried checking the order of inputstream and outputstream but couldn't get it right. I don't…

Nafiu Rahman
- 1
- 1
0
votes
1 answer
Storm topology stops emitting after StormServerHandler Netty error caused by OptionalDataException
We have a storm cluster running with 3 nodes and multiple topologies. We use apache-storm-1.2.2 with java 1.8.0_162
Currently we have the problem that a random topology stops emitting at random times after an error occurs and the Netty server is…

Daniel Storch
- 979
- 3
- 10
- 25
0
votes
1 answer
I am getting OptionalDataException in the following Program. why this error is coming
I am trying to encrypt password before serialization
I am getting OptionalDataException in the following code.
I read many article like "read non transient variable before , EOF in
program, read in same way as you write in file etc ..
…

user3431530
- 1
- 1
0
votes
1 answer
ObjectInputStream readobject doesnt work OptionalDataException
when I use readObject I get OptionalDataException (An attempt was made to read an object when the next element in the stream is primitive data), how do I fix this? Page is Serializable. writeObject works.
public Map>…

user3537725
- 15
- 5
0
votes
1 answer
Java OptionalDataException when only serializing objects (no primitive data types anywhere)
I'm dealing with a strange OptionalDataException that I can't figure out.
I have objects coming in, which are saved to disk by a class that write them by decorating an OutputObjectStream and calling its writeUnshared method. Periodically, every…

Tom
- 43,810
- 29
- 138
- 169
-1
votes
1 answer
Android: OptionalDataException upon ObjectInputStream.readObject()
Situation : From my Android server, I'm sending a simple String OBJECT to the client. I use ObjectOutputStream at the server, and ObjectInputStream at the client.
Server code:
mOutput.flush();
mOutput.reset();
…

Abhishek
- 743
- 1
- 15
- 28