Closed
Description
James Shaw opened SPR-10542 and commented
Trying to access a bean of type Object gives the backtrace:
Exception in thread "main" org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'environment' is defined
at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanDefinition(DefaultListableBeanFactory.java:568)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBean(DefaultListableBeanFactory.java:264)
at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1125)
at Test.main(Test.java:7)
See attached test case to reproduce.
Affects: 3.2.2
Attachments:
- spring-testcase.tar.gz (7.54 kB)
Issue Links:
- ApplicationContext fails to load in TestNG test if previous test is annotated with @DirtiesContext [SPR-12918] #17517 ApplicationContext fails to load in TestNG test if previous test is annotated with
@DirtiesContext