java.lang.IllegalArgumentException: Invalid character found in method name





1、错误描述

  1. 信息: Error parsing HTTP request header  
  2.  Note: further occurrences of HTTP header parsing errors will be logged at DEBUG level.  
  3. java.lang.IllegalArgumentException: Invalid character found in method name. HTTP method names must be tokens  
  4.     at org.apache.coyote.http11.AbstractNioInputBuffer.parseRequestLine(AbstractNioInputBuffer.java:233)  
  5.     at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1045)  
  6.     at org.apache.coyote.AbstractProtocolAbstractConnectionHandler.process(AbstractProtocol.java:684)&nbsp;&nbsp;</span></li><li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;at&nbsp;org.apache.tomcat.util.net.NioEndpoint AbstractConnectionHandler.process(AbstractProtocol.java:684)&nbsp;&nbsp;</span></li><li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;at&nbsp;org.apache.tomcat.util.net.NioEndpoint SocketProcessor.doRun(NioEndpoint.java:1533)  
  7.     at org.apache.tomcat.util.net.NioEndpointSocketProcessor.run(NioEndpoint.java:1489)&nbsp;&nbsp;</span></li><li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;at&nbsp;java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)&nbsp;&nbsp;</span></li><li class=""><span>&nbsp;&nbsp;&nbsp;&nbsp;at&nbsp;java.util.concurrent.ThreadPoolExecutor SocketProcessor.run(NioEndpoint.java:1489)&nbsp;&nbsp;</span></li><li class="alt"><span>&nbsp;&nbsp;&nbsp;&nbsp;at&nbsp;java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)&nbsp;&nbsp;</span></li><li class=""><span>&nbsp;&nbsp;&nbsp;&nbsp;at&nbsp;java.util.concurrent.ThreadPoolExecutor Worker.run(ThreadPoolExecutor.java:617)  
  8.     at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)  
  9.     at java.lang.Thread.run(Thread.java:745)  
信息: Error parsing HTTP request header 
Note: further occurrences of HTTP header parsing errors will be logged at DEBUG level.
java.lang.IllegalArgumentException: Invalid character found in method name. HTTP method names must be tokens
at org.apache.coyote.http11.AbstractNioInputBuffer.parseRequestLine(AbstractNioInputBuffer.java:233)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1045)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:684)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1533)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1489)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:745)

2、错误原因

      由错误提示可知,是因为方法名内有不合法的字符


3、解决办法

(1)检查方法名称,去掉不合法的字符


        </article>
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值