Content is not allowed in prolog.解决方法

:1:1: Content is not allowed in prolog.
2010-08-19 15:30:53,class:com.ysd.dao.SynchroOperation,com.thoughtworks.xstream.io.StreamException:  : Content is not allowed in prolog.
        at com.thoughtworks.xstream.io.xml.DomDriver.createReader(DomDriver.java:86)
        at com.thoughtworks.xstream.io.xml.DomDriver.createReader(DomDriver.java:66)
        at com.thoughtworks.xstream.XStream.fromXML(XStream.java:853)
        at com.ysd.dao.ConfReader.read(ConfReader.java:29)
        at com.ysd.servlet.StartRun.main(StartRun.java:162)
Caused by: org.xml.sax.SAXParseException: Content is not allowed in prolog.
        at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:239)
        at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:283)
        at com.thoughtworks.xstream.io.xml.DomDriver.createReader(DomDriver.java:79)
        ... 4 more

 

 

将xml配置文件利用记事本另存为Anis编码的文件可以解决。

你可能感兴趣的:(Java)