Return-Path: X-Original-To: apmail-camel-users-archive@www.apache.org Delivered-To: apmail-camel-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id F2B78FB76 for ; Wed, 1 May 2013 05:47:37 +0000 (UTC) Received: (qmail 81770 invoked by uid 500); 1 May 2013 05:47:37 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 81494 invoked by uid 500); 1 May 2013 05:47:37 -0000 Mailing-List: contact users-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@camel.apache.org Delivered-To: mailing list users@camel.apache.org Received: (qmail 81475 invoked by uid 99); 1 May 2013 05:47:36 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 May 2013 05:47:36 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of claus.ibsen@gmail.com designates 209.85.223.169 as permitted sender) Received: from [209.85.223.169] (HELO mail-ie0-f169.google.com) (209.85.223.169) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 May 2013 05:47:31 +0000 Received: by mail-ie0-f169.google.com with SMTP id ar20so1599129iec.14 for ; Tue, 30 Apr 2013 22:47:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:mime-version:in-reply-to:references:from:date:message-id :subject:to:content-type; bh=Z80tktn7HwVG3UA0aN01W92e7IjZKqkVaYGoSN+qnq4=; b=1C+a4tfGJeh026WLRMFME+z+JnHUoT22Zto5oWOFp/GcuFMCLiAk49YIEJQiXrHTTu 2Uk/paOnT0EiCkqIhKNY6Dq8g7gMmHyVXFubJD6C0ZQKZg+4NU0J/J4HGn/Vt28UJC9a 8B6pzbWKa4l9zuXHmznJOhI50FLjohRlg1aHaGPw6Yn7VFbYVmxqpOldaqsiI3SLm4nE U9zP519P8hzdS43cWTXtOUIAHELCidCL09HZ+jnOdo1oWc8fh/9rzwtKb1Q2MNSu5DYe o+05SK3gkGQRPelQB6z1QBMa9i8N2y1B56WdHuZdDH6WZd2/aboSrXO7FIOeBRYCUfek yJuA== X-Received: by 10.50.114.228 with SMTP id jj4mr985708igb.65.1367387230148; Tue, 30 Apr 2013 22:47:10 -0700 (PDT) MIME-Version: 1.0 Received: by 10.64.53.232 with HTTP; Tue, 30 Apr 2013 22:46:50 -0700 (PDT) In-Reply-To: <1170189737.842896.1367321118558.JavaMail.root@basis06.ch> References: <92476162.842411.1367316398799.JavaMail.root@basis06.ch> <1170189737.842896.1367321118558.JavaMail.root@basis06.ch> From: Claus Ibsen Date: Wed, 1 May 2013 07:46:50 +0200 Message-ID: Subject: Re: NoSuchComponentException in CamelContext during Karaf Shutdown To: "users@camel.apache.org" Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Checked: Checked by ClamAV on apache.org Hi Yeah would assume depends-on attributes ought to tell blueprint in which order to shutdown its beans etc. Or somehow you can try to get as being the first "bean" blueprint should try to shutdown, as then Camel will complete all its inflight messages first, and hence the should be shutdown later. You can also enable cache on the bean endpoint to avoid the lookups And see if that helps. http://camel.apache.org/bean And when you see this error, does that only happen if the aggregator has messages that hasn't been fully aggregated, but are forced to be completed when stopping? eg this doesn't happen when stopping and the aggregator is empty? On Tue, Apr 30, 2013 at 1:25 PM, Tobias Hofer wrote: > Hi all, > > I'm running Camel 2.10.4 in Karaf 2.3.1 and get NoSuchComponentException > during the shutdown process. > > My blueprint configuration file declares a bean which is a Camel Processor > > > > The CamelContext contains a route that aggregates incoming messages and > which forces a completion on stop. > > > > forceCompletionOnStop="true" ...> > ... > > > > > The second route contains the bean invocation > > > > ... > > ... > > > During shutdown the bean invocation in the second route fails > > org.apache.camel.RuntimeCamelException: org.osgi.service.blueprint.container.NoSuchComponentException: No component with id > 'myBean' could be found > at org.apache.camel.util.ObjectHelper.wrapRuntimeCamelException(ObjectHelper.java:1316) > at org.apache.camel.impl.PropertyPlaceholderDelegateRegistry.lookup(PropertyPlaceholderDelegateRegistry.java:51) > at org.apache.camel.component.bean.RegistryBean.lookupBean(RegistryBean.java:136) > at org.apache.camel.component.bean.RegistryBean.getBean(RegistryBean.java:62) > at org.apache.camel.component.bean.BeanProcessor.process(BeanProcessor.java:77) > at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73) > ... > Caused by: org.osgi.service.blueprint.container.NoSuchComponentException: No component with id 'myBean' could be found > at org.apache.aries.blueprint.container.BlueprintContainerImpl.getComponentInstance(BlueprintContainerImpl.java:742) > at org.apache.camel.blueprint.BlueprintContainerRegistry.lookup(BlueprintContainerRegistry.java:41) > at org.apache.camel.impl.CompositeRegistry.lookup(CompositeRegistry.java:68) > at org.apache.camel.impl.PropertyPlaceholderDelegateRegistry.lookup(PropertyPlaceholderDelegateRegistry.java:49) > > I tried to add a 'depends-on' property on the CamelContext declaration but > this seems not to help. > > It looks like that the Blueprint Container is no longer available. > > Any suggestions? > > Regards, > Tobias Hofer > > > > > -- Claus Ibsen ----------------- Red Hat, Inc. FuseSource is now part of Red Hat Email: cibsen@redhat.com Web: http://fusesource.com Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen