| Author |
Spring-Security-2.0.5 compatabality with Spring framework.
|
NareshAnkuskani Kumar
Ranch Hand
Joined: Sep 15, 2005
Posts: 76
|
|
Hi All,
Currently in my project i was told to use spring-security as a securtiy mechanism.
My project is half way implemented using spring framework 2.0 version.
When i tried to include the spring-security2.0.5 into my project, i face some version conflicts between spring & spring-security frameworks.
Please let me as on today with which version of spring the spring-security framwork is compatable.
[size=18]Following is the exception:[/size]
<Oct 1, 2009 7:37:30 AM CEST> <Error> <HTTP> <BEA-101216> <Servlet: "springapp" failed to preload on startup in Web application: "mcompliance".
org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from ServletContext resource [/WEB-INF/security.xml]; nested exception is java.lang.NoSuchMethodError: org.springframework.beans.factory.xml.XmlReaderContext.getBeanClassLoader()Ljava/lang/ClassLoader;
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:427)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:357)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:334)
at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.importBeanDefinitionResource(DefaultBeanDefinitionDocumentReader.java:196)
at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseDefaultElement(DefaultBeanDefinitionDocumentReader.java:156)
Truncated. see log file for complete stacktrace
java.lang.NoSuchMethodError: org.springframework.beans.factory.xml.XmlReaderContext.getBeanClassLoader()Ljava/lang/ClassLoader;
at org.springframework.security.config.GlobalMethodSecurityBeanDefinitionParser.validatePresent(GlobalMethodSecurityBeanDefinitionParser.java:46)
at org.springframework.security.config.GlobalMethodSecurityBeanDefinitionParser.registerAnnotationBasedMethodDefinitionSources(GlobalMethodSecurityBeanDefinitionParser.java:103)
at org.springframework.security.config.GlobalMethodSecurityBeanDefinitionParser.parse(GlobalMethodSecurityBeanDefinitionParser.java:56)
at org.springframework.beans.factory.xml.NamespaceHandlerSupport.parse(NamespaceHandlerSupport.java:78)
at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1147)
Truncated. see log file for complete stacktrace
>
Following are the namespaces i tried downloading spring-security 2.0 & 2.0.5 :
<beans:beans xmlns="http://www.springframework.org/schema/security"
xmlns:beans="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-2.0.5.xsd">
<beans:beans xmlns="http://www.springframework.org/schema/security"
xmlns:beans="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-2.0.xsd">
Thanks in advance.
Regards,
Naresh.
|
 |
Nathan Pruett
Bartender
Joined: Oct 18, 2000
Posts: 4121
|
|
It looks like that method was added to XMLReaderContext between Spring versions 2.0.5 and 2.0.6. (Note to Spring developers - please make use of the @since tag in your Javadocs )
|
-Nate
Write once, run anywhere, because there's nowhere to hide! - /. A.C.
|
 |
NareshAnkuskani Kumar
Ranch Hand
Joined: Sep 15, 2005
Posts: 76
|
|
|
Above in my question i used spring version 2.5 in place of 2.0.5 in the schema declaration.
|
 |
NareshAnkuskani Kumar
Ranch Hand
Joined: Sep 15, 2005
Posts: 76
|
|
|
It seems like the @since tage is available at classlevel but not at the method level. Please avoid by previous question concerning versions.
|
 |
 |
|
|
subject: Spring-Security-2.0.5 compatabality with Spring framework.
|
|
|