eclipse中使用maven构建javee项目找不到classpath解决方法

有时候会在网上下载一些源码在eclipse中跑,会出现一些classpath不对而导致jar包找不到的情况。

在eclipse明明使用maven导入相关依赖jar包,在project的目录中也可以看到maven dependencies中各种jar包,eclipse编译也不报错,但是一旦run on server 后,总是报以下这些错误。

严重: Servlet.service() for servlet [quartzweb] in context with path [/schedule_web] threw exception [Servlet execution threw an exception] with root cause
java.lang.ClassNotFoundException: org.quartz.SchedulerFactory

严重: Servlet.service() for servlet [quartzweb] in context with path [/schedule_web] threw exception [Servlet execution threw an exception] with root cause
java.lang.ClassNotFoundException: org.quartz.SchedulerFactory

 

可以尝试使用如下方法解决。

选中project,右键properties - deployment assembly - add按钮 - java build path entries 双击- 选中maven dependencies -finish按钮 - apply,重启project。

posted on 2019-09-03 10:24  法斯特  阅读(901)  评论(0编辑  收藏  举报

导航