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 2FEE0174A5 for ; Fri, 17 Jul 2015 06:42:31 +0000 (UTC) Received: (qmail 49945 invoked by uid 500); 17 Jul 2015 06:42:31 -0000 Delivered-To: apmail-flink-user-archive@flink.apache.org Received: (qmail 49873 invoked by uid 500); 17 Jul 2015 06:42:31 -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 49864 invoked by uid 99); 17 Jul 2015 06:42:31 -0000 Received: from mail-relay.apache.org (HELO mail-relay.apache.org) (140.211.11.15) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 17 Jul 2015 06:42:31 +0000 Received: from mail-wg0-f50.google.com (mail-wg0-f50.google.com [74.125.82.50]) by mail-relay.apache.org (ASF Mail Server at mail-relay.apache.org) with ESMTPSA id 91DC71A0149 for ; Fri, 17 Jul 2015 06:42:30 +0000 (UTC) Received: by wgxm20 with SMTP id m20so74575969wgx.3 for ; Thu, 16 Jul 2015 23:42:29 -0700 (PDT) X-Received: by 10.194.89.5 with SMTP id bk5mr27138385wjb.144.1437115349028; Thu, 16 Jul 2015 23:42:29 -0700 (PDT) MIME-Version: 1.0 References: <1437007534705-2069.post@n4.nabble.com> <1437021397580-2071.post@n4.nabble.com> <1437068255679-2109.post@n4.nabble.com> <1437073496755-2112.post@n4.nabble.com> In-Reply-To: <1437073496755-2112.post@n4.nabble.com> From: Aljoscha Krettek Date: Fri, 17 Jul 2015 06:42:19 +0000 Message-ID: Subject: Re: Flink Kafka example in Scala To: user@flink.apache.org Content-Type: multipart/alternative; boundary=089e010d8400e157b6051b0c7d9d --089e010d8400e157b6051b0c7d9d Content-Type: text/plain; charset=UTF-8 Hi, this looks like the flink-connector-kafka jar is not available where the job is running? Did you put it in the library folder of flink on all the machines or did you submit it with the job? On Thu, Jul 16, 2015, 21:05 Wendong wrote: > Hi Gyula, > > Cool. I removed .print and the error was gone. > > However, env.execute failed with errors: > > ......... > Caused by: java.lang.Exception: Call to registerInputOutput() of invokable > failed > at org.apache.flink.runtime.taskmanager.Task.run(Task.java:504) > ....... > Caused by: org.apache.flink.streaming.runtime.tasks.StreamTaskException: > Cannot instantiate user function. > at > > org.apache.flink.streaming.api.graph.StreamConfig.getStreamOperator(StreamConfig.java:185) > ....... > Caused by: java.lang.ClassNotFoundException: > org.apache.flink.streaming.connectors.kafka.api.KafkaSink > at java.net.URLClassLoader$1.run(URLClassLoader.java:366) > > > In the following code: > > val stream = env > .addSource(new KafkaSource[String]("localhost:2181", "test", new > SimpleStringSchema)) > .addSink(new KafkaSink[String]("localhost:2181", "test", new > SimpleStringSchema)) > > Anything wrong? I already did "import > org.apache.flink.streaming.connectors.kafka.api._". Class > SimpleStringSchema > was modified (see previous post). > > Thanks, > > Wendong > > > > -- > View this message in context: > http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/Flink-Kafka-example-in-Scala-tp2069p2112.html > Sent from the Apache Flink User Mailing List archive. mailing list archive > at Nabble.com. > --089e010d8400e157b6051b0c7d9d Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

Hi, this looks like the flink-connector-kafka jar is not ava= ilable where the job is running? Did you put it in the library folder of fl= ink on all the machines or did you submit it with the job?


On Thu, Jul 16, 2015, 21:05= =C2=A0Wendong <wendong.zhu@gmai= l.com> wrote:
Hi Gyula,

Cool. I removed .print and the error was gone.

However, env.execute failed with errors:

.........
Caused by: java.lang.Exception: Call to registerInputOutput() of invokable<= br> failed
=C2=A0 =C2=A0 =C2=A0 =C2=A0 at org.apache.flink.runtime.taskmanager.Task.ru= n(Task.java:504)
.......
Caused by: org.apache.flink.streaming.runtime.tasks.StreamTaskException: Cannot instantiate user function.
=C2=A0 =C2=A0 =C2=A0 =C2=A0 at
org.apache.flink.streaming.api.graph.StreamConfig.getStreamOperator(StreamC= onfig.java:185)
.......
Caused by: java.lang.ClassNotFoundException:
org.apache.flink.streaming.connectors.kafka.api.KafkaSink
=C2=A0 =C2=A0 =C2=A0 =C2=A0 at java.net.URLClassLoader$1.run(URLClassLoader= .java:366)


In the following code:

=C2=A0 =C2=A0 val stream =3D env
=C2=A0 =C2=A0 =C2=A0 .addSource(new KafkaSource[String]("localhost:218= 1", "test", new
SimpleStringSchema))
=C2=A0 =C2=A0 =C2=A0 .addSink(new KafkaSink[String]("localhost:2181&qu= ot;, "test", new
SimpleStringSchema))

Anything wrong? I already did=C2=A0 "import
org.apache.flink.streaming.connectors.kafka.api._". Class SimpleString= Schema
was modified (see previous post).

Thanks,

Wendong



--
View this message in context: http://apache-flink-user-mailing= -list-archive.2336050.n4.nabble.com/Flink-Kafka-example-in-Scala-tp2069p211= 2.html
Sent from the Apache Flink User Mailing List archive. mailing list archive = at Nabble.com.
--089e010d8400e157b6051b0c7d9d--