You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Charles Moulliard <ch...@gmail.com> on 2013/01/16 12:11:16 UTC
Fwd: JUnit test issue with CXF 2.6.3 / Spring 3.0.7 / Spring Security
3.1.2 & Camel 2.10
Hi,
I have a maven project containing 2 Test classes. Each one can be
tested individually and that works fine. But when mvn test runs the two
test consecutively, I get this error which is apparently linked to Spring
BeanFactory of Spring not started or refreshed.
What could be the problem here ?
java.lang.IllegalStateException: BeanFactory not initialized or already
closed - call 'refresh' before accessing beans via the ApplicationContext
at
org.springframework.context.support.AbstractRefreshableApplicationContext.getBeanFactory(AbstractRefreshableApplicationContext.java:171)
at
org.springframework.context.support.AbstractApplicationContext.containsBean(AbstractApplicationContext.java:1091)
at
org.apache.cxf.configuration.spring.ConfigurerImpl.configureBean(ConfigurerImpl.java:145)
at
org.apache.cxf.configuration.spring.ConfigurerImpl.configureBean(ConfigurerImpl.java:115)
at
org.apache.cxf.frontend.ClientProxyFactoryBean.configureObject(ClientProxyFactoryBean.java:104)
at
org.apache.cxf.frontend.ClientProxyFactoryBean.create(ClientProxyFactoryBean.java:131)
at
org.apache.cxf.jaxws.JaxWsProxyFactoryBean.create(JaxWsProxyFactoryBean.java:156)
at
com.redhat.fuse.example.camel.WebServiceAuthenticateCustomerUsingRealmTest.createCXFClient(WebServiceAuthenticateCustomerUsingRealmTest.java:77)
at
com.redhat.fuse.example.camel.WebServiceAuthenticateCustomerUsingRealmTest.testGetAllCustomers(WebServiceAuthenticateCustomerUsingRealmTest.java:91)
Code
https://gist.github.com/4546388
Spring
https://gist.github.com/4546379
https://gist.github.com/4546384
Regards,
--
Charles Moulliard
Apache Committer / Sr. Enterprise Architect (RedHat)
Twitter : @cmoulliard | Blog : http://cmoulliard.blogspot.com