Maven 3 and JUnit 4 compilation problem: package org.junit does not exist

@Dennis Roberts: You were absolutely right: My test class was located in src/main/java. Also the value of the “scope” element in the POM for JUnit was “test”, although that is how it is supposed to be. The problem was that I had been sloppy when creating the test class in Eclipse, resulting in it being … Read more

Java Project: Failed to load ApplicationContext

Looks like you are using maven (src/main/java). In this case put the applicationContext.xml file in the src/main/resources directory. It will be copied in the classpath directory and you should be able to access it with From the Spring-Documentation: A plain path, for example “context.xml”, will be treated as a classpath resource from the same package in which the test class is … Read more