`

Bean context must contain FilterChainProxy

阅读更多
Bean context must contain at least one bean of type org.acegisecurity.util.FilterChainProxy

在使用使用Acegi实现多种用户登录时,出现如下问题:
自己明明实现了该代理,可就是启动出错。
信息: Initializing Spring root WebApplicationContext
2009-03-29 10:10:37,894 INFO [org.springframework.web.context.ContextLoader] - <Root WebApplicationContext: initialization started>
2009-03-29 10:10:38,095 INFO [org.springframework.web.context.support.XmlWebApplicationContext] - <Refreshing org.springframework.web.context.support.XmlWebApplicationContext@55d93d: display name [Root WebApplicationContext]; startup date [Sun Mar 29 10:10:38 CST 2009]; root of context hierarchy>
2009-03-29 10:10:38,365 INFO [org.springframework.web.context.support.XmlWebApplicationContext] - <Bean factory for application context [org.springframework.web.context.support.XmlWebApplicationContext@55d93d]: org.springframework.beans.factory.support.DefaultListableBeanFactory@4ee70b>
2009-03-29 10:10:38,485 INFO [org.springframework.beans.factory.support.DefaultListableBeanFactory] - <Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@4ee70b: defining beans []; root of factory hierarchy>
2009-03-29 10:10:38,485 INFO [org.springframework.web.context.ContextLoader] - <Root WebApplicationContext: initialization completed in 591 ms>
2009-3-29 10:10:38 org.apache.catalina.core.StandardContext filterStart
严重: Exception starting filter acegiFilterChain
javax.servlet.ServletException: Bean context must contain at least one bean of type org.acegisecurity.util.FilterChainProxy
at org.acegisecurity.util.FilterToBeanProxy.doInit(FilterToBeanProxy.java:145)
at org.acegisecurity.util.FilterToBeanProxy.init(FilterToBeanProxy.java:189)
at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:275)
at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:397)
at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:108)
at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3709)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4363)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:926)
at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:889)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1149)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at org.apache.catalina.core.StandardService.start(StandardService.java:516)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:578)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
2009-3-29 10:10:38 org.apache.catalina.core.StandardContext start
严重: Error filterStart
2009-3-29 10:10:38 org.apache.catalina.core.StandardContext start
严重: Context [/Hotel] startup failed due to previous errors
2009-3-29 10:10:38 org.apache.catalina.core.ApplicationContext log
信息: Closing Spring root WebApplicationContext

问题找了很久,最后终于定位到了web.xml下,
<!--Spring ApplicationContext file path, separeted by comma.
    this parameter usring by Spring-Context loader-->
   <context-param>
      <param-name>contextConfigLocation</param-name>
      <param-value>/WEB-INF/hotel-*.xml</param-value>
    </context-param>

原来是spring的xml配置没读取到,改成如下就可以了:
<!--Spring ApplicationContext file path, separeted by comma.
    this parameter usring by Spring-Context loader-->
   <context-param>
      <param-name>contextConfigLocation</param-name>
      <param-value>/WEB-INF/hotel-*.xml,classpath*:hotel-*.xml</param-value>
    </context-param>

分享到:
评论

相关推荐

    整数生成唯一字符串的加密PHP库.zip

     throw new HashidsException('Alphabet must contain at least 16 unique characters.');  }  if (strpos($this-&gt;alphabet, ' ') !== false) {  throw new HashidsException('Alphabet ...

    ios11.0 xcode 真机调试支持包 bate版、正式版

    安装方法:找到xcode应用程序,右击显示包内容,找到路径:/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport 将下载到的三个文件夹都放进该目录,重启xcode即可。

    DTD(文档类型定义)

    ### DTD(文档类型定义)详解 #### 一、DTD 概述 **DTD(Document Type Definition,文档类型定义)**是一种用于验证 XML 文档结构的技术。它通过定义一组规则来确保 XML 文档中的元素、属性等按照既定的方式进行...

    ios-系统方法实现二维码扫描、识别和生成.zip

    The app's Info.plist must contain an NSPhotoLibraryUsageDescription key with a string value explaining to the user how the app uses this data. 和 This app has crashed because it attempted to access...

    autopoi V1.0.1 for nbcio-boot or jeecg-boot

    autopoi V1.0.1 是一个专为nbcio-boot和jeecg-boot框架定制的自动化处理Excel数据的工具,其主要目的是提高开发人员在处理大量数据导入导出时的效率。该版本是基于jeecg的autoPOI 1.4.3进行优化升级的,特别强调了对...

    mybatisMapped报错 Statements collection does not contain value for

    ### mybatisMapped报错 Statements collection does not contain value for 在使用MyBatis框架进行数据库操作时,可能会遇到“Mapped Statements collection does not contain value for”这样的错误提示。这通常...

    SDK does not contain 'libarclite'

    标题中的问题"SDK does not contain 'libarclite'"指的是某个SDK缺少一个名为`libarclite`的库文件。这可能是一个错误或者是因为SDK未完整安装或配置不当导致的。 `libarclite`是一个特定的库,尤其在Android开发中...

    xcode报错SDK does not contain 'libarclite' at the path

    然而,开发者们时常会遇到各种各样的错误,其中“SDK does not contain 'libarclite' at the path”是一个常见的问题,主要与Apple的Automatic Reference Counting (ARC)机制有关。本文将深入探讨这个错误的原因、...

    Android代码-android-gpuimage

    GPUImage for Android Idea from: iOS GPUImage framework Goal is to have something as similar to GPUImage as possible. Vertex and fragment shaders are exactly the same. That way it makes it easier ...

    HiddenBits.rar_contain-ppt_doc

    Hidden Bits : A Survey of Techniques for Digital Watermarkingm contain matlab code., work picz overview (.doc ) file (.ppt) file

    axis2动态调用SAP C4C CRM webservice(JAVA版本)

    仅作为对接SAP CRM,俗称C4C的webservice所写的基于AXIS2 java 动态调用demo!其他SAP系统对接也可参考此代码~!axis2版本为1.7.7

    solr单机部署

    "Solr单机部署" Solr是一个全文检索服务器,它基于Lucene实现,Solr只需要进行配置就可以实现全文检索服务。Solr提供了比Lucene更为丰富的查询语言,同时实现了可配置、可扩展,并对索引、搜索性能进行了优化。...

    VB-命令MACH

    标题与描述均提到了"VB-命令MACH",这实际上指向了在Mach3/IV环境下特定于Cypress Software Inc.开发的编程环境中的Visual Basic(VB)脚本语言扩展。这部分内容提供了关于该环境下的语言参考,涵盖了一系列基础到...

    AT89C51snd1做的MP3里的文件系统代码.rar_at89c51snd1_fat_fat32_fat32.h_iso96

    This directory contains 3 file system modules: - file system ISO9660 iso9660.c iso9660.h - file system FAT12/16 fat.c ... config.h must contain the definition of the file system used by your application.

    apache-maven-3.5.4

    - Check that Maven settings.xml does not contain http repositories - Check that Maven pom files do not contain http repository ----- - Check that Maven pom files do not contain http repository ----- -...

    数位板压力测试

    While the tablet interface design must address the technical problems stated above, it must also be useful to the programmers who will write tablet programs, and ultimately, to the tablet users....

    ModiffySuffix

    ModifySuffix can help you ...The field "New Suffix" must be filled with a valid suffix, which means it must contain a dot ".". The field "Details" shows the elaborate contents about the changed files.

    数独

    预计的时间 60分钟 难度等级 难的 目标 improving the student...each column of the board must contain all digits from 0 to 9 (again, the order doesn't matter) each of the nine 3x3 "tiles" (we will name them

Global site tag (gtag.js) - Google Analytics