title: The matching wildcard is strict, but no declaration can be found for element 'import'
body: <p>I am using Spring security for my Maven web application and I have created the spring-security.xml file for handling authentication. In that I am trying to import one bean from another file, Beans.xml using import. When I did this the following error occured.</p>
  
  <p>The matching wildcard is strict, but no declaration can be found for element 'import'</p>
  
  <p>Beans.xml</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;!DOCTYPE xml&gt;
  &lt;beans xmlns = "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"&gt;
  
      &lt;bean id = "dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource"&gt;
       &lt;property name = "driverClassName" value = "com.mysql.jdbc.Driver"/&gt;
        &lt;property name = "url" value = "jdbc:mysql://localhost:3306/Employee_Management"/&gt;
        &lt;property name = "username" value = "root"/&gt;
        &lt;property name = "password" value = "root"/&gt;
     &lt;/bean&gt;
  
     &lt;bean id = "transactionManager" 
        class = "org.springframework.jdbc.datasource.DataSourceTransactionManager"&gt;
        &lt;property name = "dataSource"  ref = "dataSource" /&gt;
     &lt;/bean&gt;
  
     &lt;bean id = "employeeJDBCTemplate" class = "com.utility.EmployeeJDBCTemplate"&gt;
       &lt;property name = "dataSource"  ref = "dataSource" /&gt;
       &lt;property name = "transactionManager" ref = "transactionManager"/&gt;
     &lt;/bean&gt;
  
     &lt;bean class = "org.springframework.web.servlet.view.InternalResourceViewResolver"&gt;
        &lt;property name = "prefix" value = "/WEB-INF/jsp/" /&gt;
        &lt;property name = "suffix" value = ".jsp" /&gt;
     &lt;/bean&gt;
  
  &lt;/beans&gt;
  </code></pre>
  
  <p>spring-security.xml</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;beans:beans xmlns="http://www.springframework.org/schema/security"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xmlns:beans="http://www.springframework.org/schema/beans"
      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.xsd"&gt;
  
      &lt;import resource="Beans.xml"/&gt;
  
      &lt;http entry-point-ref="loginUrlAuthenticationEntryPoint" auto-config="true" authentication-manager-ref="authenticationManager"&gt;
          &lt;intercept-url pattern="/j_spring_security_check" access="isAnonymous()"/&gt;
          &lt;intercept-url pattern="/login" access="isAnonymous()"/&gt;
          &lt;intercept-url pattern="/welcome" access="hasRole('ROLE_ADMIN')"/&gt;
          &lt;form-login login-processing-url="/j_spring_security_check" login-page="/login" default-target-url="/welcome"
              authentication-failure-url="/login?error" username-parameter="username"
              password-parameter="password" /&gt;
          &lt;logout logout-url="/j_spring_security_logout" invalidate-session="true" logout-success-url="/login?logout"/&gt;
      &lt;/http&gt;
  
      &lt;beans:bean id="employeeAuthenticationProvider" class="com.authentication.EmployeeAuthenticationProvider"&gt;
        &lt;beans:property name="employeeJDBCTemplate" ref="employeeJDBCTemplate" /&gt;
      &lt;/beans:bean&gt;
  
      &lt;authentication-manager alias="authenticationManager"&gt;
          &lt;authentication-provider ref="employeeAuthenticationProvider"/&gt;
      &lt;/authentication-manager&gt;
  
      &lt;beans:bean id="loginUrlAuthenticationEntryPoint" class="org.springframework.security.web.authentication.LoginUrlAuthenticationEntryPoint"&gt;
          &lt;beans:constructor-arg value="/login"/&gt;
      &lt;/beans:bean&gt;
  &lt;/beans:beans&gt;
  </code></pre>
  
  <p>Here I have used "employeeJDBCTemplate" bean from the imported bean file. But the import tag produces error. The spring-security.xml and Beans.xml are available in the same folder. Also I tried by moving the Beans.xml file to resources folder. Even then I am getting the same error. Spring version used is 4.3.4 and spring security version is 4.2.0. Please help.</p>