我是靠谱客的博主 难过电脑,最近开发中收集的这篇文章主要介绍Invocation of init method failed; nested exception is java.lang.NoSuchMethodError:运行错误 解决,觉得挺不错的,现在分享给大家,希望可以做个参考。
概述
运行错误
***************************
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。
<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 of init method failed; nested exception is java.lang.NoSuchMethodError:运行错误 解决所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复