JFinal

登录 注册

Jfinal项目运行时偶尔会报UTF-8 decode错误

发生的条件不清楚,经常会报如下的错误:

02-11 20:42:57[WARN]org.eclipse.jetty.util.Utf8Appendable$NotUtf8Exception: Not valid UTF8! byte 9d in state 0

02-11 20:42:57[WARN]org.eclipse.jetty.util.Utf8Appendable$NotUtf8Exception: Not valid UTF8! byte 7e in state 2

02-11 20:42:57[WARN]org.eclipse.jetty.util.Utf8Appendable$NotUtf8Exception: Not valid UTF8! byte 2a in state 2

02-11 20:42:57[WARN]org.eclipse.jetty.util.Utf8Appendable$NotUtf8Exception: Not valid UTF8! byte 99 in state 0

02-11 20:42:57[WARN]org.eclipse.jetty.util.Utf8Appendable$NotUtf8Exception: Not valid UTF8! byte 5b in state 2

02-11 20:42:57[ERROR]/announce?info_hash=%B3%DF%08Xe%9B%90%9DAK%D6%7E%7C%2C%CD%2A%99%D8%5B%F2&peer_id=%2DSD0100%2D%21%FB%2C%2B%FB%15%FD%A9%8Cg%8E%1D&ip=100.66.231.165&port=10568&uploaded=1383412102&downloaded=1383412102&left=0&numwant=200&key=15204&compact=1

java.lang.IllegalArgumentException: Tried to read incomplete UTF8 decoded String

at org.eclipse.jetty.util.Utf8StringBuilder.checkState(Utf8StringBuilder.java:80)

at org.eclipse.jetty.util.Utf8StringBuilder.toString(Utf8StringBuilder.java:73)

at org.eclipse.jetty.util.UrlEncoded.decodeUtf8To(UrlEncoded.java:304)

at org.eclipse.jetty.http.HttpURI.decodeQueryTo(HttpURI.java:699)

at org.eclipse.jetty.server.Request.extractParameters(Request.java:275)

不知道有没有办法解决?

评论

  • 02-13 18:59
    info_hash 这个参数在 utf8 转换时出错,排查一下 encoding 出错的源头
  • 02-13 20:26
    好的。谢谢
  • 发送