[
https://issues.apache.org/jira/browse/CAMEL-9439?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15069601#comment-15069601
]
Andrea Cosentino commented on CAMEL-9439:
-----------------------------------------
I've tested with this little example:
https://github.com/oscerd/camel-geocoder-example
> Cannot use camel-geocoder in Karaf
> ----------------------------------
>
> Key: CAMEL-9439
> URL: https://issues.apache.org/jira/browse/CAMEL-9439
> Project: Camel
> Issue Type: Bug
> Affects Versions: 2.16.1
> Environment: Karaf 3.0.x, Java 1.8
> Reporter: Matt Sicker
> Assignee: Andrea Cosentino
> Fix For: 2.15.6, 2.16.2, 2.17.0
>
>
> From a fresh install of Karaf, I add the Camel feature repository and run
> feature:install camel-geocoder. Using a basic geocoder endpoint, I get the
> following exception:
> {code}
> java.lang.NoClassDefFoundError: com/google/gson/GsonBuilder
> at com.google.code.geocoder.Geocoder.geocode(Geocoder.java:56)
> at
> org.apache.camel.component.geocoder.GeoCoderProducer.process(GeoCoderProducer.java:89)
> at
> org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:61)
> ... 23 more
> {code}
> This appears to be caused by the feature
> "wrap:mvn:com.google.code.geocoder-java/geocoder-java/0.16" which uses
> optional for all its import packages which is incorrect as it appears to
> require gson (amongst other things).
> A quick fix was to also install camel-gson, but this should be handled
> transitively.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)