• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

TransformerException

 
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am taking a simple XML file and transforming it into another XML file. It is very basic and very small. However, when I try to transform the XML, I get the following exception:
javax.xml.transform.TransformerException: Premature end of file.
at org.apache.xalan.transformer.TransformerImpl.fatalError(TransformerImpl.java:671)
at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:647)
at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1054)
at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1032)
Thanks in advance!!!

 
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I suspect your XML is not well formed.
HTH
 
Russ Ray
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
My problem was a simple one unrelated to XML. I was reading the inputstream and printing the information out (debug steps). This moved the internal pointer to the end of file.
Administrator: You can close this topic!
 
Hey cool! They got a blimp! But I have a tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic