• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Rob Spoor
  • Junilu Lacar
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Carey Brown
Bartenders:

Spring-Security-2.0.5 compatabality with Spring framework.

 
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Bartender
Posts: 4121
IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 )
 
NareshAnkuskani Kumar
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Above in my question i used spring version 2.5 in place of 2.0.5 in the schema declaration.
 
NareshAnkuskani Kumar
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It seems like the @since tage is available at classlevel but not at the method level. Please avoid by previous question concerning versions.
 
reply
    Bookmark Topic Watch Topic
  • New Topic