博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
java.lang.NoClassDefFoundError: org/springframework/boot/context/embedded/FilterRegistrationBean
阅读量:5066 次
发布时间:2019-06-12

本文共 9613 字,大约阅读时间需要 32 分钟。

昨天还好好的, 今天我的spring boot 项目就不能正常运行了! 出现:

018-07-06 10:01:41.776  WARN [mq-service,,,] 7 --- [           main] ationConfigEmbeddedWebApplicationContext : Exception thrown from LifecycleProcessor on context closejava.lang.IllegalStateException: LifecycleProcessor not initialized - call 'refresh' before invoking lifecycle methods via the context: org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@7fcf2fc1: startup date [Fri Jul 06 10:01:38 CST 2018]; parent: org.springframework.context.annotation.AnnotationConfigApplicationContext@61baa894    at org.springframework.context.support.AbstractApplicationContext.getLifecycleProcessor(AbstractApplicationContext.java:417)    at org.springframework.context.support.AbstractApplicationContext.doClose(AbstractApplicationContext.java:1002)    at org.springframework.context.support.AbstractApplicationContext.close(AbstractApplicationContext.java:961)    at org.springframework.boot.SpringApplication.handleRunFailure(SpringApplication.java:794)    at org.springframework.boot.SpringApplication.run(SpringApplication.java:325)    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1162)    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1151)    at com.cloudlinkscm.ActivemqApplication.main(ActivemqApplication.java:12)    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:498)    at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48)    at org.springframework.boot.loader.Launcher.launch(Launcher.java:87)    at org.springframework.boot.loader.Launcher.launch(Launcher.java:50)    at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:51)2018-07-06 10:01:41.776 ERROR [mq-service,,,] 7 --- [           main] o.s.b.f.s.DefaultListableBeanFactory     : Destroy method on bean with name 'org.springframework.boot.autoconfigure.internalCachingMetadataReaderFactory' threw an exceptionjava.lang.IllegalStateException: ApplicationEventMulticaster not initialized - call 'refresh' before multicasting events via the context: org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@7fcf2fc1: startup date [Fri Jul 06 10:01:38 CST 2018]; parent: org.springframework.context.annotation.AnnotationConfigApplicationContext@61baa894    at org.springframework.context.support.AbstractApplicationContext.getApplicationEventMulticaster(AbstractApplicationContext.java:404)    at org.springframework.context.support.ApplicationListenerDetector.postProcessBeforeDestruction(ApplicationListenerDetector.java:97)    at org.springframework.beans.factory.support.DisposableBeanAdapter.destroy(DisposableBeanAdapter.java:253)    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroyBean(DefaultSingletonBeanRegistry.java:578)    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroySingleton(DefaultSingletonBeanRegistry.java:554)    at org.springframework.beans.factory.support.DefaultListableBeanFactory.destroySingleton(DefaultListableBeanFactory.java:961)    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroySingletons(DefaultSingletonBeanRegistry.java:523)    at org.springframework.beans.factory.support.DefaultListableBeanFactory.destroySingletons(DefaultListableBeanFactory.java:968)    at org.springframework.context.support.AbstractApplicationContext.destroyBeans(AbstractApplicationContext.java:1033)    at org.springframework.context.support.AbstractApplicationContext.doClose(AbstractApplicationContext.java:1009)    at org.springframework.context.support.AbstractApplicationContext.close(AbstractApplicationContext.java:961)    at org.springframework.boot.SpringApplication.handleRunFailure(SpringApplication.java:794)    at org.springframework.boot.SpringApplication.run(SpringApplication.java:325)    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1162)    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1151)    at com.cloudlinkscm.ActivemqApplication.main(ActivemqApplication.java:12)    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:498)    at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48)    at org.springframework.boot.loader.Launcher.launch(Launcher.java:87)    at org.springframework.boot.loader.Launcher.launch(Launcher.java:50)    at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:51)Exception in thread "main" java.lang.reflect.InvocationTargetException    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:498)    at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48)    at org.springframework.boot.loader.Launcher.launch(Launcher.java:87)    at org.springframework.boot.loader.Launcher.launch(Launcher.java:50)    at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:51)Caused by: java.lang.NoClassDefFoundError: org/springframework/boot/context/embedded/FilterRegistrationBean    at java.lang.Class.getDeclaredMethods0(Native Method)    at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)    at java.lang.Class.getDeclaredMethods(Class.java:1975)    at org.springframework.util.ReflectionUtils.getDeclaredMethods(ReflectionUtils.java:613)    at org.springframework.util.ReflectionUtils.doWithMethods(ReflectionUtils.java:524)    at org.springframework.util.ReflectionUtils.doWithMethods(ReflectionUtils.java:510)    at org.springframework.util.ReflectionUtils.getUniqueDeclaredMethods(ReflectionUtils.java:570)    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.getTypeForFactoryMethod(AbstractAutowireCapableBeanFactory.java:697)    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.determineTargetType(AbstractAutowireCapableBeanFactory.java:640)    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.predictBeanType(AbstractAutowireCapableBeanFactory.java:609)    at org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:1484)    at org.springframework.beans.factory.support.DefaultListableBeanFactory.doGetBeanNamesForType(DefaultListableBeanFactory.java:425)    at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanNamesForType(DefaultListableBeanFactory.java:395)    at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:515)    at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:508)    at org.springframework.context.support.AbstractApplicationContext.getBeansOfType(AbstractApplicationContext.java:1189)    at org.springframework.boot.SpringApplication.getExitCodeFromMappedException(SpringApplication.java:862)    at org.springframework.boot.SpringApplication.getExitCodeFromException(SpringApplication.java:848)    at org.springframework.boot.SpringApplication.handleExitCode(SpringApplication.java:834)    at org.springframework.boot.SpringApplication.handleRunFailure(SpringApplication.java:788)    at org.springframework.boot.SpringApplication.run(SpringApplication.java:325)    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1162)    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1151)    at com.cloudlinkscm.ActivemqApplication.main(ActivemqApplication.java:12)    ... 8 moreCaused by: java.lang.ClassNotFoundException: org.springframework.boot.context.embedded.FilterRegistrationBean    at java.net.URLClassLoader.findClass(URLClassLoader.java:381)    at java.lang.ClassLoader.loadClass(ClassLoader.java:424)    at org.springframework.boot.loader.LaunchedURLClassLoader.loadClass(LaunchedURLClassLoader.java:94)    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)    ... 32 more

 

 

FilterRegistrationBean 是存在的, 但是其package 是: org.springframework.boot.web.servlet.FilterRegistrationBean 而不是

org.springframework.boot.context.embedded.FilterRegistrationBean

 

这个明显是版本问题.

Camden.SR2
org.springframework.cloud
spring-cloud-dependencies
${spring-cloud.version}
pom
import

我本地原来是 Camden.SR2, 但是依赖的一个 公司封装的底层框架jar 的相关依赖 ,已经悄悄改成了  Edgware.SR3

Edgware.SR3

 

坑爹啊, 改了也不通知一下,  这些人做事啊, ...  闷声死气,  但是, 却又无可奈何, 人家有个上级撑着啊..

 

参考: 

https://blog.csdn.net/lucy06/article/details/78063288

 

posted on
2018-07-06 11:37 阅读(
...) 评论(
...)

转载于:https://www.cnblogs.com/FlyAway2013/p/9272746.html

你可能感兴趣的文章
java导出Excel表格简单的方法
查看>>
SQLite数据库简介
查看>>
利用堆实现堆排序&优先队列
查看>>
Mono源码学习笔记:Console类(四)
查看>>
Android学习路线(十二)Activity生命周期——启动一个Activity
查看>>
《Genesis-3D开源游戏引擎完整实例教程-跑酷游戏篇03:暂停游戏》
查看>>
CPU,寄存器,一缓二缓.... RAM ROM 外部存储器等简介
查看>>
windows下编译FreeSwitch
查看>>
git .gitignore 文件不起作用
查看>>
Alan Turing的纪录片观后感
查看>>
c#自定义控件中的事件处理
查看>>
二十六、Android WebView缓存
查看>>
django Models 常用的字段和参数
查看>>
IOS--沙盒机制
查看>>
使用 JointCode.Shuttle 访问任意 AppDomain 的服务
查看>>
sqlite的坑
查看>>
digitalocean --- How To Install Apache Tomcat 8 on Ubuntu 16.04
查看>>
【题解】[P4178 Tree]
查看>>
Jquery ui widget开发
查看>>
更改git仓库地址
查看>>