camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CAMEL-8194) Elasticsearch component fails in an OSGi environment due to missing names.txt
Date Sat, 10 Jan 2015 18:20:34 GMT

    [ 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)

Mime
View raw message