title: Spring use bean from applicationContext in security-context.xml
body: <p>I have following entries</p>
  
  <p>web.xml: </p>
  
  <pre><code>  &lt;context-param&gt;
      &lt;param-name&gt;contextConfigLocation&lt;/param-name&gt;
      &lt;param-value&gt;/WEB-INF/applicationContext.xml /WEB-INF/spring-security.xml&lt;/param-value&gt;
  &lt;/context-param&gt;
  &lt;listener&gt;
      &lt;listener-class&gt;org.springframework.web.context.ContextLoaderListener&lt;/listener-class&gt;
  &lt;/listener&gt;
  </code></pre>
  
  <p>applicationContext:</p>
  
  <pre><code>&lt;bean id="myUserDAO" class="no.java.UserDAOImpl"&gt;
      &lt;property name="DataSource" ref="myDataSource"/&gt;
  &lt;/bean&gt;
  </code></pre>
  
  <p>in spring-security.xml
  i have following entry:</p>
  
  <pre><code>&lt;beans:bean id="myUserDetailsService" class="no.java.SimpleUserDetailsService" &gt;
              &lt;property name="UserDAO" ref="myUserDAO" /&gt;
   &lt;/bean&gt;
  </code></pre>
  
  <p>and now i'm gettting following error</p>
  
  <pre><code>org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 13 in XML document from ServletContext resource [/WEB-INF/spring-security.xml] is invalid; nested exception is org.xml.sax.SAXParseException; lineNumber: 13; columnNumber: 56; cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'property'.
      at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:396)
  </code></pre>
  
  <p>as far as i understand i should be getting something like bean myUserDAO undefined or something similar, but i'm not. I'd be really greatful for any help as i'm enjoying this error for quite a few hours right now.</p>