Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

org.xml.sax.SAXParseException: Premature end of file.

 
laxmikant upadhyay
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
i have a servlet which reads the inputstream as xml doc sent from httpclient. when i sent a single request from client it works fine
but when i sent the multiple request using for loop at a time it parse 1st inputstream successfully but throws SAXParseException: Premature end of file for other.

below is snapshot of my httpclient (using juit to test):
 
Vishal Shaw
Ranch Hand
Posts: 179
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Sorry I am in office so I could not go through your full code. But at a glance, I think the Thread.sleep() method should be moved after line 53, i.e. after the request has been processed by your Servlet.

Vishal.
 
laxmikant upadhyay
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Vishal Shaw wrote:Hi,

Sorry I am in office so I could not go through your full code. But at a glance, I think the Thread.sleep() method should be moved after line 53, i.e. after the request has been processed by your Servlet.

Vishal.


hi vishal,thanks for your reply.
But removal of Thread.sleep() does not make any difference. the exception is thrown @ line doc = db.parse(in); . i think problem is in client side while sending the multiple inputstream at a time but i am not sure where i am commiting mistake.
 
Vishal Shaw
Ranch Hand
Posts: 179
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
please check out this link.

Hope this helps
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic