Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-9439

Cannot use camel-geocoder in Karaf

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.16.1
    • 2.15.6, 2.16.2, 2.17.0
    • None
    • None
    • Karaf 3.0.x, Java 1.8

    • Unknown

    Description

      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:

      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
      

      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.

      Attachments

        Activity

          People

            acosentino Andrea Cosentino
            mattsicker Matt Sicker
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: