zoukankan      html  css  js  c++  java
  • 错误记录1----dom4j解析xml调试编码错误

    org.dom4j.DocumentException: Invalid byte 1 of 1-byte UTF-8 sequence. Nested exception: Invalid byte 1 of 1-byte UTF-8 sequence.
     at org.dom4j.io.SAXReader.read(SAXReader.java:353)
     at org.dom4j.io.SAXReader.read(SAXReader.java:264)
     at web.AjaxTestServlet.parseXML(AjaxTestServlet.java:139)
     at web.AjaxTestServlet.doPost(AjaxTestServlet.java:94)
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
     at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
     at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
     at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
     at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
     at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
     at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
     at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
     at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
     at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
     at java.lang.Thread.run(Thread.java:619)

    com.sun.org.apache.xerces.internal.impl.io.MalformedByteSequenceException: Invalid byte 1 of 1-byte UTF-8 sequence.

    编码错误~~~

    用编译器把xml文件的编码改成utf-8的就可以了。

  • 相关阅读:
    HTML总结
    Java 基础知识总结 (三、运算符)
    关于JS 事件冒泡和onclick,click,on()事件触发顺序
    Java 基础知识总结 (四、String)
    Java 基础知识总结 (二、基本数据类型)
    websocket实例(显示文件导入处理进度)
    Java 基础知识总结 (一、标识符)
    Java Calendar 注意事项
    Ajax调用SpringMVC ModelAndView 无返回情况
    关于Ajax load页面中js部分$(function(){})的执行顺序
  • 原文地址:https://www.cnblogs.com/alaricblog/p/3278273.html
Copyright © 2011-2022 走看看