java - cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'property' -


sorry if question has been answered - have found several answers usual source of problem such using , having no xmlns:beans declaration seems different... here's xml file:

<?xml version="1.0" encoding="utf-8"?> <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.2.xsd                     http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-3.1.xsd">  <beans:bean class="org.springframework.beans.factory.config.propertyplaceholderconfigurer" />  <global-method-security pre-post-annotations="enabled" />  <beans:bean id="authmessagehandler" class="xxx.authenticationmessagehandler" />  <!-- **************************** --> <!-- security configuration rest services. --> <http pattern="/consultants/**"      authentication-manager-ref="authenticationmanager" entry-point-ref="restservicesentrypoint"     create-session="stateless">     <custom-filter ref="restservicesfilter"         before="pre_auth_filter" /> </http>  <!-- entry point rest service. --> <beans:bean id="restservicesentrypoint" class="xxx.restauthenticationentrypoint" />  <!-- filter rest services. --> <beans:bean id="restservicesfilter" class="xxx.restusernamepasswordauthenticationfilter">     <property name="postonly" value="false" />     <property name="authenticationmanager" ref="authenticationmanager" />     <property name="authenticationsuccesshandler" ref="restservicessuccesshandler" /> </beans:bean>  <!-- handler successful rest service authentication. --> <beans:bean id="restservicessuccesshandler" class="xxx.restauthenticationsuccesshandler" /> <!-- **************************** -->  <http access-denied-page="/public/auth/denied.html" use-expressions="true" auto-config="false">     <!--define our custom login page-->     <form-login login-page="/auth/login"         default-target-url="/main"         always-use-default-target="true"         authentication-failure-handler-ref="authmessagehandler" />      <session-management invalid-session-url="/auth/invalid-session"></session-management>      <!-- not logged in have access login pages. -->     <intercept-url pattern=          <!-- stuff -->     />      <logout logout-success-url="/auth/login" invalidate-session="false" /> </http>    

stuff between asterisks added working xml , 3 error mentioned in question's title on lines:

<property name="postonly" value="false" /> <property name="authenticationmanager" ref="authenticationmanager" /> <property name="authenticationsuccesshandler" ref="restservicessuccesshandler" /> 

i don't understand why. can advice on what's happening here?

your root element has

xmlns="http://www.springframework.org/schema/security" 

therefore these elements:

<property name="postonly" value="false" /> <property name="authenticationmanager" ref="authenticationmanager" /> <property name="authenticationsuccesshandler" ref="restservicessuccesshandler" /> 

are in http://www.springframework.org/schema/security namespace when should in http://www.springframework.org/schema/beans one. need use

<beans:property name="postonly" value="false" /> <beans:property name="authenticationmanager" ref="authenticationmanager" /> <beans:property name="authenticationsuccesshandler" ref="restservicessuccesshandler" /> 

instead.


Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -