Hello!
I have a Spring MVC application and a problem with JUnit tests combined with the file applicationContext.xml.
In my JUnit test class I write:
final ApplicationContext context = new ClassPathXmlApplicationContext("applicationContext.xml");
service = (TestServiceImpl) context.getBean("testServiceImpl");
The error I get is that aplicationContect.xml can not be found:
org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from class path resource [applicationContext.xml]; nested exception is java.io.FileNotFoundException: class path resource [applicationContext.xml] cannot be opened because it does not exist
But it exits in the WEB-INF folder. Here you can see the tree of my project with the applicationContext.xml file: http://img28.imageshack.us/img28/2576/treexp.png
So, what's wrong here? Why does the file not exist for the JUnit test?
Thank you in advance & Best Regards.