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

Need help figuring out Xerces parsing error.

 
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

I've got an application that takes SGML as input, and due to the lack of any good SGML parsers out there, I'm converting that SGML to XML using SX wrapped in a utility class I've written, then am sending the converted XML to Xerces.
Occasionally, and not always (which is annoying), I get this error from Xerces:
SaxParseException: File "null" not found.
Nested exception: null
The odd thing is, there is no file to parse. I'm sending Xerces an Inputsource, created from a StringReader. I've verified this StringReader's content, and it is a full XML document, and it is not null.
Can anyone help me here? This is driving me batty.
Thanks very much,
-tim
 
Sheriff
Posts: 5782
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have seen this before. Which version of Xerces are you using? I now download the source from the source code repository from Apache and build my own jar files and this works much better than the binary distribution. If you don't care much about the version, try doing the same. Otherwise, get the latest version at the least and give it a shot.
As you said, even I had sleepless nights trying to figure out this error, but it vanished after I resorted to raw sourcecode
Good luck,
------------------
Ajith Kallambella M.
Sun Certified Programmer for the Java�2 Platform.
IBM Certified Developer - XML and Related Technologies, V1.
Co-author of Java 2 Certification Passport
 
Bob Dobalina
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

That's really interesting... I've had this error appear and then disappear at random. At first I thought it was because I was providing an incorrect path to my DTD, because when I changed the path the error went away, then it came right back again a few days later.
I'll try a new version of Xerces (if available) and see if that fixes things. I'm using 1.4.3 now.
Thanks very much for the suggestion, and I'm open to others if anyone else has any ideas
-tim
 
Ajith Kallambella
Sheriff
Posts: 5782
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Here's the link to installation directions http://xml.apache.org/xerces2-j/install.html , just in case if you're wondering how to install from CVS repository.
 
Bob Dobalina
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Thanks. I'll give that a shot.
-tim
 
Bob Dobalina
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm going to bump this back to life. Updating my Xerces version seemed to help, but the problem is still not exactly eliminated. It rears its ugly head every now and again... has anyone got any further suggestions?
Thanks,
-tim
 
Popeye has his spinach. I have this tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic