Hi,
I have some problems with spring javaconfig and i don't understand why this error happens.
I try to explain:
The error is:
Code:2008-03-26 09:10:15,504 main INFO [org.springframework.config.java.process.ConfigurationProcessor$1] Refreshing org.springframework.config.java.process.ConfigurationProcessor$1@106bde8: display name [org.springframework.config.java.process.ConfigurationProcessor$1@106bde8]; startup date [Wed Mar 26 09:10:15 WET 2008]; parent: com.multicert.project.cc.ocsp.bsl 2008-03-26 09:10:15,505 main ERROR org.springframework.web.context.ContextLoader] Context initialization failed java.lang.IllegalStateException: GenericApplicationContext does not support multiple refresh attempts: just call 'refresh' once
What i have is a Javaconfig class:
My Spring config of JavaConfig:Code:@Configuration public class HSMConfiguration{ @Bean(lazy = Lazy.TRUE) public HsmManager hsmManager(){ ............................................... return hmanager; } @ExternalBean public HSMInformation hsmInformation(){return null;} @ExternalBean public String operateMode(){return null;} @ExternalBean public KeyStoreElementRepository keyStoreElementRepository(){return null;} @ExternalBean public GenericObjectPool pool(){return null;} }
Can anyone help me ?Code:<!-- the configuration above --> <bean class="com.multicert.project.cc.ocsp.bsl.configuration.HSMConfiguration"/> <!-- Java Configuration post processor--> <bean class="org.springframework.config.java.process.ConfigurationPostProcessor"/> <bean name="operateMode" class="java.lang.String"> <constructor-arg value="${operate.hsmmode}" /> </bean>
The only thing that my be influence this is that i'm using Singletons Spring applications context with:
But i have to use it, because i have to share some modules with other teams.Code:<context-param> <param-name>locatorFactorySelector</param-name> <param-value>classpath*:beanRefFactory.xml</param-value> </context-param>
This is a conflict between the Spring JavaConfig and Singleton Spring Context Application ?
Thanks in Advance,
Joćo Cerdeira


Reply With Quote
