java.lang.illegalstateexception--Good headache

Source: Internet
Author: User
Tags stack trace zookeeper tomcat server log4j

In my east, down a project will always appear to start the problem, these problems are often found in the compile time, when your server starts, is a piece of error, some problems can be detected by the abnormal information, where the configuration is wrong, but there are some cases, From the exception of the hint information can not see exactly where the problem, such as the following this abnormal information, I can not immediately locate where the wrong.

August 05, 2017 11:09:53 am Org.apache.catalina.loader.WebappClassLoader clearreferencesjdbc
Critical: The Web application [] registered the JDBC driver [Com.mysql.jdbc.Driver] but failed-unregister it when the Web App Lication was stopped. To prevent a memory leak, the JDBC Driver have been forcibly unregistered.
August 05, 2017 11:09:53 am Org.apache.catalina.loader.WebappClassLoader checkthreadlocalmapforleaks
Critical: The Web application [] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [[email protected]]) and A value of type [IO.NETTY.UTIL.INTERNAL.INTERNALTHREADLOCALMAP] (value [[email protected]]) but failed to remove it when t He web application was stopped. Threads is going to being renewed over time to try and avoid a probable memory leak.
August 05, 2017 11:09:53 am Org.apache.catalina.loader.WebappClassLoader checkthreadlocalmapforleaks
Critical: The Web application [] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [[email protected]]) and A value of type [IO.NETTY.UTIL.INTERNAL.INTERNALTHREADLOCALMAP] (value [[email protected]]) but failed to remove it when t He web application was stopped. Threads is going to being renewed over time to try and avoid a probable memory leak.
August 05, 2017 11:09:53 am Org.apache.catalina.loader.WebappClassLoader checkthreadlocalmapforleaks
Critical: The Web application [] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [[email protected]]) and A value of type [IO.NETTY.UTIL.INTERNAL.INTERNALTHREADLOCALMAP] (value [[email protected]]) but failed to remove it when t He web application was stopped. Threads is going to being renewed over time to try and avoid a probable memory leak.
August 05, 2017 11:09:53 am Org.apache.catalina.loader.WebappClassLoader checkthreadlocalmapforleaks
Critical: The Web application [] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [[email protected]]) and A value of type [IO.NETTY.UTIL.INTERNAL.INTERNALTHREADLOCALMAP] (value [[email protected]]) but failed to remove it when t He web application was stopped. Threads is going to being renewed over time to try and avoid a probable memory leak.
August 05, 2017 11:09:53 am Org.apache.catalina.loader.WebappClassLoader checkthreadlocalmapforleaks
Critical: The Web application [] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [[email protected]]) and A value of type [IO.NETTY.UTIL.INTERNAL.INTERNALTHREADLOCALMAP] (value [[email protected]]) but failed to remove it when t He web application was stopped. Threads is going to being renewed over time to try and avoid a probable memory leak.
August 05, 2017 11:09:54 am Org.apache.catalina.loader.WebappClassLoader loadclass
Info: Illegal Access:this Web application instance has been stopped already. Could not load Org.apache.jute.binaryinputarchive$binaryindex. The eventual following stack trace is caused by a error thrown for debugging purposes as well as to attempt to terminate The thread which caused the illegal access, and has no functional impact.
Java.lang.IllegalStateException
At Org.apache.catalina.loader.WebappClassLoader.loadClass (webappclassloader.java:1612)
At Org.apache.catalina.loader.WebappClassLoader.loadClass (webappclassloader.java:1571)
At Org.apache.jute.BinaryInputArchive.startVector (binaryinputarchive.java:120)
At Org.apache.zookeeper.proto.GetChildrenResponse.deserialize (getchildrenresponse.java:54)
At Org.apache.zookeeper.clientcnxn$sendthread.readresponse (clientcnxn.java:808)
At Org.apache.zookeeper.ClientCnxnSocketNIO.doIO (clientcnxnsocketnio.java:89)
At Org.apache.zookeeper.ClientCnxnSocketNIO.doTransport (clientcnxnsocketnio.java:291)
At Org.apache.zookeeper.clientcnxn$sendthread.run (clientcnxn.java:1041)

August 05, 2017 11:09:54 am Org.apache.catalina.loader.WebappClassLoader loadclass
Info: Illegal Access:this Web application instance has been stopped already. Could not load Org.apache.logging.log4j.core.impl.ThrowableProxy. The eventual following stack trace is caused by a error thrown for debugging purposes as well as to attempt to terminate The thread which caused the illegal access, and has no functional impact.
Java.lang.IllegalStateException
At Org.apache.catalina.loader.WebappClassLoader.loadClass (webappclassloader.java:1612)
At Org.apache.catalina.loader.WebappClassLoader.loadClass (webappclassloader.java:1571)
At Org.apache.logging.log4j.core.impl.Log4jLogEvent.getThrownProxy (log4jlogevent.java:530)
At Org.apache.logging.log4j.core.pattern.ExtendedThrowablePatternConverter.format ( EXTENDEDTHROWABLEPATTERNCONVERTER.JAVA:61)
At Org.apache.logging.log4j.core.pattern.PatternFormatter.format (patternformatter.java:38)
At Org.apache.logging.log4j.core.layout.patternlayout$patternserializer.toserializable (PatternLayout.java:288)
At Org.apache.logging.log4j.core.layout.PatternLayout.toText (patternlayout.java:194)
At Org.apache.logging.log4j.core.layout.PatternLayout.encode (patternlayout.java:180)
At Org.apache.logging.log4j.core.layout.PatternLayout.encode (patternlayout.java:57)
At Org.apache.logging.log4j.core.appender.AbstractOutputStreamAppender.directEncodeEvent ( ABSTRACTOUTPUTSTREAMAPPENDER.JAVA:120)
At Org.apache.logging.log4j.core.appender.AbstractOutputStreamAppender.tryAppend ( abstractoutputstreamappender.java:113)
At Org.apache.logging.log4j.core.appender.AbstractOutputStreamAppender.append (Abstractoutputstreamappender.java : 104)
At Org.apache.logging.log4j.core.config.AppenderControl.tryCallAppender (appendercontrol.java:155)
At Org.apache.logging.log4j.core.config.AppenderControl.callAppender0 (appendercontrol.java:128)
At Org.apache.logging.log4j.core.config.AppenderControl.callAppenderPreventRecursion (appendercontrol.java:119)
At Org.apache.logging.log4j.core.config.AppenderControl.callAppender (appendercontrol.java:84)
At Org.apache.logging.log4j.core.config.LoggerConfig.callAppenders (loggerconfig.java:390)
At Org.apache.logging.log4j.core.config.LoggerConfig.processLogEvent (loggerconfig.java:375)
At Org.apache.logging.log4j.core.config.LoggerConfig.log (loggerconfig.java:359)
At Org.apache.logging.log4j.core.config.LoggerConfig.log (loggerconfig.java:349)
At Org.apache.logging.log4j.core.config.AwaitCompletionReliabilityStrategy.log ( AWAITCOMPLETIONRELIABILITYSTRATEGY.JAVA:63)
At Org.apache.logging.log4j.core.Logger.logMessage (logger.java:146)
At Org.apache.logging.log4j.spi.AbstractLogger.logMessage (abstractlogger.java:2002)
At org.apache.logging.log4j.spi.AbstractLogger.logIfEnabled (abstractlogger.java:1974)
At Org.apache.logging.slf4j.Log4jLogger.warn (log4jlogger.java:259)
At Org.apache.zookeeper.clientcnxn$sendthread.run (clientcnxn.java:1063)

August 05, 2017 11:09:54 am Org.apache.catalina.loader.WebappClassLoader loadclass
Info: Illegal Access:this Web application instance has been stopped already. Could not load Org.apache.logging.log4j.core.impl.ThrowableProxy. The eventual following stack trace is caused by a error thrown for debugging purposes as well as to attempt to terminate The thread which caused the illegal access, and has no functional impact.
Java.lang.IllegalStateException
At Org.apache.catalina.loader.WebappClassLoader.loadClass (webappclassloader.java:1612)
At Org.apache.catalina.loader.WebappClassLoader.loadClass (webappclassloader.java:1571)
At Org.apache.logging.log4j.core.impl.Log4jLogEvent.getThrownProxy (log4jlogevent.java:530)
At Org.apache.logging.log4j.core.pattern.ExtendedThrowablePatternConverter.format ( EXTENDEDTHROWABLEPATTERNCONVERTER.JAVA:61)
At Org.apache.logging.log4j.core.pattern.PatternFormatter.format (patternformatter.java:38)
At Org.apache.logging.log4j.core.layout.patternlayout$patternserializer.toserializable (PatternLayout.java:288)
At Org.apache.logging.log4j.core.layout.PatternLayout.toText (patternlayout.java:194)
At Org.apache.logging.log4j.core.layout.PatternLayout.encode (patternlayout.java:180)
At Org.apache.logging.log4j.core.layout.PatternLayout.encode (patternlayout.java:57)
At Org.apache.logging.log4j.core.appender.AbstractOutputStreamAppender.directEncodeEvent ( ABSTRACTOUTPUTSTREAMAPPENDER.JAVA:120)
At Org.apache.logging.log4j.core.appender.AbstractOutputStreamAppender.tryAppend ( abstractoutputstreamappender.java:113)
At Org.apache.logging.log4j.core.appender.AbstractOutputStreamAppender.append (Abstractoutputstreamappender.java : 104)
At Org.apache.logging.log4j.core.config.AppenderControl.tryCallAppender (appendercontrol.java:155)
At Org.apache.logging.log4j.core.config.AppenderControl.callAppender0 (appendercontrol.java:128)
At Org.apache.logging.log4j.core.config.AppenderControl.callAppenderPreventRecursion (appendercontrol.java:119)
At Org.apache.logging.log4j.core.config.AppenderControl.callAppender (appendercontrol.java:84)
At Org.apache.logging.log4j.core.config.LoggerConfig.callAppenders (loggerconfig.java:390)
At Org.apache.logging.log4j.core.config.LoggerConfig.processLogEvent (loggerconfig.java:375)
At Org.apache.logging.log4j.core.config.LoggerConfig.log (loggerconfig.java:359)
At Org.apache.logging.log4j.core.config.LoggerConfig.log (loggerconfig.java:349)
At Org.apache.logging.log4j.core.config.AwaitCompletionReliabilityStrategy.log ( AWAITCOMPLETIONRELIABILITYSTRATEGY.JAVA:63)
At Org.apache.logging.log4j.core.Logger.logMessage (logger.java:146)
At Org.apache.logging.log4j.spi.AbstractLogger.logMessage (abstractlogger.java:2002)
At org.apache.logging.log4j.spi.AbstractLogger.logIfEnabled (abstractlogger.java:1974)
At Org.apache.logging.slf4j.Log4jLogger.info (log4jlogger.java:199)
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)

Exception in Thread "Pool-3-thread-1" java.lang.noclassdeffounderror:org/apache/logging/log4j/core/impl/ Throwableproxy
At Org.apache.logging.log4j.core.impl.Log4jLogEvent.getThrownProxy (log4jlogevent.java:530)
At Org.apache.logging.log4j.core.pattern.ExtendedThrowablePatternConverter.format ( EXTENDEDTHROWABLEPATTERNCONVERTER.JAVA:61)
At Org.apache.logging.log4j.core.pattern.PatternFormatter.format (patternformatter.java:38)
At Org.apache.logging.log4j.core.layout.patternlayout$patternserializer.toserializable (PatternLayout.java:288)
At Org.apache.logging.log4j.core.layout.PatternLayout.toText (patternlayout.java:194)
At Org.apache.logging.log4j.core.layout.PatternLayout.encode (patternlayout.java:180)
At Org.apache.logging.log4j.core.layout.PatternLayout.encode (patternlayout.java:57)
At Org.apache.logging.log4j.core.appender.AbstractOutputStreamAppender.directEncodeEvent ( ABSTRACTOUTPUTSTREAMAPPENDER.JAVA:120)
At Org.apache.logging.log4j.core.appender.AbstractOutputStreamAppender.tryAppend ( abstractoutputstreamappender.java:113)
At Org.apache.logging.log4j.core.appender.AbstractOutputStreamAppender.append (Abstractoutputstreamappender.java : 104)
At Org.apache.logging.log4j.core.config.AppenderControl.tryCallAppender (appendercontrol.java:155)
At Org.apache.logging.log4j.core.config.AppenderControl.callAppender0 (appendercontrol.java:128)
At Org.apache.logging.log4j.core.config.AppenderControl.callAppenderPreventRecursion (appendercontrol.java:119)
At Org.apache.logging.log4j.core.config.AppenderControl.callAppender (appendercontrol.java:84)
At Org.apache.logging.log4j.core.config.LoggerConfig.callAppenders (loggerconfig.java:390)
At Org.apache.logging.log4j.core.config.LoggerConfig.processLogEvent (loggerconfig.java:375)
At Org.apache.logging.log4j.core.config.LoggerConfig.log (loggerconfig.java:359)
At Org.apache.logging.log4j.core.config.LoggerConfig.log (loggerconfig.java:349)
At Org.apache.logging.log4j.core.config.AwaitCompletionReliabilityStrategy.log ( AWAITCOMPLETIONRELIABILITYSTRATEGY.JAVA:63)
At Org.apache.logging.log4j.core.Logger.logMessage (logger.java:146)
At Org.apache.logging.log4j.spi.AbstractLogger.logMessage (abstractlogger.java:2002)
At org.apache.logging.log4j.spi.AbstractLogger.logIfEnabled (abstractlogger.java:1974)
At Org.apache.logging.slf4j.Log4jLogger.info (log4jlogger.java:199)
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)

I've analyzed some anomalies before, but the situation is that the previous methods seem to be less effective because there is nothing in the exception that is related to the code we write directly. I saw a problem with the class not found, so I searched it as shown:

Yes, it is! Strange, is maven relying on conflict? I'll check it again.

No reliance on conflict! I'm going to get it.

Compile no problem, start Tomcat Server Leng start up, that means the code itself is not a problem, it should be a configuration problem, but exactly where the wrong configuration? I have to go back to the end. Check the configuration of each configuration file, database, cache, remote interface call, send asynchronous message, distributed configuration management, etc., have looked over or did not find the problem. Baidu Bar! Search from the Internet, or there is no idea, and then asked the colleague M to see if he met a similar problem no, not to defy, I spent a small half a day did not solve the problem, he will find the reason. (This may be a case of lookers, onlooker sees most)

The log files configured in my web. xml file are as follows:

but in fact our project is now using LOG4J2, which modifies the corresponding configuration to do so.

Finally, the problem--it's a configuration file, and then I recalled why it happened. How did I configure the wrong? Configuration is wrong.

Now we have a lot of different environments, as follows:

1: Production environment

2: Pre-release environment

3: Test environment

4: Development environment

Each environment has a lot of configuration, such as: Database, cache, remote interface call, asynchronous message sending, distributed configuration management and so on. Any set of mistakes is not fun, often analyze the problem is also a more troublesome thing, if the environment is different, seemingly the same operation or into the parameter, may produce a totally different result.

Now I have developed two remote call interface, but the upstream test environment is not available, can only use the pre-release environment of the machine, the application and interface of our cache refresh is different, so the corresponding application needs to be configured on the pre-release environment configuration, In the process of configuration I need to compare to the original pre-release environment and the local environment is different (in addition to some environment configuration other configuration files are drawn out), and need to understand why this configuration, in the middle involves several applications configuration of multiple configuration file changes, I accidentally confused the configuration of the configuration file during the comparison process during this time period.

This paragraph of the above description, may only have the function to me!

Simply put, I configured the configuration file incorrectly, so Tomcat can't start!

Because of their own careless, made this mistake, happened to my memory is not good, forget, abnormal information is not obvious, so I spent a lot of time to troubleshoot!

A good memory is better than a rotten pen, not to mention a rotten memory! I think next time, I will be able to locate and solve similar problems faster!

java.lang.illegalstateexception--Good headache

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.