cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christian Schneider (JIRA)" <>
Subject [jira] [Resolved] (DOSGI-58) Better handling for port conflicts when using property
Date Wed, 14 Sep 2016 09:47:21 GMT


Christian Schneider resolved DOSGI-58.
    Resolution: Won't Fix
      Assignee: Christian Schneider

With recommendation to use the servlet transport.

> Better handling for port conflicts when using property
> --------------------------------------------------------------------------------
>                 Key: DOSGI-58
>                 URL:
>             Project: CXF Distributed OSGi
>          Issue Type: Improvement
>          Components: REST
>    Affects Versions: 1.1
>            Reporter: Daniel Bimschas
>            Assignee: Christian Schneider
>            Priority: Minor
>              Labels: configuration
> Below is an exception from the mailing list thread that describes the issue... (reverse
> I see....Perhaps it could recognize that a conflict will occur and print a more meaningful
exception message advising users to use a context property. If DOSGI will try to silently
attach the endpoint to a paxweb-enabled HttpService then it might become complicated (paxweb
may not be installed in case of multibindle distro) or a user might've used the explicit address
exactly because a standalone jetty were expected to start, etc...
> Can you please open a JIRA in a DOSGI subproject so that we can track this issue and
discuss how to fix it ?
> thanks, Sergey
> ----- Original Message ----- From: "Daniel Bimschas" <>
> To: <>
> Sent: Friday, February 05, 2010 3:07 PM
> Subject: Re: DOSGi and JSON responses
> Oh, I know of the org.osgi.service.http.port value that lets Pax Web start it's Jetty
instance on 8080 per default. I tried to say that users of DOSGI (especially newbies) would
certainly expect that using "" would work nevertheless by simply
using the same port (i.e. if there's no web context conflict).
> I guess that some DOSGI (or CXF) bundle which is responsible for registering the JAX-RS
servlet to some Jetty instance could surely check if there's a servlet container instance
running on the desired port and reusing that instance...
> Daniel
> Am 05.02.2010 um 15:56 schrieb Sergey Beryozkin:
> Hi
> This can be easily fixed AFAIK, I can't recall the name of the paxweb property but you
can ensure its Httpservice occupies some other port...Just checked in ServiceMix, it is
> org.osgi.service.http.port=8181,
> add it to felix/etc/ etc
> cheers, Sergey
> Sergey,
> I just stumbled over another issue that may annoy DOSGI users. If you start the single
bundle distribution (no idea if it's the same with multi bundle) it starts a Jetty on localhost:8080
which should be usable like a OSGi compendium HTTP service (that's what I understood at least).
Now if one uses the JAX-RS stuff and registers it's instance with the ""
property he will have to choose a port other than 8080 or he'll get the following exception:
> WARNUNG: WARNING : Problem creating a remote endpoint for
from CXF PublishHook, reason is null
> org.apache.cxf.service.factory.ServiceConstructionException
> at org.apache.cxf.jaxrs.JAXRSServerFactoryBean.create(
> at org.apache.cxf.dosgi.dsw.handlers.JaxRSPojoConfigurationTypeHandler.createServer(
> at org.apache.cxf.dosgi.dsw.hooks.ServiceHookUtils.createServer(
> at org.apache.cxf.dosgi.dsw.hooks.CxfPublishHook.createServer(
> at org.apache.cxf.dosgi.dsw.hooks.CxfPublishHook.publishEndpoint(
> at org.apache.cxf.dosgi.dsw.Activator$
> at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(
> at java.util.concurrent.ThreadPoolExecutor$
> at
> Caused by: org.apache.cxf.interceptor.Fault: Could not start Jetty server: Address already
in use
> at org.apache.cxf.transport.http_jetty.JettyHTTPServerEngine.addServant(
> at org.apache.cxf.transport.http_jetty.JettyHTTPDestination.activate(
> at org.apache.cxf.transport.AbstractObservable.setMessageObserver(
> at org.apache.cxf.binding.AbstractBindingFactory.addListener(
> at org.apache.cxf.endpoint.ServerImpl.start(
> at org.apache.cxf.jaxrs.JAXRSServerFactoryBean.create(
> ... 8 more
> Caused by: Address already in use
> at Method)
> at
> at
> at
> at org.mortbay.jetty.nio.SelectChannelConnector.doStart(
> at org.mortbay.component.AbstractLifeCycle.start(
> at org.mortbay.jetty.Server.doStart(
> at org.mortbay.component.AbstractLifeCycle.start(
> at org.apache.cxf.transport.http_jetty.JettyHTTPServerEngine.addServant(
> ... 13 more
> I guess it should be possible to reuse the running Jetty instance and deploy the instance
to the standard OSGi HTTP service. At least that's what a user would expect. What do you think
about it?
> Kind regards,
> Daniel

This message was sent by Atlassian JIRA

View raw message