我正在使用一个在Jboss服务器上运行的小应用程序。当我尝试向服务器发出POST请求时(使用POSTMAN),我收到了以下错误。
2018-06-01 16:12:23,570 WARN [org.apache.tomcat.util.http.Parameters] Parameters: Character decoding failed. Parameter skipped.
java.io.CharConversionException: isHexDigit
at org.apache.tomcat.util.buf.UDecoder.convert(UDecoder.java:88)
at org.apache.tomcat.util.buf.UDecoder.convert(UDecoder.java:49)
at org.apache.tomcat.util.http.Parameters.urlDecode(Parameters.java:410)
at org.apache.tomcat.util.http.Parameters.processParameters(Parameters.java:392)
at org.apache.tomcat.util.http.Parameters.processParameters(Parameters.java:344)
at org.apache.catalina.connector.Request.parseParameters(Request.java:2470)
at org.apache.catalina.connector.Request.getParameter(Request.java:1040)
at org.apache.catalina.connector.RequestFacade.getParameter(RequestFacade.java:355)
at org.posterita.core.AdditionDeduction.doPost(AdditionDeduction.java:49)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
at java.lang.Thread.run(Thread.java:662)
请求
Content-Type : application/x-www-form-urlencoded
Request Body : jsondata=[{"#":"1","Emp No":"354","Name":"Chandanayaka P.","Amount":"44.00","Action":"Remove!","Client":"1000002","Org":"1000040","Division":"1000078","AddDeductTypeId":"1003504","BPartnerID":"1014314","Current_Instmnt":"44","Bal_Instmnt":"0","FullAmount":"","NoInstallments":"1","Isonetime":"Y","Witness1":"1015808","Witness2":"1015808","Period":"1000618","UserID":"1000185","IsWitness":"N","NoOfKilos":"","TeaRate":"0"},{"#":"2","Emp No":"405","Name":"Rathnapala M.K.","Amount":"44.00","Action":"Remove!","Client":"1000002","Org":"1000040","Division":"1000078","AddDeductTypeId":"1003504","BPartnerID":"1014355","Current_Instmnt":"44","Bal_Instmnt":"0","FullAmount":"","NoInstallments":"1","Isonetime":"Y","Witness1":"1015808","Witness2":"1015808","Period":"1000618","UserID":"1000185","IsWitness":"N","NoOfKilos":"","TeaRate":"0"},{"#":"3","Emp No":"392","Name":"Pemasiri I.D.","Amount":"44.00","Action":"Remove!","Client":"1000002","Org":"1000040","Division":"1000078","AddDeductTypeId":"1003504","BPartnerID":"1014319","Current_Instmnt":"44","Bal_Instmnt":"0","FullAmount":"","NoInstallments":"1","Isonetime":"Y","Witness1":"1015808","Witness2":"1015808","Period":"1000618","UserID":"1000185","IsWitness":"N","NoOfKilos":"","TeaRate":"0"},{"#":"4","Emp No":"537","Name":"Yoshani Dilhari K M","Amount":"44.00","Action":"Remove!","Client":"1000002","Org":"1000040","Division":"1000078","AddDeductTypeId":"1003504","BPartnerID":"1023710","Current_Instmnt":"44","Bal_Instmnt":"0","FullAmount":"","NoInstallments":"1","Isonetime":"Y","Witness1":"1015808","Witness2":"1015808","Period":"1000618","UserID":"1000185","IsWitness":"N","NoOfKilos":"","TeaRate":"0"},{"#":"5","Emp No":"539","Name":"Deepika Sudarshani M K D","Amount":"44.00","Action":"Remove!","Client":"1000002","Org":"1000040","Division":"1000078","AddDeductTypeId":"1003504","BPartnerID":"1023712","Current_Instmnt":"44","Bal_Instmnt":"0","FullAmount":"","NoInstallments":"1","Isonetime":"Y","Witness1":"1015808","Witness2":"1015808","Period":"1000618","UserID":"1000185","IsWitness":"N","NoOfKilos":"","TeaRate":"0"},{"#":"6","Emp No":"319","Name":"H.G.Chandralatha","Amount":"44.00","Action":"Remove!","Client":"1000002","Org":"1000040","Division":"1000078","AddDeductTypeId":"1003504","BPartnerID":"1015808","Current_Instmnt":"44","Bal_Instmnt":"0","FullAmount":"","NoInstallments":"1","Isonetime":"Y","Witness1":"1015808","Witness2":"1015808","Period":"1000618","UserID":"1000185","IsWitness":"N","NoOfKilos":"","TeaRate":"0"},{"#":"7","Emp No":"533","Name":"Chandralatha H G","Amount":"44.00","Action":"Remove!","Client":"1000002","Org":"1000040","Division":"1000078","AddDeductTypeId":"1003504","BPartnerID":"1023443","Current_Instmnt":"44","Bal_Instmnt":"0","FullAmount":"","NoInstallments":"1","Isonetime":"Y","Witness1":"1015808","Witness2":"1015808","Period":"1000618","UserID":"1000185","IsWitness":"N","NoOfKilos":"","TeaRate":"0"}]
这是我现在所发现的。
如果我在Linux(Redhat Linux)和Windows环境中使用相同的服务器(相同的Jboss服务器)运行相同的应用程序,我在Windows环境中没有收到此错误,应用程序也没有任何问题。
如果我减少请求正文中的字符数,我就不会遇到这个问题。
如果我使用另一个String作为请求体,我没有遇到这个问题,(由于JSON格式不正确,我收到了应用程序错误)
有谁知道我为什么会收到这个错误?