Java io optionaldataexception at java io objectinputstream readobject

serversocket - aqasesuyohaw.web.fc2.comject() throws exception aqasesuyohaw.web.fc2.comalDataException - Stack Overflow

Failed to build body from bytes. The only difference in the testing application to all other messages is that the object is a deeply nested map, it is: Alltough the OptionalDataException indicates some primitive values being written somewhere, there are absolute no primitive values around there.

aqasesuyohaw.web.fc2.comalDataException when do ObjectInp | JBoss Developer

It turned out that the HashMap was not synchronized correctly and some of the data was manipulated while it got serialised, synchronizing solved the problem. Anyway I would expect a ConcurrentModificationException or something similar to happen and wonder why an OptionalDataException occurs?

networking - aqasesuyohaw.web.fc2.comalDataException in run method? - Stack Overflow

We are facing the same problem. In our case, the first object is a custom object with some primitive fields and a map HashMap. This map contains other deeply nested maps.

We tried making the first map a synchronizedMap, but it did not work. And anyway both writer and reader are wraped on transactions spring and synchronized methods.

The strange thing is that we cannot reproduce the problem in a consistent way in our tests, it is somehow random maybe related to the system load?

Martin, could you please be a bit more explicit about the way you solved the problem with synchronization?

Any hint will be much appreciated. Help Online Help JIRA Agile Help JIRA Service Desk Help Keyboard Shortcuts About JIRA JIRA Credits.

OptionalDataException when getting a deeply nested HashMap from an ObjectMessage. Export XML Word Printable JSON. In rare occasions getting a HashMap from an ObjectMessage leads to the following error: All Comments Work Log History Activity Transitions Ascending order - Click to sort in descending order.

inserted by FC2 system