Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id F1B79200CA8 for ; Thu, 15 Jun 2017 13:29:47 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id F0431160BDF; Thu, 15 Jun 2017 11:29:47 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 42D95160BC4 for ; Thu, 15 Jun 2017 13:29:47 +0200 (CEST) Received: (qmail 90850 invoked by uid 500); 15 Jun 2017 11:29:46 -0000 Mailing-List: contact dev-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cxf.apache.org Delivered-To: mailing list dev@cxf.apache.org Received: (qmail 90832 invoked by uid 99); 15 Jun 2017 11:29:46 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 15 Jun 2017 11:29:46 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 9E357CFE87 for ; Thu, 15 Jun 2017 11:29:45 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -1.101 X-Spam-Level: X-Spam-Status: No, score=-1.101 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-1, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd1-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id vWTPbPO-hW-F for ; Thu, 15 Jun 2017 11:29:44 +0000 (UTC) Received: from mail-wr0-f175.google.com (mail-wr0-f175.google.com [209.85.128.175]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id 6E4E65F283 for ; Thu, 15 Jun 2017 11:29:44 +0000 (UTC) Received: by mail-wr0-f175.google.com with SMTP id 36so17629477wry.3 for ; Thu, 15 Jun 2017 04:29:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=ZJOg4DpjIXLWPfKci67YR3yHYE8TVyptdLzBrl6uVzg=; b=TxPiD/DVhm8qhD11rw8HtEmRdrtXVs1Qm2TIVkfR1LUT0lnxBNd6ElnY5+4tpRwr64 yjKYLLudlNhw7N8E8ljTgz8joNkuB4/o6WTWSQYJXhS60ICf7t6uXkv36hnQlGqgkBZU YPLEIJD2j4W5qnvh4lDztcK1HyQB2OElqfQ0dDU9xRAu6fcOCjmzbpXxMvXFzS/u+J16 clzSacqodKZ+s72J0DfyKZEjjtJso3cBPVgjOGo36quuOpn7qbxXZyElqd5Ysgv4QYr+ OT/1BOmzY+wDbNBke5flZjRxLqjbT6v2CO5HFgH2eNiahs8ZwaZCsBL6QKoHNSmhxzfI nb/g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=ZJOg4DpjIXLWPfKci67YR3yHYE8TVyptdLzBrl6uVzg=; b=Ylam6LQ7Jg4eZmw6L0lGRuDxVisCKYg68YU654VryvGzmlX/Y7XG32kdjoYR0bCEoR JfZy8JiAsh2v8J6R25luV9dKiYOog8a2GffjSz/CYZUYCOQvXSeSbthVy0zrNFj1csR1 3VGQQha5EYHbCiFSym29qAbjwnXYKw95dY503yk37hiZU6N0bsJQbJw9UEo5IW6yqwfY B1RLLMf2laIcxWhA0rd2/eFaZ6ZvACWn8rLvmeVk+bBNymOJx7as2MFZ60F/sSTYqcIM Kod4/vTF/GOLW3GukO7yS3DFJzAOlHXqdnmDpywwJxz039rvFxitZ137h3XZsJ1zXCoI y9Hg== X-Gm-Message-State: AKS2vOxk8DnS/GiZSLAAzGHGqRsQ5MSfxb3XpXezS8W/UZBpO9kImPps 7cJgJkfeLpDyQHhq5Wc= X-Received: by 10.80.173.151 with SMTP id a23mr3214306edd.180.1497526183357; Thu, 15 Jun 2017 04:29:43 -0700 (PDT) Received: from [10.36.226.98] ([80.169.137.53]) by smtp.googlemail.com with ESMTPSA id b30sm1722577edd.6.2017.06.15.04.29.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 15 Jun 2017 04:29:42 -0700 (PDT) Subject: Re: ServiceConstructionException when adding JAX-RS application ruins existing applications To: =?UTF-8?Q?Carlos_Sierra_Andr=c3=a9s?= , dev@cxf.apache.org References: <9089d186-39e4-e6a4-81c2-104f517e8cc0@gmail.com> <9c398787-4ba5-49f1-2412-416ee2832ffe@gmail.com> <09aa8199-ed4e-748d-03c1-f4bf425cf481@gmail.com> <012403e3-d2f1-5bdd-f660-aa7a0e5149aa@gmail.com> From: Sergey Beryozkin Message-ID: <4e4ece58-8a76-658c-3847-bbc5be4a64d8@gmail.com> Date: Thu, 15 Jun 2017 12:29:42 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 MIME-Version: 1.0 In-Reply-To: <012403e3-d2f1-5bdd-f660-aa7a0e5149aa@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit archived-at: Thu, 15 Jun 2017 11:29:48 -0000 Hi I'm not sure what the actual underlying cause is, as you commented the servers are sharing the same destination in this case and I guess it does not make sense to destroy a server instance which may cause the side-effects if this server instance has not even done any registrations of its own - I'm just hoping that introducing a dedicated exception for this case will help - though I'm not 100% sure at this stage Thanks, Sergey On 15/06/17 11:11, Carlos Sierra Andrés wrote: > Hey Sergey, > > I will. > > In the meantime, I tried commenting out the server.destroy() invocation > in the version I was using and, indeed, it solved the problem. I must > admit I was skeptical because I use server.destroy() to remove > applications from the bus and it never had affected any other > application in the bus. > > Do you think it is caused by the fact both applications share the same > prefix? > > Thx. > > > El 15/6/17 a las 11:18, Sergey Beryozkin escribió: >> Yes please >> >> On 15/06/17 07:38, Carlos Sierra Andrés wrote: >>> Should I file a bug in jira then? >>> >>> >>> El 14/6/17 a las 17:35, Sergey Beryozkin escribió: >>>> Hi >>>> >>>> I see that the factory bean is destroying the server if a >>>> RuntimeException came in from server.start(). I guess it is what is >>>> causing the side-effects for the already running application which use >>>> the listener on that address... >>>> >>>> I think we may need to introduce ServerAlreadyRunningException and in >>>> this case do not call server.destroy() >>>> >>>> Dan, does it sound reasonable to you ? >>>> >>>> Thanks, Sergey >>>> On 14/06/17 16:30, Carlos Sierra Andrés wrote: >>>>> Hey there, >>>>> >>>>> I am trying to implement JAX-RS aries whiteboard on top of CXF and >>>>> I am >>>>> having problems with error handling. I have no problem adding new >>>>> applications to an existing bus but, 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. Is this an expected behaviour? >>>>> Looks like a bug, doesn't it? >>>>> >>>>> Thx in advance! >>>>> >>>>> >>>> >>>> >>> >