Return-Path: X-Original-To: apmail-flink-user-archive@minotaur.apache.org Delivered-To: apmail-flink-user-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id EAD3C18A39 for ; Mon, 18 Apr 2016 13:56:19 +0000 (UTC) Received: (qmail 75660 invoked by uid 500); 18 Apr 2016 13:56:19 -0000 Delivered-To: apmail-flink-user-archive@flink.apache.org Received: (qmail 75559 invoked by uid 500); 18 Apr 2016 13:56:19 -0000 Mailing-List: contact user-help@flink.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@flink.apache.org Delivered-To: mailing list user@flink.apache.org Received: (qmail 75549 invoked by uid 99); 18 Apr 2016 13:56:19 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 18 Apr 2016 13:56:19 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 63E051A04E4 for ; Mon, 18 Apr 2016 13:56:19 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.198 X-Spam-Level: * X-Spam-Status: No, score=1.198 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd2-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id PevoAgOwMTzA for ; Mon, 18 Apr 2016 13:56:17 +0000 (UTC) Received: from mail-ob0-f176.google.com (mail-ob0-f176.google.com [209.85.214.176]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id 188DB5FB2B for ; Mon, 18 Apr 2016 13:56:17 +0000 (UTC) Received: by mail-ob0-f176.google.com with SMTP id n10so34049806obb.2 for ; Mon, 18 Apr 2016 06:56:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to; bh=3MC/Yi6ieMpRJQ3kub8HQaPimxkN/lyh5FX0tzLCQpk=; b=vLXXQ1o1ym0G0KnlEcuRIcSa41ZBQSYZztxnLPnSy3OpHVmVL7IM6KyV1SJ1Dh+iw+ +A6yhmbDT1KlBlJldMToNW0IK+ALNxEpjzH5ULZcaDSqBYii/ut9KSBuWL1kXZkr2FLA kUaJU3MufApjCdoCTfRxtofBZie/Fjx0IvnUO1vHdVPQrX5+SdXS9Y4/sBUR6d8ddD3L k0rdZ+fq1tQS4poZ5BjcZgzlJazVX0AIHKxubNjTHVrxVyj5AZ9fTOCNFggz985VurMa P+OXX90OTJwHFplbuvlZvvI+8UbJmk74gPn0eSwyk07vh0Pih/Qe0NCNbQiXThQOcvRP dI0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to; bh=3MC/Yi6ieMpRJQ3kub8HQaPimxkN/lyh5FX0tzLCQpk=; b=CogVKTulg7xvP1X4lyZxf0zwVYuuxOAyGKr1ZFvsDYug7LjkBU/spJUcjivKSsX3Ek rXddyPtWQj+GxqsG0KD8jU3pI6JuY28Ntv1EooIGnPk6QvpIco5vffk4niMkhQp92Qrg OmhHy0wPJ6sRZg2/Ks4a9qHwLxOZtYzSbwCgVeKWqrC0F9ESNscyC54VWOfNV7wq4Jf2 HV3EFZ6ruY+q/vYNy8QDbg+8nQcAp+TP1OmrG3f2C1jnVOVSm+shImKEpwNTiyiXVWa2 TXKzd/64BPy8aD5Kp+cdI/ZMR1NjAxyDUg8oZ62DwFqDvM/g8oi27zCmLefcIp/yRpge Tzsw== X-Gm-Message-State: AOPr4FXfX+0KNSrFqHNuHVJ2BVcOUVS3T4Sx8Q/SK9tYNhAH48Oad0wE4bTIFS0JLyuNgBLi/9ygpwJchHYkXg== MIME-Version: 1.0 X-Received: by 10.60.60.201 with SMTP id j9mr16402043oer.50.1460987776351; Mon, 18 Apr 2016 06:56:16 -0700 (PDT) Received: by 10.202.96.135 with HTTP; Mon, 18 Apr 2016 06:56:16 -0700 (PDT) In-Reply-To: References: Date: Mon, 18 Apr 2016 15:56:16 +0200 Message-ID: Subject: Re: Flink 0.10.2 and Kafka 0.8.1 From: Robert Schmidtke To: user@flink.apache.org Content-Type: multipart/alternative; boundary=089e01538c546e49d50530c2b984 --089e01538c546e49d50530c2b984 Content-Type: text/plain; charset=UTF-8 Hi Robert, thanks for your hints. I was not sure whether I was building a proper fat jar, as I have not used the Flink Archetype for my project. However, I have set up a sample project at https://github.com/robert-schmidtke/flink-test/ which is nothing more than the Quickstart Archetype plus the instructions to bundle the Kafka dependencies. The resulting jars (mvn clean package -Pbuild-jar and mvn clean package) do not contain the org/apache/kafka/** classes. Can you have a quick look at the pom? However, as I said, it's verbatim Archetype+Flink Docs. Thanks a lot in advance! Robert On Mon, Apr 18, 2016 at 12:36 PM, Robert Metzger wrote: > Hi, > did you check your user jar if it contains the Kafka classes? > Are you building a fat jar? Are you manually excluding any dependencies? > > Flink's 0.10.2 Kafka connector depends on Kafka 0.8.2.0 [1] which in turn > depends on kafka-clients 0.8.2.0 [2]. And the "kafka-clients" dependency > also contains the org.apache.kafka.common.Node class (the LegacyFetcher > needs that class). > > > [1] > https://repo1.maven.org/maven2/org/apache/flink/flink-connector-kafka/0.10.2/flink-connector-kafka-0.10.2.pom > [2] > https://repo1.maven.org/maven2/org/apache/kafka/kafka_2.10/0.8.2.0/kafka_2.10-0.8.2.0.pom > > On Mon, Apr 18, 2016 at 7:42 AM, Balaji Rajagopalan < > balaji.rajagopalan@olacabs.com> wrote: > >> I had fought with 0.8.0.2 kafka and flink 0.10.2 scala version 2.11, was >> never able to get it working confounded with noclassdeffounderror, moved to >> flink 1.0.0 with kafka 0.8.0.2 scala version 2.11 things worked for me, if >> moving to flink 1.0.0 is an option for you do so. >> >> balaji >> >> On Mon, Apr 18, 2016 at 3:19 AM, Robert Schmidtke > > wrote: >> >>> Hi everyone, >>> >>> I have a Kafka cluster running on version 0.8.1, hence I'm using the >>> FlinkKafkaConsumer081. When running my program, I saw a >>> NoClassDefFoundError for org.apache.kafka.common.Node. So I packaged my >>> binaries according to >>> https://ci.apache.org/projects/flink/flink-docs-release-0.10/apis/cluster_execution.html#linking-with-modules-not-contained-in-the-binary-distribution, >>> however I'm still seeing the error. >>> >>> I played around a bit and it turns out I have to package kafka-clients >>> v. 0.8.2.0 instead of kafka_2.10 v. 0.8.1 with my program. Is there an >>> error in the documentation or have I not figured out something properly? >>> >>> Thanks! >>> Robert >>> >>> -- >>> My GPG Key ID: 336E2680 >>> >> >> > -- My GPG Key ID: 336E2680 --089e01538c546e49d50530c2b984 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi Robert,

thanks for your h= ints. I was not sure whether I was building a proper fat jar, as I have not= used the Flink Archetype for my project. However, I have set up a sample p= roject at

https://github.com/robert-schmidtke/flink-test/

which is nothing more than the Quickstart Archetype p= lus the instructions to bundle the Kafka dependencies. The resulting jars (= mvn clean package -Pbuild-jar and mvn clean package) do not contain the org= /apache/kafka/** classes. Can you have a quick look at the pom? However, as= I said, it's verbatim Archetype+Flink Docs.

T= hanks a lot in advance!

Robert



On Mon, Apr 18, 2016 at 12:36 PM, Robert Metzger <rmetzger@apa= che.org> wrote:
Hi,
= did you check your user jar if it contains the Kafka classes?
Are= you building a fat jar? Are you manually excluding any dependencies?
=

Flink's 0.10.2 Kafka connector depends on Kafka 0.8.2.0 = [1] which in turn depends on kafka-clients 0.8.2.0 [2]. And the "kafka= -clients" dependency also contains the org.apache.kafka.common.Node cl= ass (the LegacyFetcher needs that class).

On Mon, Apr 18, 2016 at 7:42 AM, Balaji Rajagopalan <= ;balaji= .rajagopalan@olacabs.com> wrote:
I had fought with 0.8.0.2 kafka and flink 0.10.2 scala version 2.1= 1, was never able to get it working confounded with noclassdeffounderror, m= oved to flink 1.0.0 with kafka 0.8.0.2 =C2=A0scala version 2.11 things work= ed for me, if moving to flink 1.0.0 is an option for you do so.=C2=A0=

balaji=C2=A0

= On Mon, Apr 18, 2016 at 3:19 AM, Robert Schmidtke <ro.schmidtke@gmail= .com> wrote:
Hi everyone= ,

I have a Kafka cluster running on version 0.8.1, hence= I'm using the FlinkKafkaConsumer081. When running my program, I saw a = NoClassDefFoundError for org.apache.kafka.common.Node. So I packaged my bin= aries according to=C2=A0https://ci.apache.or= g/projects/flink/flink-docs-release-0.10/apis/cluster_execution.html#linkin= g-with-modules-not-contained-in-the-binary-distribution, however I'= m still seeing the error.

I played around a bit an= d it turns out I have to package kafka-clients v. 0.8.2.0 instead of kafka_= 2.10 v. 0.8.1 with my program. Is there an error in the documentation or ha= ve I not figured out something properly?

Thanks!
Robert

-- <= br>
My GPG Key ID: 336E2680





--
=
My GPG Key ID: 336E2680
=
--089e01538c546e49d50530c2b984--