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

Kafka karaf bundle points to incorrect scala version

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Won't Fix
    • Affects Version/s: 2.16.2
    • Fix Version/s: 2.16.3
    • Component/s: camel-kafka, karaf
    • Labels:
      None
    • Environment:

      karaf 4.0.4
      camel 2.16.2
      JDK 1.7

    • Estimated Complexity:
      Novice

      Description

      Hi

      I see there's a missalingment between the features dependencies and the pom of the camel-kafka component that makes impossible to run a Producer in karaf. I can see that in the features.xml

      <bundle dependency='true'>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.kafka-clients/${kafka-clients-bundle-version}</bundle>
          <bundle dependency='true'>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.kafka_2.10/${kafka-bundle-version}</bundle>
      

      It's trying to use 2.10 scala version, but in the pom.xml we point to 2.11 scala version

       <dependency>
            <groupId>org.apache.kafka</groupId>
            <artifactId>kafka_2.11</artifactId>
            <version>${kafka-version}</version>
            <exclusions>
              <exclusion>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-simple</artifactId>
              </exclusion>
                <exclusion>
                    <artifactId>scala-library</artifactId>
                    <groupId>org.scala-lang</groupId>
                </exclusion>
            </exclusions>
          </dependency>
      

      this causes some Class not found exceptions (funny some how) only in the producer, but the consumer is ok.

      org.apache.camel.FailedToCreateProducerException: Failed to create Producer for endpoint: Endpoint[kafka://.........].
      Reason: java.lang.ClassNotFoundException: kafka.serializer.DefaultEncoder
      
      karaf@root()> bundle:list  | grep kaf
      68 | Active |  50 | 2.16.2                                    | camel-kafka
      70 | Active |  50 | 0.8.2.2_1                                 | Apache ServiceMix :: Bundles :: kafka-clients
      71 | Active |  50 | 0.8.2.2_1                                 | Apache ServiceMix :: Bundles :: kafka_2.10
      

      I see this is already fix in master... so this should not apply to 2.17.0

        Attachments

          Activity

            People

            • Assignee:
              davsclaus Claus Ibsen
              Reporter:
              jlpedrosa Jose Luis Pedrosa

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment