Results 1 to 4 of 4

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

Hybrid View

  1. #1
    Join Date
    Nov 2009
    Posts
    6

    Default 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. #2
    Luke Taylor is offline Senior Member Acegi Security System TeamSpring Team
    Join Date
    Aug 2004
    Location
    Glasgow, Scotland
    Posts
    3,449

    Default

    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.
    Spring - by Pivotal
    twitter @tekul

  3. #3
    Join Date
    Dec 2011
    Posts
    24

    Default 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

  4. #4
    Join Date
    Dec 2011
    Posts
    24

    Default 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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •