zoukankan      html  css  js  c++  java
  • java.lang.IllegalArgumentException: Invalid character (CR or LF) found in method name

    1、错误描述

    九月 13, 2017 8:53:24 下午 org.apache.coyote.http11.AbstractHttp11Processor process
    信息: Error parsing HTTP request header
     Note: further occurrences of HTTP header parsing errors will be logged at DEBUG level.
    java.lang.IllegalArgumentException: Invalid character (CR or LF) found in method name
    	at org.apache.coyote.http11.InternalInputBuffer.parseRequestLine(InternalInputBuffer.java:131)
    	at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:992)
    	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:625)
    	at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:316)
    	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
    	at java.lang.Thread.run(Thread.java:748)
    九月 13, 2017 8:53:34 下午 org.apache.coyote.http11.AbstractHttp11Processor process
    信息: Error parsing HTTP request header
     Note: further occurrences of HTTP header parsing errors will be logged at DEBUG level.
    java.lang.IllegalArgumentException: Invalid character (CR or LF) found in method name
    	at org.apache.coyote.http11.InternalInputBuffer.parseRequestLine(InternalInputBuffer.java:131)
    	at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:992)
    	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:625)
    	at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:316)
    	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
    	at java.lang.Thread.run(Thread.java:748)
    九月 13, 2017 8:53:44 下午 org.apache.coyote.http11.AbstractHttp11Processor process
    信息: Error parsing HTTP request header
     Note: further occurrences of HTTP header parsing errors will be logged at DEBUG level.
    java.lang.IllegalArgumentException: Invalid character (CR or LF) found in method name
    	at org.apache.coyote.http11.InternalInputBuffer.parseRequestLine(InternalInputBuffer.java:131)
    	at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:992)
    	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:625)
    	at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:316)
    	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
    	at java.lang.Thread.run(Thread.java:748)
    九月 13, 2017 8:53:54 下午 org.apache.coyote.http11.AbstractHttp11Processor process
    信息: Error parsing HTTP request header
     Note: further occurrences of HTTP header parsing errors will be logged at DEBUG level.
    java.lang.IllegalArgumentException: Invalid character (CR or LF) found in method name
    	at org.apache.coyote.http11.InternalInputBuffer.parseRequestLine(InternalInputBuffer.java:131)
    	at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:992)
    	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:625)
    	at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:316)
    	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
    	at java.lang.Thread.run(Thread.java:748)
    

    2、错误原因

    (1)由这句“ Note: further occurrences of HTTP header parsing errors will be logged at DEBUG level”,查看资料有显示是Tomcat的header缓冲区大小不够,需要修改server.xml中的maxHttpHeaderSize属性值

    (2)由“ Invalid character (CR or LF) found in method name”提示可知,是因为方法名中出现不合法的字符


    3、解决办法

    (1)针对第一个原因,我修改了maxHttpHeaderSize值,发现这个问题还是出现

    (2)检查代码发现,还是方法名带有不合法字符导致

  • 相关阅读:
    css3动画
    jquery和js进行添加样式
    网站基本了解
    新闻内容显示样式去除
    网页中常用的js特效
    手机和电脑同时兼容的网站
    使用repeter绑定数据的最高效率的方法
    常识(其他)
    OI暑假集训游记
    动态规划归纳(基础篇)
  • 原文地址:https://www.cnblogs.com/hzcya1995/p/13313828.html
Copyright © 2011-2022 走看看