• 解决java.lang.ClassNotFoundException: org.springframework.web.util.Log4jConfigListener


    启动eclipse 发现如下错误

     Error configuring application listener of class org.springframework.web.util.Log4jConfigListener
    java.lang.ClassNotFoundException: org.springframework.web.util.Log4jConfigListener
    	at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1333)
    	at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1167)
    	at org.apache.catalina.core.DefaultInstanceManager.loadClass(DefaultInstanceManager.java:509)
    	at org.apache.catalina.core.DefaultInstanceManager.loadClassMaybePrivileged(DefaultInstanceManager.java:490)
    	at org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:118)
    	at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4775)
    	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5314)
    	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
    	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1408)
    	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1398)
    	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)
    
    十二月 26, 2018 5:41:59 下午 org.apache.catalina.core.StandardContext listenerStart
    严重: Error configuring application listener of class org.springframework.web.context.ContextLoaderListener
    java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener
    	at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1333)
    	at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1167)
    	at org.apache.catalina.core.DefaultInstanceManager.loadClass(DefaultInstanceManager.java:509)
    	at org.apache.catalina.core.DefaultInstanceManager.loadClassMaybePrivileged(DefaultInstanceManager.java:490)
    	at org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:118)
    	at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4775)
    	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5314)
    	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
    	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1408)
    	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1398)
    	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)
    

      

    解决方法:

    右击项目,选择properties->deployment Assembly->add->java  Build  Path Entries->maven Dependencies

  • 相关阅读:
    Dubbo使用
    JVM内存分配及GC简述
    深入理解ThreadLocal
    Java的Timer定时器
    https与http的区别
    SpringBoot微服务
    Java的BIO,NIO,AIO
    Java常量池
    Java中的值传递与引用传递
    面向对象三大特征及代码优化七大原则
  • 原文地址:https://www.cnblogs.com/linlf03/p/10180796.html
Copyright © 2020-2023  润新知