Results 1 to 6 of 6

Thread: Problem in migrating from spring 2.5 to 3.0 in security

  1. #1
    Join Date
    Jun 2010
    Posts
    4

    Default Problem in migrating from spring 2.5 to 3.0 in security

    I am migrating my application from spring 2.5 to 3.0.

    I am getting follwing error while i try to deploy my application in spring dm server 2.0

    Caused by: org.xml.sax.SAXParseException: cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'sec:http'

    My securityContext xml file looks like the below



    <?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:tx="http://www.springframework.org/schema/tx"
    xmlns:sec="http://www.springframework.org/schema/security"
    xsi:schemaLocation="
    http://www.springframework.org/schema/beans
    http://www.springframework.org/schem...-beans-3.0.xsd
    http://www.springframework.org/schema/tx
    http://www.springframework.org/schem...ing-tx-3.0.xsd
    http://www.springframework.org/schema/security
    http://www.springframework.org/schema/security/spring-security-3.0.xsd">
    <!--<description>
    This is the configuration file for the Spring Security
    configuration used with the sample application.
    </description>-->

    <sec:http>
    <sec:intercept-url pattern="/xxx/login.htm" access="IS_AUTHENTICATED_ANONYMOUSLY" filters="none" />


    <sec:intercept-url pattern="/**/*.htm" access="ROLE_ADMIN, ROLE_CONFIGURATOR, ROLE_USER, ROLE_VIEWER" />


    <sec:form-login login-page="/xxx/login.htm" default-target-url="/xxx/tabs.htm"
    authentication-failure-url="/xxx/login.htm?login_error=1" />
    <sec:logout logout-url="/xxx/logout.htm" logout-success-url="/xxx/login.htm"/>
    </sec:http>

    <bean id="springSecurityFilterChain" class="org.springframework.web.filter.DelegatingFi lterProxy"/>

    <bean id="xxxUserAuthenticationProvider"
    class="com.nm.apps.gui.user.util.XxxUserAuthentica teProvider">
    <property name="host" value="localhost" />
    </bean>

    <!-- Authentication Manager -->
    <bean id="_authenticationManager" class="org.springframework.security.providers.Prov iderManager">
    <property name="providers">
    <list>
    <ref bean="xxxUserAuthenticationProvider" />
    </list>
    </property>
    </bean>
    </beans>

  2. #2
    Join Date
    Jun 2006
    Location
    The Netherlands
    Posts
    13,632

    Default

    Use [ code][/code ] tags when posting code !!!

    Spring Security isn't part of the Spring Framework. You will need additional jars if you want to upgrade those as well.
    Marten Deinum
    Java Consultant / Pragmatist / Open Source Enthousiast / Author


    Pro Spring MVC: With Web Flow
    Conspect

    Have you read the reference guide.
    Use the [ code ] tags, young padawan

  3. #3
    Join Date
    Jun 2010
    Posts
    4

    Default

    Hi

    I have already added all spring security related jars from spring repository.

  4. #4
    Join Date
    Jun 2010
    Posts
    4

    Default

    I have tried with all the spring security related jars.still the problem exists.

    Could you please specify the jars that need to be added.

  5. #5
    Join Date
    Jun 2010
    Posts
    4

    Default

    As i am using spring dm server 2.0 Could you please let me know whether i need to add spring security jars to pickup folder or usr folder ?

  6. #6
    Join Date
    Jan 2008
    Posts
    1,826

    Default

    In Spring Security 3.0 the namespace configuration was removed from spring-security-core. Try adding spring-security-config and see if that helps.

    Regards,
    Rob

Posting Permissions

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