Skip to main content

A wierd exception while deserializing

1 reply [Last post]
avinashdha
Offline
Joined: 2006-02-27
Points: 0

Could someone please give me some pointers as to where I should start looking when I attempt tracking this one?

We are reading some bytes from a TCP socket and submitting these bytes to be deserialized on a separate thread in a dedicated thread pool. Every once in a while I see this wierd exception.
java.io.IOException: Illegal state for UTF-8 encoded string
at com.sun.xml.fastinfoset.Decoder.decodeUtf8StringIllegalState(Decoder.java:1780)
at com.sun.xml.fastinfoset.Decoder.decodeTwoToFourByteUtf8Character(Decoder.java:1532)
at com.sun.xml.fastinfoset.Decoder.decodeUtf8StringIntoCharBuffer(Decoder.java:1471)
at com.sun.xml.fastinfoset.Decoder.decodeUtf8StringAsCharBuffer(Decoder.java:1392)
at com.sun.xml.fastinfoset.stax.StAXDocumentParser.processUtf8CharacterString(StAXDocumentParser.java:488)
at com.sun.xml.fastinfoset.stax.StAXDocumentParser.next(StAXDocumentParser.java:323)
at com.sun.xml.bind.v2.runtime.unmarshaller.FastInfosetConnector.bridge(FastInfosetConnector.java:130)
at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:358)
at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:330)
at com.firm.infrastructure.net.io.BinarySerializer.deserialize(BinarySerializer.java:177)
at com.firm.infrastructure.net.MessageDeserializationTask.run(MessageDeserializationTask.java:36)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:675)

What would cause this? Please advice.

Thanks
A

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
oleksiys
Offline
Joined: 2006-01-25
Points: 0

Hi,

can you pls. forward this question to FastInfoset project [1] mailing list dev[at]fi.dev.java.net.
It could also help if you can share the code (both serialiazation/deserialization) and data you're working with.

WBR.

[1] https://fi.dev.java.net