I'm trying to combine JUnit and Spring in a web project. Thanks to this question, I have succeeded in loading the spring config file into TestClass:
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration
public class TwitterServiceTest {
@Resource
IRepository repository;
But when the test runs, I got the following error:
Caused by: org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Unable to locate Spring NamespaceHandler for XML schema namespace [http://java.sun.com/xml/ns/javaee]
I guess that the problem might be that the library files are not in classpath. Currently I use Sysdeo Eclipse Tomcat plugin DevLoader to do the loading job (load jar file from M2_REPO to the classpath).
This project depends on many libraries. Is there any idea about how to fix this error? Any help would be greatly appreciated.