eclipse运行maven项目报错java.lang.ClassNotFoundException: xxxxxx

来源:互联网 发布:ubuntu软件中心 编辑:程序博客网 时间:2024/06/07 01:45

   在eclipse中运行maven项目,出现异常——java.lang.ClassNotFoundException: org.apache.shiro.web.env.EnvironmentLoaderListener。如果确认shiro相关的依赖jar无误,那么可以试着如下操作:

   右键项目——build path——configure build path...——deployment assembly——add——java build path entries——maven dependencies——finish——ok。如下图:



   重新发布,启动即可。初步分析,问题出现在部署阶段,即部署的时候缺少了依赖jar,所以运行的时候找不到相关类。

阅读全文
1 0
原创粉丝点击