2011-07-17 35 views
0

我在configurting一個問題:錯誤構式固定的註解春季安全

<sec:global-method-security secured-annotations="enabled" /> 

以下錯誤:

org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from class path resource [applicationContext.xml]; nested exception is java.lang.NoSuchMethodError: org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.getLocalName(Lorg/w3c/dom/Node;)Ljava/lang/String 

沒有與架構安全一些incompitable jar文件

<beans xmlns="http://www.springframework.org/schema/beans" 
    xmlns:sec="http://www.springframework.org/schema/security" 
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    xmlns:aop="http://www.springframework.org/schema/aop" 
    xmlns:tx="http://www.springframework.org/schema/tx" 
    xmlns:beans="http://www.springframework.org/schema/beans" 
    xsi:schemaLocation=" 
    http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd 
    http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-3.0.xsd 
    http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd 
    http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd"> 

我使用以下安全jar:

彈簧安全核心虎2.0.4

彈簧2.5

回答

0

它看起來像您可能沒有所需的彈簧安全依賴(spring-security-tiger-xxx.jar)。

根據spring-security-2.0.2 xsdsecured-annotations可用。

+0

謝謝,我有spring-security-core-tiger-2.0.0 jar。你覺得我需要下載不同版本的spring-security-core-tiger jar。 – user813056

+0

請任何人都可以幫助我什麼是安全版本spring-security-core-tiger-2.0.0以避免錯誤 – user813056

+0

@ user813056。請編輯您的問題並提供您項目的相關maven代碼片段 - 特別是與spring-security相關的依賴項。也許你有不正確的/不兼容的彈簧安全罐。 – Raghuram