陈奇网络工作室

Tomcat常见异常和解决方案代码示例

公司的项目、开发语言为java,中间件为Tomcat,在运行过程中,Tomcat出现了一些异常。 在此将异常和解决方案记录如下。 仅供参考。 (不断补充中………)。

异常1 :

1、日志内容

org.Apache.coyote.http 11.abstract http 11 processor.processerrorparsinghttprequestheadernote:furtheroccurrencesofhttp alargumentexception:invalidcharacterfoundinmethodname.httpmethodnamesmustbetokener te.http 11.abstractnioinputbuffer.papttttttion atorg.Apache.coyote.http 11.abstract http 11 processor.process ( abstract http 11 processor.Java:1017 ) )。 atorg.Apache.coyote.abstract protocol $ abstractconnectionhandler.process ( abstract protocol.Java:684 ) )。 atorg.Apache.Tomcat.util.net.nio endpoint $ socket processor.do run ( nio endpoint.Java:1520 ) )。 atorg.Apache.Tomcat.util.net.nio endpoint $ socket processor.run ( nio endpoint.Java:1476 ) )。 at Java.util.concurrent.thread pool executor.run worker ( thread pool executor.Java:1145 ) )。 at Java.util.concurrent.thread pool executor $ worker.run ( thread pool executor.Java:615 ) )。 atorg.Apache.Tomcat.util.threads.task thread $ wrapping runnable.run ( task thread.Java:61 ) atJava.Lang.Threead

2、解决办法

将最后一行添加到tomcat安装文件夹conf/catalina.properties中。

org.Apache.Tomcat.util.buf.u decoder.allow _ encoded _ slash=true

异常2 :

1、日志内容

123456789101121314151617181920212232422324262829303132334353637 com.Alibaba.druid.stat.druidstatservice ] unregistermbeanerrorjavax.management.instancenotfoundexception:com.Alibaba.druid:type=druidstatserviceatcom.su atcom.sun.JMX.interceptor.defaultmbeanserverinterceptor.exclusiveunregistermbean ( defaultmbeanserverinterceptor.jeptor ) com.sun.JMX.interceptor.defaultmbeanserverinterceptor.unregister mbean ( defaultmbeanserverinterceptor.Java:415 ate atcom.Alibaba.druid.stat.druidstatservice.unregister mbean ( druidstatservice.Java:374 ) )。 atcom.Alibaba.druid.stat.druiddatasourcestatmanager.remove data source statmanager.Java:202 )。 atcom.Alibaba.druid.pool.druid data source $2. run ( druid data source.Java:1479 ) at Java.security.accesscontroll atcom.Alibaba.druid.pool.druid data source.close ( druid data source.Java:1434 ) at sun.reflect.nativemethodaccccccesesssssesce at sun.reflect.delegatingmethodaccessorimpl.invoke ( delegatingmethodaccessorimpl.Java:43 ) at Java.lang.reflect . support.disposablebeanadapter.invokecustomdestroymethod ( disposablebeanadapter.invokecustomdestroymethod ) ory.support.disposablebeanadapter.destroy ( disposablebeanadapter.Java:277 ) )。 atorg.spring framework.beans.factory.support.defaultsingletonbeanregistry.destroy bean ( atorg.spring framework.bework ) registry.destroy singleton ( atorg.spring framework.beans.factory.support.defaultlistablebeanfactory.destroy singled . support.defaultsingletonbeanregistry.destroy singletons ( atorg.spring framework.beans.factory.support.defaultltlid g.spring framework.context.support.abstractapplicationcontext.destroy beans ( abstractapplicationcontext.Java )。 atorg.spring framework.context.support.abstractapplicationcontext.do close ( abstractapplicationcontext.Java:982 ) atorg.spring framework.context.support.abstractapplicationcontext.close ( abstractapplicationcontext.Java:934 ) atorg.spring framework.web.context.context loader.closewebapplicationcontext ( context loader.Java:583 ) )。 atorg.spring framework.web.context.contextloaderlistener.context destroyed ( contextloaderlistener.Java:116 ) atored atorg.Apache.catalina.core.standard context.stop internal ( standard context.Java:5537 ) )。 atorg.Apache.catalina.util.life cycle base.stop ( life cycle base.Java:221 ) )。 atorg.Apache.catalina.core.container base $ stop child.call ( container base.Java:1424 ) )。 atorg.Apache.catalina.core.container base $ stop child.call ( container base.Java:1413 ) at Java.util.conconcorrrent at Java.util.concurrent.thread pool executor $ worker.run ( thread pool executor.Java:615 ) at Java.lang.thread.ru

2、解决办法

修改Tomcat bin目录中的catalina.sh文件,以在# osspecificsupport.$ var _ must _ besettoeithertrueorfalse .和cygwin=false之间

异常3 :

1、日志内容

123456789101112 info [ http-nio-80-exec-16 ] org.Apache.coyote.http 11.abstract http 11 processor.processerrorparsinghttprequestheadernote:furtheroccurrencesofhttp galargumentexception:invalidcharacterfoundinmethodname.httpmethodnamesmustbetokener ote.http 11.abstractnioinputbufer . atorg.Apache.coyote.http 11.abstract http 11 processor.process ( abstract http 11 processor.Java:1065 ) )。 atorg.Apache.coyote.abstract protocol $ abstractconnectionhandler.process ( abstract protocol.Java:684 ) )。 atorg.Apache.Tomcat.util.net.nio endpoint $ socket processor.do run ( nio endpoint.Java:1539 ) )。 atorg.Apache.Tomcat.util.net.nio endpoint $ socket processor.run ( nio endpoint.Java:1495 ) )。 at Java.util.concurrent.thread pool executor.run worker ( thread pool executor.Java:1145 ) )。 at Java.util.concurrent.thread pool executor $ worker.run ( thread pool executor.Java:615 ) )。 atorg.Apache.Tomcat.util.threads.task thread $ wrapping runnable.run ( task thread.Java:61 ) atJava.Lang.Threead

2、解决办法

修改tomcat安装文件夹conf/server.xml,然后单击connectorport=& #039; 8080& #039; protocol=& #039; http/1.1& #039; connectiontimeout=& #039; 20000& #039; maxhttpheadeadeent

详情请访问云服务器、域名注册、虚拟主机的问题,请访问西部数码代理商官方网站: www.chenqinet.cn

相关推荐

后台-系统设置-扩展变量-手机广告位-内容页底部广告位3