基于maven构建的springMVC项目,pom文件拷贝过来的,运行提示ClassNotFoundException:
java.lang.ClassNotFoundException: org.springframework.web.util.Log4jConfigListener
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1308)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1142)
at org.apache.catalina.core.DefaultInstanceManager.loadClass(DefaultInstanceManager.java:518)
at org.apache.catalina.core.DefaultInstanceManager.loadClassMaybePrivileged(DefaultInstanceManager.java:499)
at org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:118)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4734)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5255)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)
检查后发现maven没有自动下载jar,在External Libraries目录下只能看到jdk的jar,点击reimport也没用。
在Project Structure中的Libraries中找不到任何jar:
解决办法:
查看在om.xml文件中是否有<dependencyManagement></dependencyManagement>依赖标签。将这组标签去掉就好了。