信息: validateJarFile(D:\Program\apache-tomcat-7.0.55\webapps\lms\WEB-INF\lib\j2ee.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)
多个log4j.jar被不同classloader加载。
你的org.apache.log4j.<spanstyle="font-family:Consolas,'BitstreamVeraSansMono','CourierNew',Courier,monospace;font-size:14px;line-height:15.399999618530273px;background-color:#FFFFFF;">Appender是sun.misc.Launcher$AppClassLoader@f6a746这个类加载的,<spanstyle="font-family:Consolas,'BitstreamVeraSansMono','CourierNew',Courier,monospace;font-size:14px;line-height:15.399999618530273px;background-color:#FFFFFF;">org.apache.log4j.ConsoleAppender是这个类org.apache.catalina.loader.StandardClassLoader@1f4cbee,jvm规范规定不是同一个classload加载的类是不同的,肯定会cast不了,你可以看下你的工程,是不是有多个log4j.jar,或者你的tomcat加载了log4j好的我看看
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。