[ClassNotFoundException] org.springframework.web.context.ContextLoaderListener 解决方案

ClassNotFoundException: 这种异常通常是类找不到异常,即类找不到或类未加载。

在tomcat启动Web项目时,出现这个异常

Error configuring application listener of class org.springframework.web.context.ContextLoaderListener 
java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener

首先就是查看jar报是否存在,发现的确存在,那么就向下排查,是否加载失败导致的,由于现在coder的编辑器分为IntelliJ IDEA 和 eclipse 两种 ,都提供一下解决方案:

IntelliJ IDEA :
File > Project Structure > Artifacts 在 Output Layout 右面板中双击 Available Elements 中的 Jar类库,它会被移动到WEB-INF/lib在左窗格中,保存并重启Tomcat。

在这里插入图片描述

问题解决,确实好用(手动滑稽)

引自:
https://stackoverflow.com/questions/6210757/java-lang-classnotfoundexception-org-springframework-web-context-contextloaderl

Eclipse :

  1. 右键单击工程项目 ->点击 properties
  2. 选择 Deployment Assembly
  3. 点击 Add -> Java Build Path Entries -> Next
  4. 选择 Maven Dependencies -> Finish -> Apply -> OK
  5. Clean project and server. 重启server

在这里插入图片描述

OK,问题解决。

引自:
https://blog.csdn.net/qq_16485855/article/details/70208204


欢迎各位提出问题,一起进步~~~

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值