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:
@RunWit
I made a stupid mistake, which is using "web.xml" as spring configuration context file. SpringJUnit4ClassRunner try to parse it as the spring context file so it failed.
After including the right context file, the application works now.