公司項目,開發(fā)語言為java,中間件為tomcat,運行過程中,從tomcat出現(xiàn)了一些異常,現(xiàn)將異常及解決辦法記錄如下,僅供參考。(不斷在補充中…….)
異常一:
1、日志內(nèi)容
org.apache.coyote.http11.abstracthttp11processor.process error parsing http request headernote: 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 tokensat org.apache.coyote.http11.abstractnioinputbuffer.parserequestline(abstractnioinputbuffer.java:233)at org.apache.coyote.http11.abstracthttp11processor.process(abstracthttp11processor.java:1017)at org.apache.coyote.abstractprotocol$abstractconnectionhandler.process(abstractprotocol.java:684)at org.apache.tomcat.util.net.nioendpoint$socketprocessor.dorun(nioendpoint.java:1520)at org.apache.tomcat.util.net.nioendpoint$socketprocessor.run(nioendpoint.java:1476)at java.util.concurrent.threadpoolexecutor.runworker(threadpoolexecutor.java:1145)at java.util.concurrent.threadpoolexecutor$worker.run(threadpoolexecutor.java:615)at org.apache.tomcat.util.threads.taskthread$wrappingrunnable.run(taskthread.java:61)at java.lang.thread.run(thread.java:745)
2、解決辦法
在tomcat安裝文件夾的 conf/catalina.properties 中最后添加一行:
org.apache.tomcat.util.buf.udecoder.allow_encoded_slash=true
異常二:
1、日志內(nèi)容
12345678910111213141516171819202122232425262728293031323334353637com.alibaba.druid.stat.druidstatservice]unregister mbean errorjavax.management.instancenotfoundexception: com.alibaba.druid:type=druidstatserviceat com.sun.jmx.interceptor.defaultmbeanserverinterceptor.getmbean(defaultmbeanserverinterceptor.java:1095)at com.sun.jmx.interceptor.defaultmbeanserverinterceptor.exclusiveunregistermbean(defaultmbeanserverinterceptor.java:427)at com.sun.jmx.interceptor.defaultmbeanserverinterceptor.unregistermbean(defaultmbeanserverinterceptor.java:415)at com.sun.jmx.mbeanserver.jmxmbeanserver.unregistermbean(jmxmbeanserver.java:546)at com.alibaba.druid.stat.druidstatservice.unregistermbean(druidstatservice.java:374)at com.alibaba.druid.stat.druiddatasourcestatmanager.removedatasource(druiddatasourcestatmanager.java:202)at com.alibaba.druid.pool.druiddatasource$2.run(druiddatasource.java:1479)at java.security.accesscontroller.doprivileged(native method)at com.alibaba.druid.pool.druiddatasource.unregistermbean(druiddatasource.java:1475)at com.alibaba.druid.pool.druiddatasource.close(druiddatasource.java:1434)at sun.reflect.nativemethodaccessorimpl.invoke0(native method)at sun.reflect.nativemethodaccessorimpl.invoke(nativemethodaccessorimpl.java:57)at sun.reflect.delegatingmethodaccessorimpl.invoke(delegatingmethodaccessorimpl.java:43)at java.lang.reflect.method.invoke(method.java:606)at org.springframework.beans.factory.support.disposablebeanadapter.invokecustomdestroymethod(disposablebeanadapter.java:354)at org.springframework.beans.factory.support.disposablebeanadapter.destroy(disposablebeanadapter.java:277)at org.springframework.beans.factory.support.defaultsingletonbeanregistry.destroybean(defaultsingletonbeanregistry.java:578)at org.springframework.beans.factory.support.defaultsingletonbeanregistry.destroysingleton(defaultsingletonbeanregistry.java:554)at org.springframework.beans.factory.support.defaultlistablebeanfactory.destroysingleton(defaultlistablebeanfactory.java:972)at org.springframework.beans.factory.support.defaultsingletonbeanregistry.destroysingletons(defaultsingletonbeanregistry.java:523)at org.springframework.beans.factory.support.defaultlistablebeanfactory.destroysingletons(defaultlistablebeanfactory.java:979)at org.springframework.context.support.abstractapplicationcontext.destroybeans(abstractapplicationcontext.java:1006)at org.springframework.context.support.abstractapplicationcontext.doclose(abstractapplicationcontext.java:982)at org.springframework.context.support.abstractapplicationcontext.close(abstractapplicationcontext.java:934)at org.springframework.web.context.contextloader.closewebapplicationcontext(contextloader.java:583)at org.springf