java.lang.IllegalStateException——好头疼

更新时间:2023-05-04 09:34:15 阅读: 评论:0

java.lang.IllegalStateException——好头疼在我东,下下来⼀个项⽬总会出现启动不了的问题,这些问题往往在编译的时候发现不了,当你的服务器启动的时候,就是⼀⽚⽚的报
错,有些问题可以通过异常的提⽰信息,判断出来哪⾥配置错了,但是也有些情况下,从异常的提⽰信息中压根看不出来具体哪个地⽅出现问题了,⽐如下⾯的这段异常信息,我就不能⼀下⼦定位到哪⾥错了。
⼋⽉ 05, 2017 11:09:53 上午 org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc
严重: The web application [] registered the JDBC driver [sql.jdbc.D绷的组词 river] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
⼋⽉ 05, 2017 11:09:53 上午 org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
严重: The web application [] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@45c7519]) and a value of type [ioty.util.internal.InternalThreadLocalMap] (value [ioty.util.internal.InternalThreadLocalMap@520bbe8b]) but failed to remove it when the web
application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
⼋⽉ 05, 2017 11:09:53 上午 org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
严重: The web application [] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@45c7519]) and a value of type [ioty.util.internal.InternalThreadLocalMap] (value [ioty.util.internal.InternalThreadLocalMap@10ac1c2]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
⼋⽉ 05, 2017 11:09:53 上午 org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
严重: The web application [] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@45c7519]) and a value of type [ioty.util.internal.InternalThreadLocalMap] (value [ioty.util.internal.InternalThreadLocalMap@5ec4258c]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probabl
e memory leak.
⼋⽉ 05, 2017 11:09:53 上午 org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
严重: The web application [] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@45c7519]) and a value of type [ioty.util.internal.InternalThreadLocalMap] (value [ioty.util.internal.InternalThreadLocalMap@1f7d3aef]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
⼋⽉ 05, 2017 11:09:53 上午 org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
严重: The web application [] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@45c7519]) and a value of type [ioty.util.internal.InternalThreadLocalMap] (value [ioty.util.internal.InternalThreadLocalMap@56a8310f]) but failed to remove it when the web application was stopped. Thread珍珠粉的用法 s are going to be renewed over time to try and avoid a probable memory leak.
⼋⽉ 05, 2017 11:09:54 上午 org.apache.catalina.loader.WebappClassLoader loadClass
信息: Illegal access: this web application instance has been stopped already. Could not load
org.apache.jute.BinaryInputArchive$BinaryIndex. The eventual following stack trace is caud by an error thrown for debugging purpos as well as to attempt to terminate the thread which caud 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 keeper.proto.GetChildrenRespon.derialize(GetChildrenRespon.java:54)
at keeper.adRespon(ClientCnxn.java:808)
at keeper.ClientCnxnSocketNIO.doIO(ClientCnxnSocketNIO.java:89)
at keeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:291)
at keeper.ClientCnxn$SendThread.run(ClientCnxn.java:1041)
⼋⽉ 05, 2017 11:09:54 上午 org.apache.catalina.loader.WebappClassLoader loadClass
信息: Illegal access: this web application instance has been stopped already. Could not load
org.apache.impl.ThrowableProxy. The eventual following stack trace is caud by an error thrown for debugging purpos as well as to attempt to terminate the thread which caud 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.ThrownProxy(Log4jLogEvent.java:530)
at org.apache.pattern.ExtendedThrowablePatternConverter.format(ExtendedThro
wablePatternConverter.java:61)
at org.apache.pattern.PatternFormatter.format(PatternFormatter.java:38)
at org.apache.layout.Serializable(PatternLayout.java:288)
at org.apache.Text(PatternLayout.java:194)眼保健操英语
at org.apache.de(PatternLayout.java:180)
at org.apache.de(PatternLayout.java:57)
at org.apache.appender.AbstractOutputStreamAppender.directEncodeEvent(AbstractOutputStreamAppender.java:120) at org.apache.Append(AbstractOutputStreamAppender.java:113)
at org.apache.appender.AbstractOutputStreamAppender.append(AbstractOutputStreamAppender.java:104)
at org.apache.CallAppender(AppenderControl.java:155)
at org.apache.onfig.AppenderControl.callAppender0(AppenderControl.java:128)
at org.apache.美的电磁炉维修 .config.AppenderControl.callAppenderPreventRecursion(AppenderControl.java:119)
at org.apache.onfig.AppenderControl.callAppender(AppenderControl.java:84)
at org.apache.onfig.LoggerConfig.callAppenders(LoggerConfig.java:390)
at org.apache.onfig.LoggerConfig.processLogEvent(LoggerConfig.java:375)
at org.apache.onfig.LoggerConfig.log(LoggerConfig.java:359)
at org.apache.onfig.LoggerConfig.log(LoggerConfig.java:349)
at org.apache.onfig.AwaitCompletionReliabilityStrategy.log(AwaitCompletionReliabilityStrategy.java:63)
at org.apache.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 keeper.ClientCnxn$SendThread.run(ClientCnxn.java:1063)
⼋⽉ 05, 2017 11:09:54 上午 org.apache.catalina.loader.WebappClassLoader loadClass
信息: 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 caud by an error thrown for debugging purpos as well as to attempt to terminate the thread which caud the illegal access, and has no functional impact.
java.lang.IllegalStateException
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1菠菜面 612)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1571)
at org.apache.ThrownProxy(Log4jLogEvent.java:530)
at org.apache.pattern.ExtendedThrowablePatternConverter.format(ExtendedThrowablePatternConverter.java:61)
at org.apache.pattern.Pattern长城的历史背景 Formatter.format(PatternFops添加笔刷 rmatter.java:38)
at org.apache.layout.PatternLayout$PatternSerializer.t书法春联 oSerializable(PatternLayout.java:288)
at org.apache.Text(PatternLayout.java:194)
at org.apache.de(PatternLayout.java:180)
at org.apache.de(PatternLayout.java:57)
at org.apache.appender.AbstractOutputStreamAppender.directEncodeEvent(AbstractOutputStreamAppender.java:120)
at org.apache.Append(AbstractOutputStreamAppender.java:113)
at org.apache.appender.AbstractOu莲菜怎么炒好吃 tputStreamAppender.append(AbstractOutputStreamAppender.java:104)
at org.apache.CallAppender(AppenderControl.java:155)
at org.apache.onfig.AppenderControl.callAppender0(AppenderControl.java:128)
at org.apache.onfig.AppenderControl.callAppenderPreventRecursion(AppenderControl.java:119)
at org.apache.onfig.AppenderControl.callAppender(AppenderControl.java:84)
at org.apache.onfig.LoggerConfig.callAppenders(LoggerConfig.java:390)
at org.apache.onfig.LoggerConfig.processLogEvent(LoggerConfig.java:375)
at org.apache.onfig.LoggerConfig.log(LoggerConfig.java:359)
at org.apache.onfig.LoggerConfig.log(LoggerConfig.java:349)
at org.apache.onfig.AwaitCompletionReliabilityStrategy.log(AwaitCompletionReliabilityStrategy.java:63)
at org.apache.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 urrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at urrent.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.ThrownProxy(Log4jLogEvent.java:530)
at org.apache.pattern.ExtendedThrowablePatternConverter.format(ExtendedThrowablePatternConverter.java:61)
at org.apache.pattern.PatternFormatter.format(PatternFormatter.java:38)
at org.apache.layout.Serializable(PatternLayout.java:288)
at org.apache.Text(PatternLayout.java:194)
at org.apache.de(PatternLayout.java:180)
at org.apache.de(PatternLayout.java:57)
at org.apache.appender.AbstractOutputStreamAppender.directEncodeEvent(AbstractOutputStreamAppender.java:120) at org.apache.Append(AbstractOutputStreamAppender.java:113)
at org.apache.appender.AbstractOutputStreamAppender.append(AbstractOutputStreamAppender.java:104)
at org.apache.CallAppender(AppenderControl.java:155)
at org.apache.onfig.AppenderControl.callAppender0(AppenderControl.java:128)
at org.apache.onfig.AppenderControl.callAppenderPreventRecursion(AppenderControl.java:119)
at org.apache.onfig.AppenderControl.callAppender(AppenderControl.java:84)
at org.apache.onfig.LoggerConfig.callAppenders(LoggerConfig.java:390)
at org.apache.onfig.LoggerConfig.processLogEvent(LoggerConfig.java:375)
at org.apache.onfig.LoggerConfig.log(LoggerConfig.java:359)
at org.apache.onfig.LoggerConfig.log(LoggerConfig.java:349)
at org.apache.onfig.AwaitCompletionReliabilityStrategy.log(AwaitCompletionReliabilityStrategy.java:63)
at org.apache.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 urrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at urrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
我以前分析过⼀些异常问题,不过现在的情况是,以前的那些⽅法貌似都不太灵验了,因为,异常信息中没有什么和我们直接编写的代码相关的东西,这个咋弄?我看到有类没找到的问题,于是我就搜⼀下,如下图所⽰:
有啊!奇怪了,是maven依赖冲突了吗?我再搜⼀下看看
没有依赖冲突呀!我去,这咋弄?
编译没问题,启动tomcat服务器愣是启动不起来,那说明代码本⾝没问题,应该是配置的问题,但是到底哪⾥配置错了哪?没法⼦我只能重头到尾的再次检查⼀下各个配置⽂件的配置,数据库、缓存、远程接⼝调⽤、异步消息的发送、分布式配置管理等等,都查看了⼀遍还是没有发现问题。百度吧!从⽹上找了找,还是没有什么思路,后来就询问了同事M看看他遇到过类似的问题没有,不得不服,我花费了⼩半天没解决的问题,他⼀会就找到了原因。(这可能是当局者迷,旁观者清的⼀种情形)
我的l⽂件中配置的⽇志⽂件是这样的,如下图所⽰:
但是实际上我们的项⽬现在使⽤的是log4j2,将对应的配置修改成这样就⾏了
最终定位到问题了——是配置⽂件的问题,然后我⼜回忆了⼀下为什么会出现这样的情况那?我怎么配置错了哪?配置错了我怎么⼀点印象都没有哪?
现在我们的环境有好多种,如下所⽰:
1:⽣产环境
2:预发布环境
3:测试环境
4:开发环境
每套环境,都有好多的配置,⽐如:数据库、缓存、远程接⼝调⽤、异步消息发送、分布式配置管理等等。弄错了任何⼀套都不好玩,常常分析问题的时候也是⼀件⽐较⿇烦的事情,如果环境不同,看似相同的操作或则⼊参,可能会产⽣完全不⼀样的结果。
现在我是开发好了两个远程调⽤的接⼝,但是上游的测试环境不可⽤,只能使⽤预发布环境的机器联调,我们的缓存刷新的应⽤和接⼝所在的应⽤是不同的,所以,需要将对应的应⽤配置上预发布环境配置,在配置的过程中我需要⽐对⼀下原来预发布环境和本地环境有什么区别(除了⼀些环境配置还要别的配置⽂件是抽出来的),并且需要明⽩当初为什么这样配置,中间涉及好⼏个应⽤的配置多个配置⽂件的修改,在这个时间段中我不⼩⼼将配置⽂件的配置在⽐较的过程中给弄乱了。
上⾯这⼀段描述,可能仅对我⾃⼰有作⽤吧!
简单点讲就是,我将配置⽂件配置错了,所以,tomcat启动不了啦!
由于⾃⼰的不⼩⼼,犯下了这种错误,恰巧我的记忆⼒不好,忘记了,异常信息也提⽰的不明显,所以⾃⼰花了不少时间来排查!
好记性不如烂笔头,何况是烂记性哪!我想下⼀次,我⼀定能更快的定位和解决类似的问题吧!

本文发布于:2023-05-04 09:34:15,感谢您对本站的认可!

本文链接:https://www.wtabcd.cn/fanwen/fan/82/522974.html

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。

上一篇:常用英文
标签:配置   问题   环境   没有   启动   信息
相关文章
留言与评论(共有 0 条评论)
   
验证码:
推荐文章
排行榜
Copyright ©2019-2022 Comsenz Inc.Powered by © 专利检索| 网站地图