Announcement Announcement Module
Collapse
No announcement yet.
Configuration problem: spring-security-web classes are not available. You need ... Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Configuration problem: spring-security-web classes are not available. You need ...

    Hello.
    I'm working with STS 2.6.1 and Spring security 3.1.0 RC2

    Here my spring security config:
    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <beans xmlns="http://www.springframework.org/schema/beans"
    	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:flex="http://www.springframework.org/schema/flex"
    	xmlns:security="http://www.springframework.org/schema/security"
    	xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
    		http://www.springframework.org/schema/flex http://www.springframework.org/schema/flex/spring-flex-1.0.xsd
    		http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-3.1.xsd">
    
    	<security:global-method-security
    		secured-annotations="enabled" jsr250-annotations="enabled" />
    	<security:http entry-point-ref="preAuthenticatedEntryPoint">
    		<security:anonymous enabled="false" />
    	</security:http>
    	<bean id="preAuthenticatedEntryPoint"
    		class="org.springframework.security.web.authentication.Http403ForbiddenEntryPoint" />
    
    	<security:authentication-manager>
    		<security:authentication-provider>
    			<security:user-service>
    				<security:user name="dd" authorities="ROLE_USER" />
    			</security:user-service>
    		</security:authentication-provider>
    	</security:authentication-manager>
    
    </beans>
    In the line <security:http> above, STS writes the error "Configuration problem: spring-security-web classes are not available. You need these to use <http>".

    I'm sure all the spring security jar libraries are available (all the other XML security tags work fine) and located in WEB-INF/lib directory. Refresh project, clean project already done. Could you please help me?
    Thank you

    Pbesi

  • #2
    Either the spring-security-web jar, or one of its required dependencies are missing from the classpath. Check the FAQ and the dependency appendix in the manual for more information on what dependencies are needed and how to make sure you have them.

    Comment


    • #3
      I have the same issue at design time, but it works for me at runtime

      I get the same error at design time in the context xml file.

      I think this is because of spring security 3.1, as another project where I used 3.0 did not have this issue.
      I am using STS 2.8.0

      Comment


      • #4
        Got it to work eventually

        Initially I thought I had an issue with spring security 3.1, but actually it was because I was importing too many dependencies using maven.

        Importing just a few required spring jars, cleaning and rebuilding the project solved the issue, and I no longer get the error in my application context xml file

        Comment

        Working...
        X