org.jdom.input.JDOMParseException: Error on line 1 of document file:/home/omfys/Desktop/eclipse: Content is not allowed in prolog.
at org.jdom.input.SAXBuilder.build(SAXBuilder.java:501)
at org.jdom.input.SAXBuilder.build(SAXBuilder.java:847)
at org.jdom.input.SAXBuilder.build(SAXBuilder.java:826)
Asked
Active
Viewed 436 times
1
-
Possible duplicate of [Content is not allowed in Prolog SAXParserException](http://stackoverflow.com/questions/4569123/content-is-not-allowed-in-prolog-saxparserexception) – karan Sep 02 '16 at 05:34
2 Answers
0
You probably have a class level attribute for the SAXBuilder ... like this:
public class MyClass {
private static final SAXBuilder saxBuilder = new SAXBuilder();
public static Document myMethod(String argument) throws Exception {
... your functionality with the saxBuilder
}
}
(If this is the case) just declare and initialize the SAXBuilder within the method and it will be fixed ...

Dan Ortega
- 1,679
- 17
- 13