原因:出现此异常是因为tomcat的webapp目录下没有lib文件。

解决方案:

1.右键点击项目--选择Properties选择Deployment Assembly,在右边点击Add按钮,在弹出的窗口中选择Java Build Path Entries

2.点击Next,选择Maven Dependencies

3.点击Finish,然后可以看到已经把Maven Dependencies添加到Web应用结构中了

maven项目下出现java.lang.ClassNotFoundException: ContextLoader异常的更多相关文章

  1. 项目报错java.lang.ClassNotFoundException: org.common.SessionListener

    现象:项目报错java.lang.ClassNotFoundException: org.common.SessionListener,并且myeclipse左侧Package Explorer中项目 ...

  2. Idea运行web项目时,提示java.lang.ClassNotFoundException: com.mysql.jdbc.Driver解决方法

    今天用 idea写了个工程.结果最后报错,错误信息如下: java.lang.ClassNotFoundException: com.mysql.jdbc.Driverat org.apache.ca ...

  3. 【Maven篇】---解决Maven线上部署java.lang.ClassNotFoundException和no main manifest attribute解决方法

    一.前述 maven 线上部署的话会出现一些问题比如java.lang.ClassNotFoundException或者no main manifest attribute的话,是因为maven 配置 ...

  4. eclipse 启动项目 报错 java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderLis(亲测)

    [原因] 重新 clean  和  install 了maven项目后就启动报错了.解决如下: 右键项目: 属性properties 删除掉引用的其他jar 选择 Deployment Assembl ...

  5. eclipse中部署web项目时报错java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener的解决方法

    解决方案: 1.右键点击项目--选择Properties,选择Deployment Assembly,在右边点击Add按钮,在弹出的窗口中选择Java Build Path Entries 2.点击N ...

  6. Maven项目- "null" 的java.lang.reflect.InvocationTargetException 解决方法

    异常显示: 解决方法:

  7. ssh项目java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoade错误

    错误: 导入别人的ssh项目后出现java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoade错误, 错 ...

  8. nested exception is java.lang.ClassNotFoundException

    当出现nested exception is java.lang.ClassNotFoundException这个异常的时候,首先排查类是否存在.如果存在,是maven项目的话,clean.insta ...

  9. java.lang.ClassNotFoundException: org.springframework.web.servlet.DispatcherServlet

    新建Maven 项目的时候报错: java.lang.ClassNotFoundException: org.springframework.web.servlet.DispatcherServlet ...

随机推荐

  1. CopyOnWriteList-JDK1.8

    CopyOnWrite,一个写时复制的技术来保证并发操作的安全,使用这种技术的前提是读大于写. 读读之间相容, 写写之间互斥, 读写操作相容. 实现方法: 在对底层数据进行写的时候,把底层数据复制一份 ...

  2. while循环、break、continue

    我们通过while循环让python循环进行操作 break 跳出整个循环 continue 终止当前循环并不再继续往下执行,回到开头开始继续循环 下面会详细解释一下,例如: 1 a = 1 2 wh ...

  3. mysqld服务启动失败, Failed to restart mysqld.service: Unit not found.

    -bash-4.2# service mysqld restart Redirecting to /bin/systemctl restart mysqld.serviceFailed to rest ...

  4. iOS基础知识之排序

    1.字符串比较 - (NSComparisonResult)compare:(NSString *)str; 例如: NSString *str1 = @"zhangsan"; N ...

  5. 使用MagicAJax的AjaxPanel时有时会弹出"Using the AjaxCallHelper write methods outside of an AjaxCall is not allowed."

    ------解决方案--------------------------------------------------------1.看下你的输出是不是包含在<ajax:AjaxPanel I ...

  6. jquery源码'jQuery.fn.init.prototype'

    一般我们在创建构造函数即使用的时候会这样写,使用的时候会使用new 关键字,先实例化,然后使用. function test(name, age) { this.name = name; this.a ...

  7. jsfl 常用自定义方法

    //创建文件夹 function creatFile(fileURl) { if (FLfile.createFolder(fileURl)) { //alert("创建成功 "+ ...

  8. DevExpress控件TExtLookupComboBox实现多列模糊匹配输入的方法

    本方案不需要修改控件源码,是完美解决支持多列模糊匹配快速输入的最佳方案!!   1.把列的Properties属性设置为ExtLookupComboBox. Properties.Incrementa ...

  9. hadoop-2

    AsyncDispatcher,直接看代码 @Override protected void serviceStart() throws Exception { //start all the com ...

  10. 架构之微服务(zookeeper)转

    ZooKeeper是一个分布式的,开放源码的分布式应用程序协调服务,它包含一个简单的原语集,分布式应用程序可以基于它实现同步服务,配置维护和命名服务等.Zookeeper是hadoop的一个子项目,其 ...