Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-7409

ServiceConstructionException when adding JAX-RS application ruins existing applications

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 3.1.10
    • None
    • JAX-RS
    • None
    • Unknown

    Description

      if a new application conflicts with
      an existing one, an Exception:

      Caused by: org.apache.cxf.service.factory.ServiceConstructionException:
      There is an endpoint already running on /test-application.
      at
      org.apache.cxf.jaxrs.JAXRSBindingFactory.addListener(JAXRSBindingFactory.java:86)

      at org.apache.cxf.endpoint.ServerImpl.start(ServerImpl.java:123)
      at
      org.apache.cxf.jaxrs.JAXRSServerFactoryBean.create(JAXRSServerFactoryBean.java:206)

      is raised, which is expected. The problem is that the already existing
      application ceases to work in the bus.

      Following sergeyb's advice I tried removing

      server.destroy()
      

      from the

      catch(RuntimeException e) {}
      

      block in JAXRSServerFactoryBean's create method. However there is a comment saying that that invocation is there to prevent leaks. Also, invocations to server.destroy() in other moments don't affect other existing applications in the bus.

      Attachments

        Activity

          People

            Unassigned Unassigned
            csierra Carlos Sierra Andrés
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: