Announcement Announcement Module
No announcement yet.
CXF with Spring and a reload causes : endpoint already registered Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • CXF with Spring and a reload causes : endpoint already registered

    I have the following configuration setup for my service:

    <!-- for the instance service web service -->
    <simple:server id="InstanceService"
    serviceClass="com.rrd.xspace.service.instance.Inst anceService"
    <ref bean="instanceService" />

    And I have some code that looks at the applicationContext.xml file periodically for a change and if it finds it, I invoke in code:


    The context starts to reload all the beans until it hits the CXF definitions, then I get the following error:

    Exception in thread "Timer-3" org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'InstanceService': Invocation of init method failed; nested exception is java.lang.RuntimeException: Soap 1.1 endpoint already registered on address http://localhost:8808/InstanceService
    at AutowireCapableBeanFactory.initializeBean(Abstract
    at AutowireCapableBeanFactory.doCreateBean(AbstractAu
    at AutowireCapableBeanFactory.createBean(AbstractAuto
    at BeanFactory$1.getObject( 91)
    at ingletonBeanRegistry.getSingleton(DefaultSingleton
    at BeanFactory.doGetBean( )
    at BeanFactory.getBean(
    at ationContext.getBean(AbstractApplicationContext.ja va:1075)

    It looks like somehow I need to manually close these endpoints on shutdown? Any one have any clue or code snippet on what I need to do?

    Any help GREATLY appreciated.