Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make Spring ContextTest annotation support WebApplicationContext [SPR-4759] #9436

spring-issuemaster opened this issue Apr 28, 2008 · 1 comment


Copy link

@spring-issuemaster spring-issuemaster commented Apr 28, 2008

Yaozong Zhu opened SPR-4759 and commented

I am trying to integrate my tests into Spring 2.5 availing of TestContext annotations. But I met a support issue. The followings are relevant codes:

@TestExecutionListeners(value = {
@ContextConfiguration(locations = {
}, inheritLocations = true)
@TransactionConfiguration(transactionManager = "transactionManager", defaultRollback = true)
public abstract class BaseTestCase extends AbstractJUnit4SpringContextTests {...}

@ContextConfiguration(locations = {
}, inheritLocations = true)
public abstract class BaseWebControllerTestCase extends BaseTestCase{...}

public class UserFormControllerTest extends BaseWebControllerTestCase{
private UserFormController c = null;


java.lang.IllegalStateException: WebApplicationObjectSupport instance [xxx.UserFormController@123961b] does not run in a WebApplicationContext but in: display name []; startup date [Mon Apr 28 15:35:37 BST 2008]; root of context hierarchy

Affects: 2.5.2

Issue Links:

  • #9917 Support loading WebApplicationContexts with the TestContext Framework ("duplicates")

1 votes, 1 watchers


This comment has been minimized.

Copy link
Collaborator Author

@spring-issuemaster spring-issuemaster commented Oct 30, 2008

Juergen Hoeller commented

See #9917.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
2 participants
You can’t perform that action at this time.