Return-Path: X-Original-To: apmail-kafka-users-archive@www.apache.org Delivered-To: apmail-kafka-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 6D258F6AC for ; Thu, 4 Apr 2013 15:42:11 +0000 (UTC) Received: (qmail 12314 invoked by uid 500); 4 Apr 2013 15:42:11 -0000 Delivered-To: apmail-kafka-users-archive@kafka.apache.org Received: (qmail 12225 invoked by uid 500); 4 Apr 2013 15:42:10 -0000 Mailing-List: contact users-help@kafka.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@kafka.apache.org Delivered-To: mailing list users@kafka.apache.org Received: (qmail 12209 invoked by uid 99); 4 Apr 2013 15:42:10 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 04 Apr 2013 15:42:10 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,NORMAL_HTTP_TO_IP,RCVD_IN_DNSWL_LOW,SPF_PASS,WEIRD_PORT X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of oruchovets@gmail.com designates 209.85.223.179 as permitted sender) Received: from [209.85.223.179] (HELO mail-ie0-f179.google.com) (209.85.223.179) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 04 Apr 2013 15:42:05 +0000 Received: by mail-ie0-f179.google.com with SMTP id k11so3183616iea.10 for ; Thu, 04 Apr 2013 08:41:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:date:message-id:subject:from:to :content-type; bh=wJj6yqemeYSP4W2UixScTYySyPG0XaQ/2nkm4j2Rax4=; b=QvZm0e312UaMORGfUhFrxHvy0zf7AOF7tcj/to8IiXV1qBCf8rq33n8iyOO8TcPFL7 wW5tqm8TiIUyOtyVnDJzBTkpp4NgZsF18iJ3aZY7fV91IT5pLJOmA+ZyUFbNaqk1pS07 oyBRPLp7e2RDZUciq0R2rej+Ta3g5KzEueU1CVTGdcZWU/XWmBSEAoRSHXvxyGl1STDr mBbzCCP+t3L9r31U/Z+pjvS2+lo/eektyd7nMWFtFBXTzEpqPrwpLfvkwbmv+psxxfM6 7eKD+WPYSiU81oyWVEuik4EpwRirGy6C2QAuafaPIHAGEUQnWHPg6Y3JsQm9L74Wn2m5 /qrA== MIME-Version: 1.0 X-Received: by 10.50.49.83 with SMTP id s19mr4215236ign.47.1365090105068; Thu, 04 Apr 2013 08:41:45 -0700 (PDT) Received: by 10.64.70.138 with HTTP; Thu, 4 Apr 2013 08:41:45 -0700 (PDT) Date: Thu, 4 Apr 2013 18:41:45 +0300 Message-ID: Subject: Got exception executing Kafka Producer. From: Oleg Ruchovets To: users@kafka.apache.org Content-Type: multipart/alternative; boundary=047d7bdc0858ccdff904d98ace0d X-Virus-Checked: Checked by ClamAV on apache.org --047d7bdc0858ccdff904d98ace0d Content-Type: text/plain; charset=ISO-8859-1 I am executing a simple code like this: public class FirstKafkaTester { public Producer initProducer(){ Properties props = new Properties(); props.put("zk.connect", "127.0.0.1:2181"); props.put("broker.list", "localhost:9092"); props.put("serializer.class", "kafka.serializer.StringEncoder"); return new Producer(new ProducerConfig(props)); } public void executeProducer(String topic){ int messageNo = 1; Producer producer = initProducer(); String messageStr = new String("Message_" + messageNo); producer.send(new KeyedMessage(topic, messageStr)); } public static void main(String[] args) { FirstKafkaTester firstKafkaTester = new FirstKafkaTester(); firstKafkaTester.executeProducer("topic_1"); } } I use Kafka 0.8. I put manually to the maven in my local repository and add dependency of yammer com.yammer.metrics metrics-core 2.2.0 I got this exception: 2013-04-04 11:09:56,909 WARN async.DefaultEventHandler (Logging.scala:warn(89)) - Failed to send producer request with correlation id 2 to broker 3 with data for partitions [topic_1,0] java.lang.NoSuchMethodError: com.yammer.metrics.core.TimerContext.stop()J at kafka.metrics.KafkaTimer.time(KafkaTimer.scala:36) at kafka.producer.SyncProducer.send(SyncProducer.scala:100) at kafka.producer.async.DefaultEventHandler.kafka$producer$async$DefaultEventHandler$$send(DefaultEventHandler.scala:243) at kafka.producer.async.DefaultEventHandler$$anonfun$dispatchSerializedData$1.apply(DefaultEventHandler.scala:105) at kafka.producer.async.DefaultEventHandler$$anonfun$dispatchSerializedData$1.apply(DefaultEventHandler.scala:99) at scala.collection.mutable.HashMap$$anonfun$foreach$1.apply(HashMap.scala:80) at scala.collection.mutable.HashMap$$anonfun$foreach$1.apply(HashMap.scala:80) at scala.collection.Iterator$class.foreach(Iterator.scala:631) at scala.collection.mutable.HashTable$$anon$1.foreach(HashTable.scala:161) at scala.collection.mutable.HashTable$class.foreachEntry(HashTable.scala:194) at scala.collection.mutable.HashMap.foreachEntry(HashMap.scala:39) at scala.collection.mutable.HashMap.foreach(HashMap.scala:80) at kafka.producer.async.DefaultEventHandler.dispatchSerializedData(DefaultEventHandler.scala:99) at kafka.producer.async.DefaultEventHandler.handle(DefaultEventHandler.scala:72) at kafka.producer.Producer.send(Producer.scala:74) at kafka.javaapi.producer.Producer.send(Producer.scala:32) at kafka_eval.FirstKafkaTester.executeProducer(FirstKafkaTester.java:26) at kafka_eval.FirstKafkaTester.main(FirstKafkaTester.java:34) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120) Is this something wrong that I am doing? What should I do to resolve the issue. Thanks Oleg. --047d7bdc0858ccdff904d98ace0d--