I am getting the error "java.lang.IllegalStateExcepton: Failed to load Application Context" when I am trying to run my unit test from within Eclipse.
The Unit Test itself seems very simple:
package com.mycompany.interactive.cs.isales.ispr.ws.productupgrade;
import org.junit.Assert;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations={"/applicationContext.xml"})
public class ProductUpgradeTest {
@Test
public void getProductUpgrade () throws Exception
{
//System.out.println(PrintClasspath.getClasspathAsString());
Assert.assertTrue(true);
}
}
But no matter what I seem to do with the @ContextConfiguration
I still get the same error.
The applicationContext.xml file resides within a folder /etc/ws, but even if I put a copy in the same folder it is still giving me errors.
I am very new to Java, Spring, Eclipse and Ant, and really don't know where this is going wrong.