我是靠谱客的博主 难过电脑,这篇文章主要介绍Invocation of init method failed; nested exception is java.lang.NoSuchMethodError:运行错误 解决,现在分享给大家,希望可以做个参考。
运行错误
复制代码
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28*************************** APPLICATION FAILED TO START *************************** Description: An attempt was made to call a method that does not exist. The attempt was made from the following location: org.springframework.scheduling.quartz.SchedulerAccessor.registerListeners(SchedulerAccessor.java:351) The following method did not exist: org.quartz.Scheduler.getListenerManager()Lorg/quartz/ListenerManager; The method's class, org.quartz.Scheduler, is available from the following locations: jar:file:/D:/repository/org/opensymphony/quartz/quartz/1.6.1/quartz-1.6.1.jar!/org/quartz/Scheduler.class It was loaded from the following location: file:/D:/repository/org/opensymphony/quartz/quartz/1.6.1/quartz-1.6.1.jar Action: Correct the classpath of your application so that it contains a single, compatible version of org.quartz.Scheduler
分析:之前好好的可以运行突然不行了,看报错可能是定时任务的jar包冲突导致了
1、全局查一下发现shiro-all有引入该jar包
解决
查询依赖的时候发现它是shiro的一个可选项,直接把它exclusion。
复制代码
1
2
3
4
5
6
7
8
9
10
11<dependency> <groupId>org.apache.shiro</groupId> <artifactId>shiro-all</artifactId> <version>1.4.0</version> <exclusions> <exclusion> <groupId>org.apache.shiro</groupId> <artifactId>shiro-quartz</artifactId> </exclusion> </exclusions> </dependency>
若shiro-all 封装在jar包中引入,则可将下面代码放入该项目引入的父级包下
<exclusions>
<exclusion>
<groupId>org.apache.shiro</groupId>
<artifactId>shiro-quartz</artifactId>
</exclusion>
</exclusions>
最后
以上就是难过电脑最近收集整理的关于Invocation of init method failed; nested exception is java.lang.NoSuchMethodError:运行错误 解决的全部内容,更多相关Invocation内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复