错误信息:

2017-1-17 10:09:39 org.apache.catalina.core.StandardWrapperValve invoke
严重: Servlet.service() for servlet springServlet threw exception
java.lang.ArrayIndexOutOfBoundsException: 8192
at org.apache.coyote.http11.InternalOutputBuffer.write(InternalOutputBuffer.java:735)
at org.apache.coyote.http11.InternalOutputBuffer.write(InternalOutputBuffer.java:646)
at org.apache.coyote.http11.InternalOutputBuffer.sendHeader(InternalOutputBuffer.java:519)
at org.apache.coyote.http11.Http11Processor.prepareResponse(Http11Processor.java:1653)
at org.apache.coyote.http11.Http11Processor.action(Http11Processor.java:958)
at org.apache.coyote.Response.action(Response.java:184)
at org.apache.coyote.http11.InternalOutputBuffer.doWrite(InternalOutputBuffer.java:591)
at org.apache.coyote.Response.doWrite(Response.java:533)
at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:364)
at org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:339)
at org.apache.tomcat.util.buf.IntermediateOutputStream.write(C2BConverter.java:242)
at sun.nio.cs.StreamEncoder.writeBytes(StreamEncoder.java:202)
at sun.nio.cs.StreamEncoder.implWrite(StreamEncoder.java:263)
at sun.nio.cs.StreamEncoder.write(StreamEncoder.java:106)
at sun.nio.cs.StreamEncoder.write(StreamEncoder.java:116)
at java.io.OutputStreamWriter.write(OutputStreamWriter.java:203)
at org.apache.tomcat.util.buf.C2BConverter.convert(C2BConverter.java:87)
at org.apache.catalina.connector.OutputBuffer.write(OutputBuffer.java:468)
at org.apache.catalina.connector.CoyoteWriter.write(CoyoteWriter.java:162)
at org.apache.catalina.connector.CoyoteWriter.write(CoyoteWriter.java:171)
at org.apache.catalina.connector.CoyoteWriter.print(CoyoteWriter.java:221)
at kingtool.HttpTool.writeInfo(HttpTool.java:218)
at com.bobo.code.web.controller.WebPltmConfController.connect(WebPltmConfController.java:99)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.springframework.web.bind.annotation.support.HandlerMethodInvoker.invokeHandlerMethod(HandlerMethodInvoker.java:176)
at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.invokeHandlerMethod(AnnotationMethodHandlerAdapter.java:436)
at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.handle(AnnotationMethodHandlerAdapter.java:424)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:790)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:719)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:669)
at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:585)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:643)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:723)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
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:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:861)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:606)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Thread.java:662)
2017-1-17 10:09:39 org.apache.coyote.http11.Http11Processor process
严重: Error processing request
java.lang.ArrayIndexOutOfBoundsException
at java.lang.System.arraycopy(Native Method)
at org.apache.coyote.http11.InternalOutputBuffer.write(InternalOutputBuffer.java:706)
at org.apache.coyote.http11.InternalOutputBuffer.sendStatus(InternalOutputBuffer.java:443)
at org.apache.coyote.http11.Http11Processor.prepareResponse(Http11Processor.java:1640)
at org.apache.coyote.http11.Http11Processor.action(Http11Processor.java:958)
at org.apache.coyote.Response.action(Response.java:186)
at org.apache.coyote.Response.sendHeaders(Response.java:382)
at org.apache.catalina.connector.OutputBuffer.doFlush(OutputBuffer.java:314)
at org.apache.catalina.connector.OutputBuffer.flush(OutputBuffer.java:296)
at org.apache.catalina.connector.Response.flushBuffer(Response.java:549)
at org.apache.catalina.core.StandardHostValve.status(StandardHostValve.java:344)
at org.apache.catalina.core.StandardHostValve.throwable(StandardHostValve.java:286)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:861)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:606)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Thread.java:662)
2017-1-17 10:09:39 org.apache.coyote.http11.Http11Processor process
严重: Error finishing response
java.lang.ArrayIndexOutOfBoundsException
at java.lang.System.arraycopy(Native Method)
at org.apache.coyote.http11.InternalOutputBuffer.write(InternalOutputBuffer.java:706)
at org.apache.coyote.http11.InternalOutputBuffer.sendStatus(InternalOutputBuffer.java:443)
at org.apache.coyote.http11.Http11Processor.prepareResponse(Http11Processor.java:1640)
at org.apache.coyote.http11.Http11Processor.action(Http11Processor.java:958)
at org.apache.coyote.Response.action(Response.java:184)
at org.apache.coyote.http11.InternalOutputBuffer.endRequest(InternalOutputBuffer.java:403)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:903)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:606)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Thread.java:662)

解决方案:

在weblogic下一模一样的代码,没有报错,tomcat却报错了,所以就怀疑是tomcat server本身存在问题.

一番百度后, 原来是tomcat默认的maxHttpHeaderSize只有8192,而我cookie放了大报文,导致head头信息量过大,无法存放.

在<connector> 节点中添加 maxHttpHeaderSize="81920" 解决问题,如下 :

<Connector connectionTimeout="20000" port="8080" protocol="HTTP/1.1" redirectPort="8443" maxHttpHeaderSize="81920"/>

最终发现<Connector中还可以配置最大线程 maxThreads="250"  超时时间connectionTimeout="20000" 等

Tomcat 或JBOSS java.lang.ArrayIndexOutOfBoundsException: 8192 解决方案【转】的更多相关文章

  1. Tomcat 或JBOSS java.lang.ArrayIndexOutOfBoundsException: 8192原因及其解决方法

    2018-04-02 09:24:55 org.apache.catalina.connector.CoyoteAdapter service 严重: An exception or error oc ...

  2. split("\\,")引起的java.lang.ArrayIndexOutOfBoundsException异常解决方案

    由split("\,")引起的指标越界异常 如果字符串最后分隔符里的字段为空,使用split("\\,")进行切割时,最后的空字段不会切割 例如"a, ...

  3. android listview Caused by: java.lang.ArrayIndexOutOfBoundsException: length=3; index=3

    android listview 适配器在多种类型viewType报错: Caused by: java.lang.ArrayIndexOutOfBoundsException: length=3; ...

  4. Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 1

    场景:eclipse中编写java中用到数组 问题: 程序不报错但是运行过程中 终止,显示字样 “ Exception in thread "main" java.lang.Arr ...

  5. java 中 java.lang.ArrayIndexOutOfBoundsException: 0 异常

    package test; public class Test { public static void main(String[] args) { final int num2 = Integer. ...

  6. ListView中使用type需要注意的东西 java.lang.ArrayIndexOutOfBoundsException: length=2; index=2 addScrapView

    ListView中使用type需要注意的东西 在使用ListView时,如果使用了getItemViewType, 记得他的值一定要是从0开始计数的. 且要覆盖getViewTypeCount方法.并 ...

  7. Java - 错误: &quot;java.lang.ArrayIndexOutOfBoundsException: length=1; index=1&quot;

    错误: "java.lang.ArrayIndexOutOfBoundsException: length=1; index=1" 本文地址: http://blog.csdn.n ...

  8. getActionBar().setTitle(); Java.lang.NullPoint异常解决方案

    getActionBar().setTitle(); Java.lang.NullPoint异常解决方案,是由于低版本不支持直接获取的缘故,修改方案: try changing your theme ...

  9. java.lang.ArrayIndexOutOfBoundsException

    1.错误描述 Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 0 at com.you.m ...

随机推荐

  1. vue props 用法(转载)

    前面的话 组件接受的选项大部分与Vue实例一样,而选项props是组件中非常重要的一个选项.在 Vue 中,父子组件的关系可以总结为 props down, events up.父组件通过 props ...

  2. 自己写的browse.bat与perl写的url_handler.pl的比较

    以前自己也写过Windows下自动打开多个浏览器测试某个URI,提高浏览器兼容性测试效率. 但是写的browse.bat文件还是最基础简陋的 @echo off if '%1'=='-c' ( sta ...

  3. 手动安装ettercap的过程

    知乎推送了一个中间人攻击的软件 ettercap 想着尝试进行一下安装学习, 如果有机会的话安全测试部分应该用的到. 1. 下载: wget https://codeload.github.com/E ...

  4. python之字典操作

    字典操作代码如下: #数据字典操作汇总 person = {'name': 'Mike', 'age': 25} print("初始的数据字典:", person) #访问字典值 ...

  5. Java MD5Util

    package util; import java.security.MessageDigest; public class MD5Util {  public static String strin ...

  6. webapi Get Post

    转载:http://www.cnblogs.com/Juvy/p/3903974.html 在WebAPI中,请求主体(HttpContent)只能被读取一次,不被缓存,只能向前读取的流. 举例子说明 ...

  7. Codeforces Round #420 (Div. 2) A,B,C

    A. Okabe and Future Gadget Laboratory time limit per test 2 seconds memory limit per test 256 megaby ...

  8. 学习Spring Boot:(二十五)使用 Redis 实现数据缓存

    前言 由于 Ehcache 存在于单个 java 程序的进程中,无法满足多个程序分布式的情况,需要将多个服务器的缓存集中起来进行管理,需要一个缓存的寄存器,这里使用的是 Redis. 正文 当应用程序 ...

  9. 【BZOJ2227】[ZJOI2011]看电影(组合数学,高精度)

    [BZOJ2227][ZJOI2011]看电影(组合数学,高精度) 题面 BZOJ 洛谷 题解 这题太神仙了. 首先\(K<N\)则必定无解,直接特判解决. 现在只考虑\(K\ge N\)的情况 ...

  10. 洛谷 P2059 [JLOI2013]卡牌游戏 解题报告

    P2059 [JLOI2013]卡牌游戏 题意 有\(n\)个人玩约瑟夫游戏,有\(m\)张卡,每张卡上有一个正整数,每次庄家有放回的抽一张卡,干掉从庄家起顺时针的第\(k\)个人(计算庄家),干掉的 ...