You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
SpringJUnit4ClassRunner is not compatible with java context configuration [SPR-7769] #12425
@RunWith(SpringJUnit4ClassRunner.class)
@Import(SomeTestContext.class)
public class SomeTest {
....
}
get exception:
Caused by: java.lang.IllegalArgumentException: Can not load an ApplicationContext with a NULL 'contextLoader'. Consider annotating your test class with @ContextConfiguration.
at org.springframework.util.Assert.notNull(Assert.java:112)
at org.springframework.test.context.TestContext.loadApplicationContext(TestContext.java:276)
at org.springframework.test.context.TestContext.getApplicationContext(TestContext.java:304)
... 24 more
Activity
spring-projects-issues commentedon Mar 10, 2011
Chris Beams commented
Duplicates #10852. Using
@Importhere (per example) is an interesting idea, however.