 <p>It seems that your XML configuration file can't be found or loaded properly, thus you aren't able to do the injections properly.</p> <p>I suggest just use classpath, if your XML configuration file is within your CLASSPATH there's no need to mention WEB-INF etc'. Like this:</p> <pre><code>@RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration("classpath:demo-servlet.xml") public class CrudTestJUnit extends AbstractJUnit4SpringContextTests { } </code></pre>