Spring 3.0:无法找到用于XML模式名称空间的Spring NamespaceHandler [英] Spring 3.0: Unable to locate Spring NamespaceHandler for XML schema namespace

查看:150
本文介绍了Spring 3.0:无法找到用于XML模式名称空间的Spring NamespaceHandler的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的设置非常简单:我有一个Web前端,后端是弹簧接线的.

My setup is fairly simple: I have a web front-end, back-end is spring-wired.

我正在使用AOP在rpc服务上增加一层安全性.

I am using AOP to add a layer of security on my rpc services.

这一切都很好,除了Web应用程序在启动时中止的事实

It's all good, except for the fact that the web app aborts on launch:


  [java] SEVERE: Context initialization failed
     [java] org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Unable to locate Spring NamespaceHandler for XML schema namespace [http://www.springframework.org/schema/aop]
     [java] Offending resource: ServletContext resource [/WEB-INF/gwthandler-servlet.xml]

这是我的xml配置文件中的代码段:

Here is the snippet from my xml config file:

<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:aop="http://www.springframework.org/schema/aop"
       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
       http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop.xsd">
    <aop:config>
        <aop:aspect id="security" ref="securityAspect" >
            <aop:pointcut id="securedServices" expression="@annotation(com.fb.boog.common.aspects.Secured)"/>
            <aop:before method="checkSecurity" pointcut-ref="securedServices"/>
        </aop:aspect>
    </aop:config>

我在互联网上读到,这可能是我上课负担问题的核心的原因.令人怀疑的是,因为这是我的WEB-INF/lib目录:

I read over the internets that it may be my classloading the core of the problem. Doubtful, since here is my WEB-INF/lib directory:

./WEB-INF/lib
./WEB-INF/lib/aopalliance-alpha1.jar
./WEB-INF/lib/aspectj-1.6.6.jar
./WEB-INF/lib/commons-collections.jar
./WEB-INF/lib/commons-logging.jar
./WEB-INF/lib/ehcache-core-1.7.0.jar
./WEB-INF/lib/ejb3-persistence.jar
./WEB-INF/lib/hibernate
./WEB-INF/lib/hibernate/antlr.jar
./WEB-INF/lib/hibernate/asm.jar
./WEB-INF/lib/hibernate/bsh-2.0b1.jar
./WEB-INF/lib/hibernate/cglib.jar
./WEB-INF/lib/hibernate/dom4j.jar
./WEB-INF/lib/hibernate/freemarker.jar
./WEB-INF/lib/hibernate/hibernate-annotations.jar
./WEB-INF/lib/hibernate/hibernate-shards.jar
./WEB-INF/lib/hibernate/hibernate-tools.jar
./WEB-INF/lib/hibernate/hibernate.jar
./WEB-INF/lib/hibernate/jtidy-r8-20060801.jar
./WEB-INF/lib/jabsorb
./WEB-INF/lib/jabsorb/jabsorb-1.3.1.jar
./WEB-INF/lib/jta.jar
./WEB-INF/lib/jyaml-1.3.jar
./WEB-INF/lib/postgresql-8.4-701.jdbc4.jar
./WEB-INF/lib/sjsxp.jar
./WEB-INF/lib/spring
./WEB-INF/lib/spring/org.springframework.aop-3.0.0.RELEASE.jar
./WEB-INF/lib/spring/org.springframework.asm-3.0.0.RELEASE.jar
./WEB-INF/lib/spring/org.springframework.aspects-3.0.0.RELEASE.jar
./WEB-INF/lib/spring/org.springframework.beans-3.0.0.RELEASE.jar
./WEB-INF/lib/spring/org.springframework.context-3.0.0.RELEASE.jar
./WEB-INF/lib/spring/org.springframework.context.support-3.0.0.RELEASE.jar
./WEB-INF/lib/spring/org.springframework.core-3.0.0.RELEASE.jar
./WEB-INF/lib/spring/org.springframework.expression-3.0.0.RELEASE.jar
./WEB-INF/lib/spring/org.springframework.instrument-3.0.0.RELEASE.jar
./WEB-INF/lib/spring/org.springframework.instrument.tomcat-3.0.0.RELEASE.jar
./WEB-INF/lib/spring/org.springframework.jdbc-3.0.0.RELEASE.jar
./WEB-INF/lib/spring/org.springframework.jms-3.0.0.RELEASE.jar
./WEB-INF/lib/spring/org.springframework.orm-3.0.0.RELEASE.jar
./WEB-INF/lib/spring/org.springframework.oxm-3.0.0.RELEASE.jar
./WEB-INF/lib/spring/org.springframework.test-3.0.0.RELEASE.jar
./WEB-INF/lib/spring/org.springframework.transaction-3.0.0.RELEASE.jar
./WEB-INF/lib/spring/org.springframework.web-3.0.0.RELEASE.jar
./WEB-INF/lib/spring/org.springframework.web.portlet-3.0.0.RELEASE.jar
./WEB-INF/lib/spring/org.springframework.web.servlet-3.0.0.RELEASE.jar
./WEB-INF/lib/spring/org.springframework.web.struts-3.0.0.RELEASE.jar
./WEB-INF/lib/testng-5.11-jdk15.jar
./WEB-INF/web.xml

推荐答案

您是否尝试将所有罐子直接放在WEB-INF/lib目录中而不是其子目录中?

Did you try putting all your jars directly in the WEB-INF/lib dir instead of sub-dirs of that?

WEB-INF/lib/spring/org.springframework.aop-3.0.0.RELEASE.jar,仅WEB-INF/lib/org.springframework.aop-3.0.0.RELEASE.jar

与其余的罐子一样.

这篇关于Spring 3.0:无法找到用于XML模式名称空间的Spring NamespaceHandler的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆