1
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)                       
toha
  • 5,095
  • 4
  • 40
  • 52
rahul
  • 151
  • 3
  • 12
  • 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 Answers2

0

The first line of your document is probably incorrect.

View : Content is not allowed in Prolog SAXParserException

Community
  • 1
  • 1
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