Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Document has no root element exception using simple xml serializer (v2.6.6)

I'm using simple xml library http://simple.sourceforge.net/ to deserialize an object from a socket input stream. While in simple java application the same situation works fine, in android I get, after

MyObject obj = serializer.read(MyObject.class,socket.getInputStream())

org.simpleframework.xml.stream.NodeException: Document has no root element

why is that??

like image 882
user1610075 Avatar asked Aug 25 '12 07:08

user1610075


1 Answers

You haven't been receiving the data. Try to set a Log and check if the data is present or no

like image 200
BlueSlimShady Avatar answered Sep 23 '22 22:09

BlueSlimShady