4

I am getting error java.lang.ClassNotFoundException kafka.api.OffsetRequest while trying integrate Kafka to our Storm topology. What versions you are running and it is working? My pom.xml

  <dependency>
        <groupId>org.apache.storm</groupId>
        <artifactId>storm-core</artifactId>
        <version>0.9.2-incubating</version>
        <scope>provided</scope>
    </dependency>

    <dependency>
        <groupId>org.apache.storm</groupId>
        <artifactId>storm-kafka</artifactId>
        <version>0.9.2-incubating</version>
    </dependency>
Matthias J. Sax
  • 59,682
  • 7
  • 117
  • 137
Babu
  • 4,324
  • 6
  • 41
  • 60

2 Answers2

2

Finally I solved it by implementing my own Kafka SPOUT (reusing example code) with this dependencies:

    <dependency>
        <groupId>org.apache.storm</groupId>
        <artifactId>storm-core</artifactId>
        <version>0.9.4</version>
    </dependency>
    <dependency>
        <groupId>org.apache.kafka</groupId>
        <artifactId>kafka_2.9.2</artifactId>
        <version>0.8.1.1</version>
        <scope>compile</scope>
        <exclusions>
            <exclusion>
                <artifactId>jmxri</artifactId>
                <groupId>com.sun.jmx</groupId>
            </exclusion>
            <exclusion>
                <artifactId>jms</artifactId>
                <groupId>javax.jms</groupId>
            </exclusion>
            <exclusion>
                <artifactId>jmxtools</artifactId>
                <groupId>com.sun.jdmk</groupId>
            </exclusion>
        </exclusions>
    </dependency>
Babu
  • 4,324
  • 6
  • 41
  • 60
0

I can successfully use kafka.api.OffsetRequest with the following sample topology (KafkaSpoutTestTopology) in a Docker cluster: https://github.com/wurstmeister/storm-kafka-0.8-plus-test The topology uses storm-kafka version 0.9.3. Note: "fig" command is replaced with "docker-compose" command.

EarliestTime() and LatestTime() method work fine.

tasasaki
  • 695
  • 5
  • 12