NutzCN Logo
问答 java.nio.BufferOverflowException 异常问题
发布于 172天前 作者 qq_cdeebfe2 423 次浏览 复制 上一个帖子 下一个帖子
标签:

系统运行一段时间,tomcat就会一直抛出下面的异常,造成系统不能访问,是什么原因?

2018-11-30 10:20:43,014 org.nutz.mvc.impl.processor.FailProcessor.process(FailProcessor.java:28) WARN  - Error@/ :
java.nio.BufferOverflowException
	at java.nio.HeapByteBuffer.put(HeapByteBuffer.java:189)
	at org.apache.coyote.http11.Http11OutputBuffer.write(Http11OutputBuffer.java:454)
	at org.apache.coyote.http11.Http11OutputBuffer.write(Http11OutputBuffer.java:439)
	at org.apache.coyote.http11.Http11OutputBuffer.sendHeader(Http11OutputBuffer.java:399)
	at org.apache.coyote.http11.Http11Processor.prepareResponse(Http11Processor.java:1277)
	at org.apache.coyote.AbstractProcessor.action(AbstractProcessor.java:263)
	at org.apache.coyote.Response.action(Response.java:168)
	at org.apache.coyote.http11.Http11OutputBuffer.doWrite(Http11OutputBuffer.java:217)
	at org.apache.coyote.Response.doWrite(Response.java:517)
	at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:351)
	at org.apache.catalina.connector.OutputBuffer.flushByteBuffer(OutputBuffer.java:808)
	at org.apache.catalina.connector.OutputBuffer.realWriteChars(OutputBuffer.java:456)
	at org.apache.catalina.connector.OutputBuffer.flushCharBuffer(OutputBuffer.java:813)
	at org.apache.catalina.connector.OutputBuffer.append(OutputBuffer.java:746)
	at org.apache.catalina.connector.OutputBuffer.write(OutputBuffer.java:498)
	at org.apache.catalina.connector.CoyoteWriter.write(CoyoteWriter.java:148)
	at org.apache.velocity.io.VelocityWriter.flushBuffer(VelocityWriter.java:129)
	at org.apache.velocity.io.VelocityWriter.write(VelocityWriter.java:306)
	at org.apache.velocity.io.VelocityWriter.write(VelocityWriter.java:322)
	at org.apache.velocity.runtime.parser.node.ASTReference.render(ASTReference.java:491)
	at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:342)
	at org.apache.velocity.Template.merge(Template.java:356)
	at org.apache.velocity.Template.merge(Template.java:260)
	at org.apache.velocity.tools.view.VelocityView.performMerge(VelocityView.java:942)
	at org.apache.velocity.tools.view.VelocityView.merge(VelocityView.java:902)
	at com.cms.common.velocity.views.VelocityLayoutView.mergeTemplate(VelocityLayoutView.java:208)
	at com.cms.common.velocity.views.VelocityLayoutView.render(VelocityLayoutView.java:92)
	at org.nutz.mvc.impl.processor.ViewProcessor.process(ViewProcessor.java:66)
	at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44)
	at org.nutz.mvc.impl.processor.MethodInvokeProcessor.process(MethodInvokeProcessor.java:28)
	at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44)
	at org.nutz.mvc.impl.processor.AdaptorProcessor.process(AdaptorProcessor.java:33)
	at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44)
	at org.nutz.mvc.impl.processor.ActionFiltersProcessor.process(ActionFiltersProcessor.java:58)
	at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44)
	at com.cms.common.processor.XssSqlFilterProcessor.process(XssSqlFilterProcessor.java:37)
	at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44)
	at org.nutz.mvc.impl.processor.ModuleProcessor.process(ModuleProcessor.java:123)
	at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44)
	at org.nutz.mvc.impl.processor.EncodingProcessor.process(EncodingProcessor.java:27)
	at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44)
	at org.nutz.mvc.impl.processor.UpdateRequestAttributesProcessor.process(UpdateRequestAttributesProcessor.java:15)
	at org.nutz.mvc.impl.NutActionChain.doChain(NutActionChain.java:44)
	at org.nutz.mvc.impl.ActionInvoker.invoke(ActionInvoker.java:67)
	at org.nutz.mvc.ActionHandler.handle(ActionHandler.java:31)
	at org.nutz.mvc.NutFilter.doFilter(NutFilter.java:198)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:108)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
	at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:620)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:349)
	at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:783)
	at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
	at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:789)
	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1455)
	at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
	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)
30-Nov-2018 10:20:43.015 SEVERE [http-nio-8082-exec-8] org.apache.coyote.http11.Http11Processor.service Error processing request
 java.nio.BufferOverflowException
	at java.nio.HeapByteBuffer.put(HeapByteBuffer.java:189)
	at org.apache.coyote.http11.Http11OutputBuffer.write(Http11OutputBuffer.java:454)
	at org.apache.coyote.http11.Http11OutputBuffer.write(Http11OutputBuffer.java:439)
	at org.apache.coyote.http11.Http11OutputBuffer.sendHeader(Http11OutputBuffer.java:399)
	at org.apache.coyote.http11.Http11Processor.prepareResponse(Http11Processor.java:1277)
	at org.apache.coyote.AbstractProcessor.action(AbstractProcessor.java:263)
	at org.apache.coyote.Response.action(Response.java:168)
	at org.apache.coyote.http11.Http11OutputBuffer.doWrite(Http11OutputBuffer.java:217)
	at org.apache.coyote.Response.doWrite(Response.java:517)
	at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:351)
	at org.apache.catalina.connector.OutputBuffer.flushByteBuffer(OutputBuffer.java:808)
	at org.apache.catalina.connector.OutputBuffer.realWriteChars(OutputBuffer.java:456)
	at org.apache.catalina.connector.OutputBuffer.flushCharBuffer(OutputBuffer.java:813)
	at org.apache.catalina.connector.OutputBuffer.close(OutputBuffer.java:245)
	at org.apache.catalina.connector.Response.finishResponse(Response.java:484)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:379)
	at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:783)
	at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
	at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:789)
	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1455)
	at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
	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)

30-Nov-2018 10:20:43.016 SEVERE [http-nio-8082-exec-8] org.apache.coyote.http11.Http11Processor.endRequest Error finishing response
 java.nio.BufferOverflowException
	at java.nio.HeapByteBuffer.put(HeapByteBuffer.java:189)
	at org.apache.coyote.http11.Http11OutputBuffer.write(Http11OutputBuffer.java:454)
	at org.apache.coyote.http11.Http11OutputBuffer.write(Http11OutputBuffer.java:439)
	at org.apache.coyote.http11.Http11OutputBuffer.sendHeader(Http11OutputBuffer.java:399)
	at org.apache.coyote.http11.Http11Processor.prepareResponse(Http11Processor.java:1277)
	at org.apache.coyote.AbstractProcessor.action(AbstractProcessor.java:263)
	at org.apache.coyote.http11.Http11Processor.endRequest(Http11Processor.java:1457)
	at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:823)
	at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
	at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:789)
	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1455)
	at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
	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)

30-Nov-2018 10:20:43.291 SEVERE [http-nio-8082-exec-9] org.apache.coyote.http11.Http11Processor.service Error processing request
 java.nio.BufferOverflowException
	at java.nio.HeapByteBuffer.put(HeapByteBuffer.java:189)
	at org.apache.coyote.http11.Http11OutputBuffer.write(Http11OutputBuffer.java:454)
	at org.apache.coyote.http11.Http11OutputBuffer.write(Http11OutputBuffer.java:439)
	at org.apache.coyote.http11.Http11OutputBuffer.sendHeader(Http11OutputBuffer.java:399)
	at org.apache.coyote.http11.Http11Processor.prepareResponse(Http11Processor.java:1277)
	at org.apache.coyote.AbstractProcessor.action(AbstractProcessor.java:263)
	at org.apache.coyote.Response.action(Response.java:170)
	at org.apache.coyote.Response.sendHeaders(Response.java:352)
	at org.apache.catalina.connector.OutputBuffer.doFlush(OutputBuffer.java:303)
	at org.apache.catalina.connector.OutputBuffer.close(OutputBuffer.java:263)
	at org.apache.catalina.connector.Response.finishResponse(Response.java:484)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:379)
	at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:783)
	at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
	at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:789)
	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1455)
	at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
	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)

30-Nov-2018 10:20:43.292 SEVERE [http-nio-8082-exec-9] org.apache.coyote.http11.Http11Processor.endRequest Error finishing response
 java.nio.BufferOverflowException
	at java.nio.HeapByteBuffer.put(HeapByteBuffer.java:189)
	at org.apache.coyote.http11.Http11OutputBuffer.write(Http11OutputBuffer.java:454)
	at org.apache.coyote.http11.Http11OutputBuffer.write(Http11OutputBuffer.java:439)
	at org.apache.coyote.http11.Http11OutputBuffer.sendHeader(Http11OutputBuffer.java:399)
	at org.apache.coyote.http11.Http11Processor.prepareResponse(Http11Processor.java:1277)
	at org.apache.coyote.AbstractProcessor.action(AbstractProcessor.java:263)
	at org.apache.coyote.http11.Http11Processor.endRequest(Http11Processor.java:1457)
	at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:823)
	at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
	at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:789)
	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1455)
	at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
	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)
5 回复

tomcat的bug吧,升级一下版本

@wendal 现在使用的版本是8.5.8,升级到哪个版本比较好呢 ?

Server version: Apache Tomcat/8.5.8
Server number:  8.5.8.0
JVM Version:    1.8.0_121-b13

当然是最新版呀

@wendal 用tomcat9吗 ? 我还没有用过呢

tomcat 8.5.x系列的最新版

添加回复
请先登陆
回到顶部