• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

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

 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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):
 
Ranch Hand
Posts: 179
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
please check out this link.

Hope this helps
 
reply
    Bookmark Topic Watch Topic
  • New Topic