问题描述
2011-04-2111:59:10,062ERROR[org.springframework.web.context.ContextLoader]-<Contextinitializationfailed>org.springframework.beans.factory.parsing.BeanDefinitionParsingException:Configurationproblem:Cannotlocate'org.springframework.security.annotation.SecuredMethodDefinitionSource'Offendingresource:ServletContextresource[/WEB-INF/spring-configuration/securityContext.xml]atorg.springframework.beans.factory.parsing.FailFastProblemReporter.error(FailFastProblemReporter.java:68)atorg.springframework.beans.factory.parsing.ReaderContext.error(ReaderContext.java:85)atorg.springframework.beans.factory.parsing.ReaderContext.error(ReaderContext.java:72)atorg.springframework.security.config.GlobalMethodSecurityBeanDefinitionParser.validatePresent(GlobalMethodSecurityBeanDefinitionParser.java:47)atorg.springframework.security.config.GlobalMethodSecurityBeanDefinitionParser.registerAnnotationBasedMethodDefinitionSources(GlobalMethodSecurityBeanDefinitionParser.java:103)atorg.springframework.security.config.GlobalMethodSecurityBeanDefinitionParser.parse(GlobalMethodSecurityBeanDefinitionParser.java:56)atorg.springframework.beans.factory.xml.NamespaceHandlerSupport.parse(NamespaceHandlerSupport.java:69)atorg.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1297)atorg.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1287)atorg.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:135)atorg.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:92)atorg.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:507)atorg.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:398)atorg.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:342)atorg.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:310)atorg.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:143)atorg.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:178)atorg.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:149)atorg.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:124)atorg.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:92)atorg.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:123)atorg.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:422)atorg.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:352)atorg.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:255)atorg.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199)atorg.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45)atcom.zfsoft.zfca.web.init.SafeContextLoaderListener.contextInitialized(SafeContextLoaderListener.java:24)atorg.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3843)atorg.apache.catalina.core.StandardContext.start(StandardContext.java:4350)atorg.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)atorg.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)atorg.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)atorg.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:924)atorg.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:887)atorg.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492)atorg.apache.catalina.startup.HostConfig.start(HostConfig.java:1147)atorg.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)atorg.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)atorg.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)atorg.apache.catalina.core.StandardHost.start(StandardHost.java:719)atorg.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)atorg.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)atorg.apache.catalina.core.StandardService.start(StandardService.java:516)atorg.apache.catalina.core.StandardServer.start(StandardServer.java:710)atorg.apache.catalina.startup.Catalina.start(Catalina.java:578)atsun.reflect.NativeMethodAccessorImpl.invoke0(NativeMethod)atsun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)atsun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)atjava.lang.reflect.Method.invoke(Method.java:597)atorg.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)atorg.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)2011-04-2111:59:10,109FATAL[com.zfsoft.zfca.web.init.SafeContextLoaderListener]-<SafeContextLoaderListener:TheSpringContextLoaderListenerwewrapthrewoncontextInitialized.
解决方案
解决方案二:
web.xml中有错误,还有可能缺少包了。
解决方案三:
jar包导入正确了吗?web.xml配置正确吗?
解决方案四:
能不能具体一点?指的是哪方面的jar包,或者web配置文件中应该怎么修改,修改那个字段中的内容?