Announcement Announcement Module
Collapse
No announcement yet.
STS Spring Security 3.0.1 config compile error Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • STS Spring Security 3.0.1 config compile error

    Hi all,

    I have recently downloaded and installed the SpringSource Tool suite.

    We have configured our project to use the latest version of Spring Security version 3.0.1.

    However we are getting a slight error in our config:

    In the security file we have the following namespace defintions:

    Code:
    <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-3.0.xsd
               http://www.springframework.org/schema/security
               http://www.springframework.org/schema/security/spring-security-3.0.xsd">
    And the offending bean is:

    Code:
    <beans:bean id="filterSecurityInterceptor" class="org.springframework.security.web.access.intercept.FilterSecurityInterceptor">
    		<beans:property name="authenticationManager" ref="authenticationManager" />
    		<beans:property name="accessDecisionManager" ref="accessDecisionManager" />
    		<beans:property name="securityMetadataSource">
    			<filter-security-metadata-source>
    				<intercept-url pattern="/admin/**" access="ROLE_ADMIN" />
    				<intercept-url pattern="/rest/**" access="ROLE_WRITE_ACCESS" />
    				<intercept-url pattern="/**"
    					access="ROLE_WRITE_ACCESS,ROLE_READ_ACCESS,ROLE_ADMIN" />
    			</filter-security-metadata-source>
    		</beans:property>
    	</beans:bean>
    But we get the following error:

    Cannot locate BeanDefinitionParser for element filter-security-metadata-source.

    The web application runs OK and everything seems to work as normal but we just have that unusual compile error?

    Is this something incorrect with our setup or a small error with STS?

    Many thanks all,

    Eggsy
    Last edited by eggsy84; Jan 18th, 2010, 06:23 AM. Reason: highlight error clearly

  • #2
    Hi Eggsy,

    you are hitting a bug in Spring Security 3.0.0. See the following JIRA for details:

    SEC-1357: Use reader context classloader when checking for web classes in namespace handler
    https://jira.springsource.org/browse/SEC-1357

    Essentially this bug prevents Spring Security from registering the required namespace parsers in an OSGi runtime. Please note that this has been fixed with Spring Security 3.0.1 but you need to update to STS 2.3.1 (not released yet) to get this fix accessible for STS.

    For now, you can just ignore the warning or switch it off from the project preferences (Spring -> Beans Support -> Ignore Missing NamespaceHandler warnings).

    HTH

    Christian

    Comment


    • #3
      Thanks

      Hi Christian,

      Many thanks for the reply.

      I'll wait on the new release of STS

      Comment

      Working...
      X