spring-rest-exception-handler icon indicating copy to clipboard operation
spring-rest-exception-handler copied to clipboard

not working with spring boot due to deprecated org.springframework.web.servlet.mvc.multiaction.NoSuchRequestHandlingMethodException

Open ghost opened this issue 7 years ago • 0 comments

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2018-07-18 16:10:58.961 ERROR 2979 --- [           main] o.s.boot.SpringApplication               : Application run failed

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'handlerExceptionResolver' defined in class path resource [org/springframework/web/servlet/config/annotation/DelegatingWebMvcConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.web.servlet.HandlerExceptionResolver]: Factory method 'handlerExceptionResolver' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'restExceptionResolver' defined in class path resource [com/easyrepeat/config/RestContextConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [cz.jirutka.spring.exhandler.RestHandlerExceptionResolver]: Factory method 'restExceptionResolver' threw exception; nested exception is java.lang.NoClassDefFoundError: org/springframework/web/servlet/mvc/multiaction/NoSuchRequestHandlingMethodException
	at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:590)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1256)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1105)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:543)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:503)
	at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:317)
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:315)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:760)
	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:869)
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:550)
	at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:140)
	at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:759)
	at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:395)
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:327)
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1255)
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1243)
	at com.easyrepeat.EasyRepeatSRVApplication.main(EasyRepeatSRVApplication.java:16)
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.web.servlet.HandlerExceptionResolver]: Factory method 'handlerExceptionResolver' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'restExceptionResolver' defined in class path resource [com/easyrepeat/config/RestContextConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [cz.jirutka.spring.exhandler.RestHandlerExceptionResolver]: Factory method 'restExceptionResolver' threw exception; nested exception is java.lang.NoClassDefFoundError: org/springframework/web/servlet/mvc/multiaction/NoSuchRequestHandlingMethodException
	at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:185)
	at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:582)
	... 18 common frames omitted
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'restExceptionResolver' defined in class path resource [com/easyrepeat/config/RestContextConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [cz.jirutka.spring.exhandler.RestHandlerExceptionResolver]: Factory method 'restExceptionResolver' threw exception; nested exception is java.lang.NoClassDefFoundError: org/springframework/web/servlet/mvc/multiaction/NoSuchRequestHandlingMethodException
	at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:590)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1256)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1105)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:543)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:503)
	at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:317)
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:315)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199)
	at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.resolveBeanReference(ConfigurationClassEnhancer.java:392)
	at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:364)
	at com.easyrepeat.config.RestContextConfig$$EnhancerBySpringCGLIB$$52edf8e0.restExceptionResolver(<generated>)
	at com.easyrepeat.config.RestContextConfig.configureHandlerExceptionResolvers(RestContextConfig.java:29)
	at org.springframework.web.servlet.config.annotation.WebMvcConfigurerComposite.configureHandlerExceptionResolvers(WebMvcConfigurerComposite.java:151)
	at org.springframework.web.servlet.config.annotation.DelegatingWebMvcConfiguration.configureHandlerExceptionResolvers(DelegatingWebMvcConfiguration.java:128)
	at org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport.handlerExceptionResolver(WebMvcConfigurationSupport.java:889)
	at org.springframework.web.servlet.config.annotation.DelegatingWebMvcConfiguration$$EnhancerBySpringCGLIB$$7b77abbc.CGLIB$handlerExceptionResolver$22(<generated>)
	at org.springframework.web.servlet.config.annotation.DelegatingWebMvcConfiguration$$EnhancerBySpringCGLIB$$7b77abbc$$FastClassBySpringCGLIB$$98fe9b75.invoke(<generated>)
	at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228)
	at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:361)
	at org.springframework.web.servlet.config.annotation.DelegatingWebMvcConfiguration$$EnhancerBySpringCGLIB$$7b77abbc.handlerExceptionResolver(<generated>)
	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.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154)
	... 19 common frames omitted
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [cz.jirutka.spring.exhandler.RestHandlerExceptionResolver]: Factory method 'restExceptionResolver' threw exception; nested exception is java.lang.NoClassDefFoundError: org/springframework/web/servlet/mvc/multiaction/NoSuchRequestHandlingMethodException
	at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:185)
	at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:582)
	... 44 common frames omitted
Caused by: java.lang.NoClassDefFoundError: org/springframework/web/servlet/mvc/multiaction/NoSuchRequestHandlingMethodException
	at cz.jirutka.spring.exhandler.RestHandlerExceptionResolverBuilder.getDefaultHandlers(RestHandlerExceptionResolverBuilder.java:235)
	at cz.jirutka.spring.exhandler.RestHandlerExceptionResolverBuilder.build(RestHandlerExceptionResolverBuilder.java:131)
	at com.easyrepeat.config.RestContextConfig.restExceptionResolver(RestContextConfig.java:38)
	at com.easyrepeat.config.RestContextConfig$$EnhancerBySpringCGLIB$$52edf8e0.CGLIB$restExceptionResolver$1(<generated>)
	at com.easyrepeat.config.RestContextConfig$$EnhancerBySpringCGLIB$$52edf8e0$$FastClassBySpringCGLIB$$73c6b3fd.invoke(<generated>)
	at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228)
	at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:361)
	at com.easyrepeat.config.RestContextConfig$$EnhancerBySpringCGLIB$$52edf8e0.restExceptionResolver(<generated>)
	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.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154)
	... 45 common frames omitted
Caused by: java.lang.ClassNotFoundException: org.springframework.web.servlet.mvc.multiaction.NoSuchRequestHandlingMethodException
	at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
	... 58 common frames omitted

ghost avatar Jul 18 '18 23:07 ghost