Immediately after creating all the beans declared in the various context files of my application, Spring notifies (see below) that it is destroying singletons and that context initialization failed.
[INFO] Destroying singletons in
org.springframework.beans.factory.support.DefaultListableBeanFactory
org.springframework.web.context.ContextLoader [ERROR] Context
initialization failed
Does anyone know why the Spring container is destroying all the beans right after creating them?
NOTE: There are no warnings or errors in the log output aside from the above context initialization failure error — see below.
[DEBUG] Eagerly caching bean ‘uploadService’ to allow for resolving potential circular references
2011-09-21 15:19:08 org.springframework.beans.factory.annotation.InjectionMetadata[DEBUG] Processing injected method of bean ‘uploadService’: AutowiredFieldElement for private
org.apache.commons.fileupload.disk.DiskFileItemFactory com.faciler.ws.services.UploadService.diskFileFactory 2011-09-21 15:19:08
org.springframework.beans.factory.support.DefaultListableBeanFactory[DEBUG] Creating shared instance of singleton bean
‘diskFileItemFactory’ 2011-09-21 15:19:08
org.springframework.beans.factory.support.DefaultListableBeanFactory[DEBUG] Creating instance of bean ‘diskFileItemFactory’ 2011-09-21
15:19:08
org.springframework.beans.factory.support.DefaultListableBeanFactory[INFO] Destroying singletons in
org.springframework.beans.factory.support.DefaultListableBeanFactory@b0ede6:
defining beans [org.springframework.beans.
The context initialization failure is causing spring to destroy the beans already successfully created – not the other way round. You will probably need to up the log level to INFO or DEBUG to get to the root cause.