记录一下莫名出现的错误。Spring+Maven+STS.

严重: 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(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)

之前大概是clean了什么。

网上有这样一句话:

导入的仅仅是jar包的引用,例如在eclipse中通过build path加进user lib……(类似快捷方式)  
这种在Java Application中没问题,但在web Application中可能会出现找不到类的异常。  
在WEB Application中jar包最好放在webroot或webcontent下的lib文件夹内,特别是xml中用到的jar包。

总之,大致意思应该是需要把jar包放到WEB-INF/Lib目录下。

使用sts+maven配置的环境,所以需要把maven对于的lib映射到WEB-INF/Lib目录下,可能是这个意思。

在STS中是右键项目属性,Deployment Assembly中添加Maven Dependencies。

选择Java Build Path Entries下的Maven Dependencies

添加Maven Dependencies到Deployment Assembly中

java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener,环境Spring+Maven的更多相关文章

  1. maven 项目启动tomcat报错 java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener

    maven项目启动tomcat报错: java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderLi ...

  2. java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener

    参考: http://www.cnblogs.com/sunxucool/archive/2013/06/07/3124380.html   ---------------------------&g ...

  3. 真正解决问题:maven eclipse tomcat java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener

    在使用eclipse进行整合springmvc时经常会碰到这样的异常: java.lang.ClassNotFoundException:org.springframework.web.context ...

  4. springmvc项目中java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener

    java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener 严重: Error co ...

  5. 【转】maven 项目出现 java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener

    http://blessht.iteye.com/blog/1104450 http://www.cnblogs.com/zhouyalei/archive/2011/11/30/2268606.ht ...

  6. idea调试SpringMvc, 出现:java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener错误的解决办法

    有时,使用idea开发SpringMvc发现调试时出现以下错误: 12-Mar-2017 12:08:02.345 严重 [RMI TCP Connection(2)-127.0.0.1] org.a ...

  7. maven 项目出现 java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener

    maven 导入项目中经常出现这个问题 严重: Error configuring application listener of class org.springframework.web.cont ...

  8. java.lang.ClassNotFoundException:org.springframework.web.context.ContextLoaderListener问题解决

    今天搭建SSH项目的时候出现了如下错误: 严重: Error configuring application listener of class org.springframework.web.con ...

  9. 使用eclipse启动tomcat里的项目时报错:java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener

    1.这种错:java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener刚开始看的时候 ...

  10. springmvc启动时报错:找不到类ContextLoaderListener:java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener

    严重: Error configuring application listener of class org.springframework.web.context.ContextLoaderLis ...

随机推荐

  1. Netty快速入门(05)Java NIO 介绍-Selector

    Java NIO Selector Selector是Java NIO中的一个组件,用于检查一个或多个NIO Channel的状态是否处于可读.可写.如此可以实现单线程管理多个channels,也就是 ...

  2. Scala实践13

    1.隐式参数 方法可以具有隐式参数列表,由参数列表开头的implicit关键字标记.如果该参数列表中的参数没有像往常一样传递,Scala将查看它是否可以获得正确类型的隐式值,如果可以,则自动传递. S ...

  3. “土法炮制”之 OOM框架

    一.什么是OOM框架? OOM 的全拼是 Object-Object-Map,意思是对象与对象之间的映射,OOM框架要解决的问题就是对象与对象之间数据的自动映射. 举一个具体的例子:用过MVC模式开发 ...

  4. 树 dfs暴力判环 题意转化

    以后还是要多做题啊 这一道题我把题目想的太简单了 用并查集做了一波 但是忘了一种情况 就是同一个树上可能会有环 这就不太对了 而且还不要忘了 一棵树的根节点是一个自环 也就是说这一题的答案就是    ...

  5. Java 遍历集合时产生的ConcurrentModificationException异常

    前几天做Java实验的时候,打算用foreach遍历一个ArrayList集合,并且当集合中的某个元素符合某个值时删除这个元素.写完运行时抛出了ConcurrentModificationExcept ...

  6. 初识 ST 表

    推荐博客 : https://blog.csdn.net/BerryKanry/article/details/70177006 ST表通常用于RMQ问题中,询问某个区间的最值这类问题中 ST表的核心 ...

  7. 曹工说Spring Boot源码(11)-- context:component-scan,你真的会用吗(这次来说说它的奇技淫巧)

    写在前面的话 相关背景及资源: 曹工说Spring Boot源码(1)-- Bean Definition到底是什么,附spring思维导图分享 曹工说Spring Boot源码(2)-- Bean ...

  8. 解决 VS Code 中 golang.org 被墙导致的 Go 插件安装失败问题

    微软官方开发的 Go for Visual Studio Code 插件为 Go 语言 提供了丰富的支持.在 VS Code 中首次打开 Go 工作区后,VS Code 会自动检测当前开发环境为 Go ...

  9. 「 Android开发 」开启第一个App应用

    每天进步一丢丢,连接梦与想 无论什么时候,永远不要以为自己知道一切   -巴普洛夫 最近玩了下Android,但遇到了一些坑,浪费了很多的时间,在此记录一下,你若是遇到了就知道怎么解决了 PS:建议使 ...

  10. vue计算属性和方法的区别

    计算属性: <div id="example"> <p>{{ now }}"</p> </div> <script& ...