title: Why is junit giving me a failed to load ApplicationContext error
body: <p>I am trying to run my first junit class in eclipse.  When I right click on the new class and select run as junit it gives me a failed to load applicationcontext error.  The direct path to the spring-servlet.xml is correct.</p>
  
  <p>Here's the code:</p>
  
  <pre><code>import static org.junit.Assert.*;
  import org.junit.Before;
  import org.junit.Test;
  import org.junit.runner.RunWith;
  import org.springframework.beans.factory.annotation.Autowired;
  import org.springframework.context.ApplicationContext;
  import org.springframework.test.context.ContextConfiguration;
  import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
  
  @RunWith(SpringJUnit4ClassRunner.class)
  @ContextConfiguration(locations={"file:C:/MyProject/WEB-INF/spring-servlet.xml" 
  }) 
  public class MyUnitTest {
  @Autowired
  private ApplicationContext applicationContext;
  
  @Before
  public void setUp() {
  }
  
  @Test
  public void testFunctionality() throws Exception {
      assertTrue(true);
  }
  }
  </code></pre>
  
  <p>error - </p>
  
  <pre><code>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 'aop:scoped-proxy'.
  </code></pre>