In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-13 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly explains "what are the common Tomcat exceptions and solution codes". Interested friends may wish to take a look. The method introduced in this paper is simple, fast and practical. Now let the editor take you to learn "what are the common Tomcat exceptions and solution codes"?
Exception one:
1. Log content
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 found in method name. HTTP method names must be tokens
At 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. Solution
Add the last line to the conf/catalina.properties in the tomcat installation folder:
Org.apache.tomcat.util.buf.UDecoder.ALLOW_ENCODED_SLASH=true
Exception 2:
1. Log content
Com.alibaba.druid.stat.DruidStatService] unregister mbean errorjavax.management.InstanceNotFoundException: com.alibaba.druid:type=DruidStatService at 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 (NativeMethod) 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.springframework.web. Context.ContextLoaderListener.contextDestroyed (ContextLoaderListener.java:116) at org.apache.catalina.core.StandardContext.listenerStop (StandardContext.java:4900) at org.apache.catalina.core.StandardContext.stopInternal (StandardContext.java:5537) at org.apache.catalina.util.LifecycleBase.stop (LifecycleBase.java:221) at org.apache.catalina.core.ContainerBase$StopChild.call (ContainerBase.java:1424) at org.apache.catalina.core.ContainerBase$StopChild.call (ContainerBase.java:1413) at java.util.concurrent.FutureTask.run (FutureTask.java:262) at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:615) at java.lang.Thread.run (Thread.java:745)
2. Solution
Modify the catalina.sh file in the bin directory of tomcat, in # OS specific support. $var _ must_ be set to either true or false. Add JAVA_OPTS= "- Ddruid.registerToSysProperty=true" to cygwin=false
Exception 3:
1. Log content
INFO [http-nio-80-exec-16] 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 found in method name. HTTP method names must be tokens at org.apache.coyote.http11.AbstractNioInputBuffer.parseRequestLine (AbstractNioInputBuffer.java:236) at org.apache.coyote.http11.AbstractHttp11Processor.process (AbstractHttp11Processor.java:1065) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process (AbstractProtocol.java:684) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun (NioEndpoint.java:1539) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run (NioEndpoint.java: 1495) 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. Solution
Modify the conf/server.xml of the tomcat installation folder. In the, the default value of maxHttpHeaderSize is 8-1024, you just need to set it to the value you need.
At this point, I believe you have a deeper understanding of "what are the common Tomcat exceptions and solution codes". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.