Why camel-elasticsearch component fails in an OSGi environment due to missing names.txt ?
Environment
- Red Hat JBoss Fuse
- 6.1.0
Issue
- User use the component
camel-elasticsearch. - User found the following error
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)
- After searching on
camelJIRA, user found the following ticket : https://issues.apache.org/jira/browse/CAMEL-8194. - This
JIRAis fixed withcamelversions2.13.4,2.14.2,2.15.0. - How this problem can be resolved in
Red Hat JBoss Fuse V6.1?
Resolution
- Currently this fix is not applied to
Red Hat JBoss Fuse 6.1.0, hence a patch request is raised https://issues.jboss.org/browse/ENTESB-3322. - Currently this fix is scheduled to release with
R2P5patch. - There is alternative solution as well where user can place
names.txtwithin location${karaf.home}/config. User has to manually createconfigfolder withinRed Hat JBoss Fuseinstallation folder. For this solutionnames.txt.zipis attached, user should extract this zip and placenames.txtfile within config folder. - If following above solutions user face another error as below
Caused by: java.lang.NoClassDefFoundError: org/tartarus/snowball/SnowballProgram
at org.elasticsearch.indices.analysis.IndicesAnalysisService.<init>(IndicesAnalysisService.java:126)
at sun.reflect.GeneratedConstructorAccessor44.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
- Than user can refer https://access.redhat.com/solutions/1465223.
Attachments
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
