Return-Path: X-Original-To: apmail-karaf-issues-archive@minotaur.apache.org Delivered-To: apmail-karaf-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id E8EE010C06 for ; Thu, 13 Jun 2013 12:01:27 +0000 (UTC) Received: (qmail 31823 invoked by uid 500); 13 Jun 2013 12:01:27 -0000 Delivered-To: apmail-karaf-issues-archive@karaf.apache.org Received: (qmail 31126 invoked by uid 500); 13 Jun 2013 12:01:24 -0000 Mailing-List: contact issues-help@karaf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@karaf.apache.org Delivered-To: mailing list issues@karaf.apache.org Received: (qmail 31067 invoked by uid 99); 13 Jun 2013 12:01:23 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 13 Jun 2013 12:01:23 +0000 Date: Thu, 13 Jun 2013 12:01:23 +0000 (UTC) From: =?utf-8?Q?Jean-Baptiste_Onofr=C3=A9_=28JIRA=29?= To: issues@karaf.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Assigned] (KARAF-2359) DirectoryWatcher for "deploy" directory should be configured to wait until framework start level reaches 60 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/KARAF-2359?page=3Dcom.atlassia= n.jira.plugin.system.issuetabpanels:all-tabpanel ] Jean-Baptiste Onofr=C3=A9 reassigned KARAF-2359: ------------------------------------------- Assignee: Jean-Baptiste Onofr=C3=A9 =20 > DirectoryWatcher for "deploy" directory should be configured to wait unti= l framework start level reaches 60 > -------------------------------------------------------------------------= ---------------------------------- > > Key: KARAF-2359 > URL: https://issues.apache.org/jira/browse/KARAF-2359 > Project: Karaf > Issue Type: Bug > Components: karaf-config > Affects Versions: 2.2.11 > Environment: ServiceMix 4.4.2 and 4.5.1 > Reporter: metatech > Assignee: Jean-Baptiste Onofr=C3=A9 > > Problem : > By default, the DirectoryWatcher of Felix scans for new files very early = in the start process. If a new application bundle is added to the "deploy"= directory, it might be detected and started while the framework start leve= l is still at 30, although the application bundle start should be postponed= until level 60 is reached. =20 > If not, a typical problem will be that Camel-core is deployed after the a= pplication bundle, thereby not using the OSGi-aware CamelContext, causing s= ome Camel components not to be found, with errors such as the following := =20 > Caused by: org.apache.camel.ResolveEndpointFailedException: Failed to res= olve endpoint: sql://SELECT 1 from DUAL?dataSourceRef=3DmyDS due to: No com= ponent found with scheme: sql > A hint to the root cause of the problem can be found in the logs : > CamelNamespaceHandler | OSGi environment not detected. > By default, the property "felix.fileinstall.start.level" in file "org.apa= che.felix.fileinstall-deploy.cfg" is unconfigured, resulting in the default= "0" level being used. Although this means that the new bundle's start lev= el will be configured at level 60 (as configured in the "karaf.startlevel.b= undle" property), another unwanted side effect is also observed : there is = no wait in method "DirectoryWatcher:run()". > Solutions : > To avoid such race conditions between the starting of Camel-core bundle a= nd an application bundle, it would be safer to explicitly configure the pro= perty "felix.fileinstall.start.level" to 60 in Felix 3.1.x, or property "fe= lix.fileinstall.active.level" to 60 in Felix 3.2.x, or change the code of D= irectoryWatcher to retrieve the default start level, in case it is unspecif= ied in the properties. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrato= rs For more information on JIRA, see: http://www.atlassian.com/software/jira