- iOS/Objective-C 元类和类别
- objective-c - -1001 错误,当 NSURLSession 通过 httpproxy 和/etc/hosts
- java - 使用网络类获取 url 地址
- ios - 推送通知中不播放声音
我正在使用 Spring MVC 开发 Web 应用程序。在尝试添加 Spring Security 之后,我开始开发 Web 应用程序;但我收到此消息,但找不到解决方案。
16-04-2010 12:10:22:296 6062 ERROR org.springframework.web.servlet.DispatcherServlet - Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping': Initialization of bean failed; nested exception is java.lang.NoClassDefFoundError: org/springframework/beans/factory/generic/GenericBeanFactoryAccessor
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:527)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:286)
at org.springframework.web.servlet.DispatcherServlet.createDefaultStrategy(DispatcherServlet.java:770)
at org.springframework.web.servlet.DispatcherServlet.getDefaultStrategies(DispatcherServlet.java:737)
at org.springframework.web.servlet.DispatcherServlet.initHandlerMappings(DispatcherServlet.java:518)
at org.springframework.web.servlet.DispatcherServlet.initStrategies(DispatcherServlet.java:410)
at org.springframework.web.servlet.DispatcherServlet.onRefresh(DispatcherServlet.java:398)
at org.springframework.web.servlet.FrameworkServlet.onApplicationEvent(FrameworkServlet.java:474)
at org.springframework.context.event.GenericApplicationListenerAdapter.onApplicationEvent(GenericApplicationListenerAdapter.java:51)
at org.springframework.context.event.SourceFilteringListener.onApplicationEventInternal(SourceFilteringListener.java:97)
at org.springframework.context.event.SourceFilteringListener.onApplicationEvent(SourceFilteringListener.java:68)
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:97)
at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:301)
at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:888)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:426)
at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:402)
at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:316)
at org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:282)
at org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:126)
at javax.servlet.GenericServlet.init(GenericServlet.java:212)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1173)
at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:809)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:129)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:852)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.NoClassDefFoundError: org/springframework/beans/factory/generic/GenericBeanFactoryAccessor
at org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping.determineUrlsForHandler(DefaultAnnotationHandlerMapping.java:113)
at org.springframework.web.servlet.handler.AbstractDetectingUrlHandlerMapping.detectHandlers(AbstractDetectingUrlHandlerMapping.java:79)
at org.springframework.web.servlet.handler.AbstractDetectingUrlHandlerMapping.initApplicationContext(AbstractDetectingUrlHandlerMapping.java:57)
at org.springframework.context.support.ApplicationObjectSupport.initApplicationContext(ApplicationObjectSupport.java:119)
at org.springframework.web.context.support.WebApplicationObjectSupport.initApplicationContext(WebApplicationObjectSupport.java:69)
at org.springframework.context.support.ApplicationObjectSupport.setApplicationContext(ApplicationObjectSupport.java:73)
at org.springframework.context.support.ApplicationContextAwareProcessor.invokeAwareInterfaces(ApplicationContextAwareProcessor.java:99)
at org.springframework.context.support.ApplicationContextAwareProcessor.postProcessBeforeInitialization(ApplicationContextAwareProcessor.java:82)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:394)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1405)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
... 32 more
Caused by: java.lang.ClassNotFoundException: org.springframework.beans.factory.generic.GenericBeanFactoryAccessor
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1516)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1361)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
... 43 more
最佳答案
这是因为 Spring 库版本不匹配,检查此链接 Issue on Spring mvc when upgrading from Spring 2.5.5 to Spring 3
关于java - 创建名称为 'org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping' 的 bean 时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2652092/
我对 DefaultAnnotationHandlerMapping 的工作方式感到困惑。 在我的 web.xml 我有 spring /somePath/someWork
在 Spring MVC 中,类 DefaultAnnotationHandlerMapping 已弃用。文档(http://docs.spring.io/spring/docs/current/ja
我一直按照指示 here 进行操作使用注释和重写 DefaultAnnotationHandlerMapping 来实现 spring mvc 处理程序拦截器。 但是,我的拦截器从未被调用。 有人能看
org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter 已弃用并且mvc-dispatcher.xm
我将 Spring MVC 与 结合使用 我已经实现了我自己的扩展 DefaultAnnotationHandlerMapping 的映射处理程序,但我不确定如何使用它。我已经这样声明了: 它可以
我开始从基于 XML 的配置转向 @EnableWebMvc 和 WebMvcConfigurerAdapter 配置。但是当我更改配置时,它似乎从 DefaultAnnotationHandlerM
当我使用 DispatcherServlet 时,我得到一个 java.lang.IllegalStateException: No WebApplicationContext found: no C
如何关闭 org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping detectorHandlers
我正在使用 Spring MVC 开发 Web 应用程序。在尝试添加 Spring Security 之后,我开始开发 Web 应用程序;但我收到此消息,但找不到解决方案。 16-04-2010 12
问题: 我正在为执行类中的方法创建一个切入点。该类是一个 Controller 类,由注解@Controller 表示,因此方面所需的相同不需要bean。我附上了dispathcher servlet
我是一名优秀的程序员,十分优秀!