You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@kafka.apache.org by Jiabin Hu <ji...@yahoo-inc.com> on 2012/06/14 01:07:15 UTC

NoSuchMethodError when running example code in 0.70

Hi!

I'm trying to run the example code in 0.70, but the constructor of kafka.producer.ProducerConfig throws the following exception:

Exception in thread "main" java.lang.NoSuchMethodError: scala.Tuple2._1$mcI$sp()I
at kafka.utils.Utils$.getIntInRange(Utils.scala:192)
at kafka.utils.Utils$.getInt(Utils.scala:174)
at kafka.utils.ZKConfig.<init>(ZkUtils.scala:274)
at kafka.producer.ProducerConfig.<init>(ProducerConfig.scala:25)
at kafka.examples.Producer.<init>(Producer.java:35)
at kafka.examples.SimpleConsumerDemo.generateData(SimpleConsumerDemo.java:43)
at kafka.examples.SimpleConsumerDemo.main(SimpleConsumerDemo.java:60)

Anyone has an idea why this happens?

Thanks,
Jiabin

Re: NoSuchMethodError when running example code in 0.70

Posted by Jun Rao <ju...@gmail.com>.
Seems like a scala version issue. Are you using scala 2.8 jar?

Thanks,

Jun

On Wed, Jun 13, 2012 at 4:07 PM, Jiabin Hu <ji...@yahoo-inc.com> wrote:

> Hi!
>
> I'm trying to run the example code in 0.70, but the constructor of
> kafka.producer.ProducerConfig throws the following exception:
>
> Exception in thread "main" java.lang.NoSuchMethodError:
> scala.Tuple2._1$mcI$sp()I
> at kafka.utils.Utils$.getIntInRange(Utils.scala:192)
> at kafka.utils.Utils$.getInt(Utils.scala:174)
> at kafka.utils.ZKConfig.<init>(ZkUtils.scala:274)
> at kafka.producer.ProducerConfig.<init>(ProducerConfig.scala:25)
> at kafka.examples.Producer.<init>(Producer.java:35)
> at
> kafka.examples.SimpleConsumerDemo.generateData(SimpleConsumerDemo.java:43)
> at kafka.examples.SimpleConsumerDemo.main(SimpleConsumerDemo.java:60)
>
> Anyone has an idea why this happens?
>
> Thanks,
> Jiabin
>