Tomcat启动报错,求指点,百度半天无果

发布于 2021-11-26 13:41:27 字数 3414 浏览 846 评论 3

信息: validateJarFile(D:Programapache-tomcat-7.0.55webappslmsWEB-INFlibj2ee.jar) - jar not loaded. See Servlet Spec 3.0, section 10.7.2. Offending class: javax/servlet/Servlet.class
2014-9-17 13:58:58 org.apache.catalina.startup.TaglibUriRule body
信息: TLD skipped. URI: /oscache is already defined
dFrame: dFrame's initializing...log4j:ERROR A "org.apache.log4j.ConsoleAppender" object is not assignable to a "org.apache.log4j.Appender" variable.
log4j:ERROR The class "org.apache.log4j.Appender" was loaded by 
log4j:ERROR [sun.misc.Launcher$AppClassLoader@f6a746] whereas object of type 
log4j:ERROR "org.apache.log4j.ConsoleAppender" was loaded by [WebappClassLoader
  context: /lms
  delegate: false
  repositories:
----------> Parent Classloader:
org.apache.catalina.loader.StandardClassLoader@1f4cbee
].
log4j:ERROR Could not instantiate appender named "CONSOLE".
log4j:ERROR Could not create an Appender. Reported error follows.
java.lang.ClassCastException: org.apache.log4j.ConsoleAppender cannot be cast to org.apache.log4j.Appender
	at org.apache.log4j.xml.DOMConfigurator.parseAppender(DOMConfigurator.java:165)
	at org.apache.log4j.xml.DOMConfigurator.findAppenderByName(DOMConfigurator.java:140)
	at org.apache.log4j.xml.DOMConfigurator.findAppenderByReference(DOMConfigurator.java:153)
	at org.apache.log4j.xml.DOMConfigurator.parseChildrenOfLoggerElement(DOMConfigurator.java:415)
	at org.apache.log4j.xml.DOMConfigurator.parseCategory(DOMConfigurator.java:335)
	at org.apache.log4j.xml.DOMConfigurator.parse(DOMConfigurator.java:781)
	at org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:666)
	at org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:616)
	at org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:602)
	at org.apache.log4j.xml.DOMConfigurator.configure(DOMConfigurator.java:697)
	at dframe.core.CoreProcessImpl.init(CoreProcessImpl.java:90)
	at dframe.core.DFrameServlet.init(DFrameServlet.java:62)
	at javax.servlet.GenericServlet.init(GenericServlet.java:158)
	at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1284)
	at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1197)
	at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1087)
	at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5229)
	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5516)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:649)
	at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1247)
	at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1898)
	at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
	at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
	at java.util.concurrent.FutureTask.run(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)



如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

无边思念无边月 2021-11-28 04:51:29

好的 我看看

凌乱心跳 2021-11-27 23:33:30

你的org.apache.log4j.
Appender是sun.misc.Launcher$AppClassLoader@f6a746这个类加载的,
org.apache.log4j.ConsoleAppender是这个类org.apache.catalina.loader.StandardClassLoader@1f4cbee,jvm规范规定不是同一个classload加载的类是不同的,肯定会cast不了,你可以看下你的工程,是不是有多个log4j.jar,或者你的tomcat加载了log4j

虐人心 2021-11-27 17:43:42

多个log4j.jar被不同classloader加载。

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文