views:

38

answers:

0

Hi.

I have two JUnit tests.

Separately,under Eclipse,they ran OK.

In case they were ran by mvn clean install command separately (one of the test was disabled),that all were OK also.

When both tests are enabled, that mvn clean install failed with stack:

18:37:40,964 ERROR main TestContextManager:258 - Caught exception while allowingTestExecutionListener [org.springframew
ork.test.context.support.DependencyInjectionTestExecutionListener@1adc6a5] to prepare test instance [myTestClassPath]
java.lang.IllegalStateException: Failed to load ApplicationContext
        at org.springframework.test.context.TestContext.getApplicationContext(TestContext.java:201)
        at org.springframework.test.context.support.DependencyInjectionTestExecutionListener.injectDependencies(Dependen
cyInjectionTestExecutionListener.java:109)
        at org.springframework.test.context.support.DependencyInjectionTestExecutionListener.prepareTestInstance(Depende
ncyInjectionTestExecutionListener.java:75)
        at org.springframework.test.context.TestContextManager.prepareTestInstance(TestContextManager.java:255)
        at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.createTest(SpringJUnit4ClassRunner.java:111)

Any idea of error?

Pathes to @ContextConfiguration in Test class seems to be ok.

Thank you for assistance.