u011239468
仲达先生
采纳率66.7%
2018-05-04 02:25 阅读 10.1k
已采纳

求教大神,IDEA运行项目时,报错:java.lang.NoSuchMethodError

5

我在使用IDEA sprinboot运行项目时报错,在前一分钟都正常的跑起来,我重启下我的IDEA后,就跑不起来了。
并且代码拿到其他机器上也能跑起来,目测是因为IDEA的关系,但是实在不知道如何着手。
在打包后, 我也能找到jar包,并且版本并未冲突。求教大神帮帮忙!不甚感激!
出错信息如下:

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享

7条回答 默认 最新

  • 已采纳
    ZhihengTao ZhihengTao 2018-05-04 03:48

    依赖的问题,常见源应:所需的依赖不存在,未找到,或者版本不对.

    不存在: 下载
    未找到: 设置正确的依赖搜索路径, 可以通过环境变量或运行时参数指定额外的依赖搜索路径
    版本不对: 更新正确的版本

    点赞 1 评论 复制链接分享
  • seacean2000 且行路莫问蹇 2018-05-04 03:13

    UnsatisfiedDependencyException,这个是缺少依赖关系,需要重新将下载依赖包,然后再部署启动就好了。通常是有人改了POM的依赖关系,而你没有更新

    点赞 1 评论 复制链接分享
  • u010430495 speedyao 2018-05-04 03:46

    把你的项目重新clean install一下。如果当前model有依赖别的model,那么把依赖model也重新clean install一下。

    点赞 1 评论 复制链接分享
  • u011239468 仲达先生 2018-05-04 02:25

    2018-05-04 10:08:58.460 DEBUG 316 --- [on(2)-127.0.0.1] o.mybatis.spring.SqlSessionFactoryBean : Parsed mapper file: 'class path resource [mapper/UserSystemConfigMapper.xml]'
    2018-05-04 10:08:58.816 DEBUG 316 --- [on(2)-127.0.0.1] org.apache.shiro.realm.AuthorizingRealm : No authorizationCache instance set. Checking for a cacheManager...
    2018-05-04 10:08:58.816 DEBUG 316 --- [on(2)-127.0.0.1] org.apache.shiro.realm.AuthorizingRealm : CacheManager [com.magicbeans.collaboration.config.shiro.ShiroRedisCacheManager@3bd6fa81] has been configured. Building authorization cache named [com.magicbeans.collaboration.config.shiro.DBShiroRealm.authorizationCache]
    2018-05-04 10:08:58.893 DEBUG 316 --- [on(2)-127.0.0.1] o.a.s.spring.LifecycleBeanPostProcessor : Initializing bean [dBShiroRealm]...
    ShiroConfiguration.authenticationStrategy()
    2018-05-04 10:08:58.930 DEBUG 316 --- [on(2)-127.0.0.1] o.a.s.spring.LifecycleBeanPostProcessor : Destroying bean [securityManager]...
    2018-05-04 10:08:58.937 INFO 316 --- [on(2)-127.0.0.1] com.alibaba.druid.pool.DruidDataSource : {dataSource-1} closed
    2018-05-04 10:08:58.958 ERROR 316 --- [on(2)-127.0.0.1] o.s.boot.SpringApplication : Application startup failed

    org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'methodValidationPostProcessor' defined in class path resource [org/springframework/boot/autoconfigure/validation/ValidationAutoConfiguration.class]: Unsatisfied dependency expressed through method 'methodValidationPostProcessor' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'shirFilter' defined in class path resource [com/magicbeans/collaboration/config/shiro/ShiroConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.shiro.spring.web.ShiroFilterFactoryBean]: Factory method 'shirFilter' threw exception; nested exception is java.lang.NoSuchMethodError: com.baomidou.mybatisplus.mapper.Condition.wrapper()Lcom/baomidou/mybatisplus/mapper/Wrapper;
    at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:749)
    at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:467)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1173)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1067)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:513)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483)
    at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
    at org.springframework.context.support.PostProcessorRegistrationDelegate.registerBeanPostProcessors(PostProcessorRegistrationDelegate.java:225)
    at org.springframework.context.support.AbstractApplicationContext.registerBeanPostProcessors(AbstractApplicationContext.java:703)
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:528)
    at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:122)
    at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:693)
    at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:360)
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:303)
    at org.springframework.boot.web.support.SpringBootServletInitializer.run(SpringBootServletInitializer.java:154)
    at org.springframework.boot.web.support.SpringBootServletInitializer.createRootApplicationContext(SpringBootServletInitializer.java:134)
    at org.springframework.boot.web.support.SpringBootServletInitializer.onStartup(SpringBootServletInitializer.java:87)
    at org.springframework.web.SpringServletContainerInitializer.onStartup(SpringServletContainerInitializer.java:169)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5653)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:1017)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:993)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:652)
    at org.apache.catalina.startup.HostConfig.manageApp(HostConfig.java:1899)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:483)
    at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:301)
    at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)
    at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)
    at org.apache.catalina.mbeans.MBeanFactory.createStandardContext(MBeanFactory.java:618)
    at org.apache.catalina.mbeans.MBeanFactory.createStandardContext(MBeanFactory.java:565)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:483)
    at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:301)
    at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)
    at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)
    at javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1466)
    at javax.management.remote.rmi.RMIConnectionImpl.access$300(RMIConnectionImpl.java:76)
    at javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1307)
    at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1399)
    at javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:828)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:483)
    at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:323)
    at sun.rmi.transport.Transport$1.run(Transport.java:178)
    at sun.rmi.transport.Transport$1.run(Transport.java:175)
    at java.security.AccessController.doPrivileged(Native Method)
    at sun.rmi.transport.Transport.serviceCall(Transport.java:174)
    at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:557)
    at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:812)
    at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:671)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:744)
    Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'shirFilter' defined in class path resource [com/magicbeans/collaboration/config/shiro/ShiroConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.shiro.spring.web.ShiroFilterFactoryBean]: Factory method 'shirFilter' threw exception; nested exception is java.lang.NoSuchMethodError: com.baomidou.mybatisplus.mapper.Condition.wrapper()Lcom/baomidou/mybatisplus/mapper/Wrapper;
    at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:599)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1173)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1067)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.getSingletonFactoryBeanForTypeCheck(AbstractAutowireCapableBeanFactory.java:923)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.getTypeForFactoryBean(AbstractAutowireCapableBeanFactory.java:804)
    at org.springframework.beans.factory.support.AbstractBeanFactory.isTypeMatch(AbstractBeanFactory.java:558)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.doGetBeanNamesForType(DefaultListableBeanFactory.java:432)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanNamesForType(DefaultListableBeanFactory.java:395)
    at org.springframework.beans.factory.BeanFactoryUtils.beanNamesForTypeIncludingAncestors(BeanFactoryUtils.java:220)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:1267)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1101)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1066)
    at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:835)
    at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:741)
    ... 62 common frames omitted
    Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.shiro.spring.web.ShiroFilterFactoryBean]: Factory method 'shirFilter' threw exception; nested exception is java.lang.NoSuchMethodError: com.baomidou.mybatisplus.mapper.Condition.wrapper()Lcom/baomidou/mybatisplus/mapper/Wrapper;
    at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:189)
    at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:588)
    ... 75 common frames omitted
    Caused by: java.lang.NoSuchMethodError: com.baomidou.mybatisplus.mapper.Condition.wrapper()Lcom/baomidou/mybatisplus/mapper/Wrapper;
    at com.magicbeans.base.BaseServiceImp.findAll(BaseServiceImp.java:128)
    at com.magicbeans.collaboration.service.impl.ResourceServiceImpl.selectAll(ResourceServiceImpl.java:45)
    at com.magicbeans.collaboration.config.shiro.ShiroConfiguration.shirFilter(ShiroConfiguration.java:76)
    at com.magicbeans.collaboration.config.shiro.ShiroConfiguration$$EnhancerBySpringCGLIB$$1643bbe5.CGLIB$shirFilter$8()
    at com.magicbeans.collaboration.config.shiro.ShiroConfiguration$$EnhancerBySpringCGLIB$$1643bbe5$$FastClassBySpringCGLIB$$27d17533.invoke()
    at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228)
    at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:358)
    at com.magicbeans.collaboration.config.shiro.ShiroConfiguration$$EnhancerBySpringCGLIB$$1643bbe5.shirFilter()
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:483)
    at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:162)
    ... 76 common frames omitted

    点赞 评论 复制链接分享
  • zq199234 zq199234 2018-05-04 07:25

    maven clean 然后 install就可以了

    点赞 评论 复制链接分享
  • u014653854 赱乂 2018-05-05 00:29

    记得把整个项目的根节点进行maven的clean,install,不要单独对某一个module进行,有可能会依赖其他的module

    点赞 评论 复制链接分享
  • sinat_17310699 sinat_17310699 2018-05-07 08:59

    更新下maven仓库索引,之后maven clean install一下

    点赞 评论 复制链接分享

相关推荐