Return-Path: X-Original-To: apmail-camel-issues-archive@minotaur.apache.org Delivered-To: apmail-camel-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 795A810F1D for ; Sat, 10 Jan 2015 18:20:33 +0000 (UTC) Received: (qmail 48752 invoked by uid 500); 10 Jan 2015 18:20:34 -0000 Delivered-To: apmail-camel-issues-archive@camel.apache.org Received: (qmail 48719 invoked by uid 500); 10 Jan 2015 18:20:34 -0000 Mailing-List: contact issues-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@camel.apache.org Delivered-To: mailing list issues@camel.apache.org Received: (qmail 48710 invoked by uid 99); 10 Jan 2015 18:20:34 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 10 Jan 2015 18:20:34 +0000 Date: Sat, 10 Jan 2015 18:20:34 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: issues@camel.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CAMEL-8194) Elasticsearch component fails in an OSGi environment due to missing names.txt MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CAMEL-8194?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14272632#comment-14272632 ] ASF GitHub Bot commented on CAMEL-8194: --------------------------------------- Github user dabdine-r7 closed the pull request at: https://github.com/apache/camel/pull/365 > Elasticsearch component fails in an OSGi environment due to missing names.txt > ----------------------------------------------------------------------------- > > Key: CAMEL-8194 > URL: https://issues.apache.org/jira/browse/CAMEL-8194 > Project: Camel > Issue Type: Bug > Components: camel-elasticsearch > Affects Versions: 2.14.1 > Reporter: Derek Abdine > Assignee: Willem Jiang > Fix For: 2.13.4, 2.14.2, 2.15.0 > > > {code} > 2014-12-29 22:25:12,667 | ERROR | FelixStartLevel | BlueprintCamelContext | 8 - org.apache.camel.camel-blueprint - 2.14.0 | Error occurred during starting Camel: CamelContext(elasticSearchProducerCamelContext) due Failed to create route log-event-sink-elasticsearch at: >>> Aggregate[true -> [To[log:xxx?level=INFO&groupInterval=2000], To[elasticsearch://elasticsearch?ip=127.0.0.1&port=9300]]] <<< in route: Route(log-event-sink-elasticsearch)[[From[vm:log-event-elast... because of Failed to resolve endpoint: elasticsearch://elasticsearch?ip=127.0.0.1&port=9300 due to: Failed to resolve config path [names.txt], tried file path [names.txt], path file [xxx/config/names.txt], and classpath > org.apache.camel.FailedToCreateRouteException: Failed to create route log-event-sink-elasticsearch at: >>> Aggregate[true -> [To[log:xxx?level=INFO&groupInterval=2000], To[elasticsearch://elasticsearch?ip=127.0.0.1&port=9300]]] <<< in route: Route(log-event-sink-elasticsearch)[[From[vm:log-event-elast... because of Failed to resolve endpoint: elasticsearch://elasticsearch?ip=127.0.0.1&port=9300 due to: Failed to resolve config path [names.txt], tried file path [names.txt], path file [xxx/config/names.txt], and classpath > at org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:945) > at org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:187) > ... > Caused by: org.elasticsearch.env.FailedToResolveConfigException: Failed to resolve config path [names.txt], tried file path [names.txt], path file [xxx/config/names.txt], and classpath > at org.elasticsearch.env.Environment.resolveConfig(Environment.java:213) > at org.elasticsearch.node.internal.InternalSettingsPreparer.prepareSettings(InternalSettingsPreparer.java:119) > ... > {code} > This can be fixed by adding a one-liner to explicitly set the classloader on the elasticsearch Settings class to the classloader of Settings.class: > {code} > Settings settings = ImmutableSettings.settingsBuilder() > ... > .classLoader(Settings.class.getClassLoader()); > ... > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)