title: cvc-elt.1: Cannot find the declaration of element 'beans'
body: <p>I am trying to get a bean object to authenticate the user login functionality with Spring Security:</p>
  
  <pre><code>    ApplicationContext context = new ClassPathXmlApplicationContext(
              "com/humandevice/drive/fx/util/applicationContext.xml");
      authenticationManager = (AuthenticationManager) context
              .getBean("authenticationManager");
  </code></pre>
  
  <p>My <code>applicationContext.xml</code> is below:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;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.xsd
         http://www.springframework.org/schema/security
         http://www.springframework.org/schema/security/spring-security-3.2.xsd
         http://www.springframework.org/schema/context
         http://www.springframework.org/schema/context/spring-context.xsd"
  xmlns:context="http://www.springframework.org/schema/context"&gt;
  &lt;context:component-scan base-package="com.humandevice.drive.fx"&gt;
      &lt;context:include-filter type="regex"
          expression="com.humandevice.drive.fx.*" /&gt;
  &lt;/context:component-scan&gt;
  &lt;bean id="LoginController" alias="loginController" class="controller.LoginController"&gt;
      &lt;property name="authenticationManager" ref="authenticationManager" /&gt;
      &lt;property name="applicationContext" ref="applicationContext" /&gt;
  &lt;/bean&gt;
  &lt;bean id="applicationContext" alias="applicationContext"
      class="org.springframework.context.ApplicationContext;"&gt;
  &lt;/bean&gt;
  &lt;authentication-manager alias="authenticationManager"&gt;
      &lt;authentication-provider user-service-ref="userService"&gt;
          &lt;password-encoder ref="bCryptPasswordEncoder" /&gt;
      &lt;/authentication-provider&gt;
  &lt;/authentication-manager&gt;
   &lt;/beans&gt;
  </code></pre>
  
  <p>but I get this exception:</p>
  
  <pre><code>Caused by: org.xml.sax.SAXParseException; lineNumber: 9; columnNumber: 64; cvc-elt.1: Cannot find the declaration of element 'beans'.
  </code></pre>
  
  <p>I am having difficulty understanding the issue.</p>
  
  <p><hr><strong>Update</strong><hr></p>
  
  <p>I have made some changes to my XML as such: </p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;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" xmlns:context="http://www.springframework.org/schema/context"
      xmlns:task="http://www.springframework.org/schema/task"
      xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
          http://www.springframework.org/schema/task http://www.springframework.org/schema/task/spring-task.xsd
          http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd
          http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-3.2.xsd"&gt;
  
      &lt;import resource="/context-service.xml" /&gt;
      &lt;import resource="/context-repository.xml" /&gt;
  
      &lt;context:component-scan base-package="com.humandevice.drive.fx"&gt;&lt;/context:component-scan&gt;
  
      &lt;authentication-manager&gt;
          &lt;authentication-provider user-service-ref="com.humandevice.drive.service.user.IUserService"&gt;
              &lt;password-encoder ref="bCryptPasswordEncoder" /&gt;
          &lt;/authentication-provider&gt;
      &lt;/authentication-manager&gt;
  &lt;/beans:beans&gt;
  </code></pre>
  
  <p>I now receive this exception: </p>
  
  <p><code>lineNumber: 11; columnNumber: 44; cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'import'.</code></p>