org.xml.sax.SAXParseException: Content is not allowed in prolog

前端 未结 30 1790
别那么骄傲
别那么骄傲 2020-11-22 02:54

I have a Java based web service client connected to Java web service (implemented on the Axis1 framework).

I am getting following exception in my log file:

30条回答
  •  盖世英雄少女心
    2020-11-22 03:27

    For all those that get this error: WARNING: Catalina.start using conf/server.xml: Content is not allowed in prolog.

    Not very informative.. but what this actually means is that there is garbage in your conf/server.xml file.

    I have seen this exact error in other XML files.. this error can be caused by making changes with a text editor which introduces the garbage.

    The way you can verify whether or not you have garbage in the file is to open it with a "HEX Editor" If you see any character before this string

         ""
    

    like this would be garbage

         "‰ŠŒ"
    

    that is your problem.... The Solution is to use a good HEX Editor.. One that will allow you to save files with differing types of encoding..

    Then just save it as UTF-8. Some systems that use XML files may need it saved as UTF NO BOM Which means with "NO Byte Order Mark"

    Hope this helps someone out there!!

提交回复
热议问题