0
votes

Sorry dont have the entire piece of code trying to sort out with my collegure

    applicationContext.xml
   <http  access-decision-manager-ref="accessDecisionManager"
    use-expressions="true"/>

    <http tag shows error as it is not recognized.

error:

cvc-complex-type.2.4.a: Invalid content was found starting with element 'http'. One of '{"http:// www.springframework.org/schema/beans":import, "http://www.springframework.org/schema/beans":alias, "http://www.springframework.org/schema/beans":bean, WC[##other:"http://www.springframework.org/ schema/beans"]}' is expected.

we even tried with the latest version of spring jar dependencies but shows same error.

Any suggestions as to why this might occur, Help me out

1
can u post declaration of shemalocation (first bean tag)? - Cuzz

1 Answers

0
votes

it seems something wrong with namespaces declaration, try this if you use separate file for spring security configuration:

<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.2.xsd">

   <http  access-decision-manager-ref="accessDecisionManager"
    use-expressions="true"/>

</beans:beans>

Or something like this, if you use security in another context xml, for using security tags with special prefix:

<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       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/security
       http://www.springframework.org/schema/security/spring-security-3.2.xsd">

   <security:http access-decision-manager-ref="accessDecisionManager" 
   use-expressions="true"/>

</beans:beans>