The file should be your Scala jar. You should have it in your Kafka lib directory. Do a "jar -t" to make sure it actually contains the Tuple class.
Gwen On Fri, Oct 31, 2014 at 8:49 PM, Tomas Nunez <nu...@pythian.com> wrote: > Thanks for pointing the error. I fixed it, but I'm still getting the same > error. The content of migrationToolProducer.properties is now: > _____ > > metadata.broker.list=kafka_new01:9092,kafka_new02:9092,kafka_new03:9092,kafka_new04:9092,kafka_new05:9092, > group.id=migration.prod > _____ > > And the error still is: > > Exception in thread "main" java.lang.NoClassDefFoundError: > scala/Tuple2$mcLL$sp > at kafka.utils.Utils.stackTrace(Utils.scala) > at kafka.tools.KafkaMigrationTool.main(KafkaMigrationTool.java:268) > Caused by: java.lang.ClassNotFoundException: scala.Tuple2$mcLL$sp > at java.net.URLClassLoader$1.run(URLClassLoader.java:366) > at java.net.URLClassLoader$1.run(URLClassLoader.java:355) > at java.security.AccessController.doPrivileged(Native Method) > at java.net.URLClassLoader.findClass(URLClassLoader.java:354) > at java.lang.ClassLoader.loadClass(ClassLoader.java:425) > at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308) > at java.lang.ClassLoader.loadClass(ClassLoader.java:358) > ... 2 more > > I have no "Tuple2*" file anywhere in the server. I'm following > https://cwiki.apache.org/confluence/display/KAFKA/Migrating+from+0.7+to+0.8 > and I can't see there anything about downloading classes, and I don't find > much people with the same problem, which leads me to think that I'm doing > something wrong... > > Any idea on what to try? > > Thanks! > > PD: Of course, I'll tell Alex you say hi :) > > On Sat, Nov 1, 2014 at 4:32 AM, Gwen Shapira <gshap...@cloudera.com> > wrote: > > > This is part of Scala, so it should be in the scala-library-...jar > > > > > > On Fri, Oct 31, 2014 at 8:26 PM, Tomas Nunez <nu...@pythian.com> wrote: > > > > > Well... I used strace and I found it was looking for some classes in a > > > wrong path. I fixed most of them, but there's one that isn't anywhere, > > > neither the new nor the old kafka servers: > > > > > > $ strace -o logfile -s 1000 -f kafka/bin/kafka-run-class.sh > > > kafka.tools.KafkaMigrationTool --kafka.07.jar > > > migration-tool/kafka-0.7.2.jar --zkclient.01.jar > > > migration-tool/zkclient-0.1.jar > > > --consumer.config=kafka/config/migrationToolConsumer.properties > > > -producer.config=kafka/config/migrationToolProducer.properties > > > --whitelist=.* > > > Exception in thread "main" java.lang.NoClassDefFoundError: > > > scala/Tuple2$mcLL$sp > > > at kafka.utils.Utils.stackTrace(Utils.scala) > > > at > > kafka.tools.KafkaMigrationTool.main(KafkaMigrationTool.java:268) > > > Caused by: java.lang.ClassNotFoundException: scala.Tuple2$mcLL$sp > > > at java.net.URLClassLoader$1.run(URLClassLoader.java:366) > > > at java.net.URLClassLoader$1.run(URLClassLoader.java:355) > > > at java.security.AccessController.doPrivileged(Native Method) > > > at java.net.URLClassLoader.findClass(URLClassLoader.java:354) > > > at java.lang.ClassLoader.loadClass(ClassLoader.java:425) > > > at > sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308) > > > at java.lang.ClassLoader.loadClass(ClassLoader.java:358) > > > ... 2 more > > > > > > $ grep ENOENT logfile|tail -1 > > > 16484 > > > > > > > > > stat("migration-tool/kafka07/core/target/scala_2.8.0/classes/scala/Tuple2$mcLL$sp.class", > > > 0x7f59b27f4950) = -1 ENOENT (No such file or directory) > > > > > > I saw someone had a similar problem in this list, but it's not clear > (at > > > least to me) how it was fixed in the end > > > > > > > > > http://mail-archives.apache.org/mod_mbox/kafka-dev/201302.mbox/%3CCANEBM33rMTZ2UGp2dpaFj8xV=n4=rr9gp3six0sko++nhqv...@mail.gmail.com%3E > > > > > > The JIRA ticket is still untouched > > > https://issues.apache.org/jira/browse/KAFKA-760 > > > > > > May different versions of scala be the cause of this error? I just used > > > "./sbt update" to make sure... > > > > > > If not, where should I find that class file? > > > > > > Thanks again! > > > > > > On Sat, Nov 1, 2014 at 4:05 AM, Tomas Nunez <nu...@pythian.com> wrote: > > > > > > > Hi > > > > > > > > I'm trying to upgrade a 0.7 kafka cluster, but I'm getting an error: > > > > > > > > I created the file migrationToolConsumer.properties with just theinfo > > to > > > > connect to the old cluster: > > > > _____ > > > > zookeeper.connect=zookeeper01:2181,zookeeper02:2181,zookeeper03:2181 > > > > group.id=migration.prod > > > > ______ > > > > > > > > > > > > Then the producer file > > > > _______ > > > > > > > > > > > > > > zookeeper.connect=zookeeper01_new:2181,zookeeper02_new:2181,zookeeper03_new:2181 > > > > group.id=migration.prod > > > > _______ > > > > > > > > And then I called the migrationtool, and get this error > > > > > > > > ______________ > > > > $ kafka/bin/kafka-run-class.sh kafka.tools.KafkaMigrationTool > > > > --kafka.07.jar migration-tool/kafka-0.7.2.jar --zkclient.01.jar > > > > migration-tool/zkclient-0.1.jar --num.producers 4 > > > > --consumer.config=kafka/config/migrationToolConsumer.properties > > > > -producer.config=kafka/config/migrationToolProducer.properties > > > > --whitelist=.* > > > > Kafka migration tool failed due to: > > > > java.lang.reflect.InvocationTargetException > > > > at > > sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > > > > Method) > > > > at > > > > > > > > > > sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) > > > > at > > > > > > > > > > sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) > > > > at > > > java.lang.reflect.Constructor.newInstance(Constructor.java:526) > > > > at > > > kafka.tools.KafkaMigrationTool.main(KafkaMigrationTool.java:200) > > > > Caused by: java.lang.NoClassDefFoundError: scala/Tuple2$mcLL$sp > > > > at kafka.utils.ZKConfig.<init>(ZkUtils.scala:302) > > > > at > > kafka.consumer.ConsumerConfig.<init>(ConsumerConfig.scala:44) > > > > ... 5 more > > > > Caused by: java.lang.ClassNotFoundException: scala.Tuple2$mcLL$sp > > > > at java.lang.ClassLoader.findClass(ClassLoader.java:531) > > > > at > > > > > > > > > > kafka.tools.KafkaMigrationTool$ParentLastURLClassLoader$FindClassClassLoader.findClass(KafkaMigrationTool.java:440) > > > > at java.lang.ClassLoader.loadClass(ClassLoader.java:425) > > > > at java.lang.ClassLoader.loadClass(ClassLoader.java:358) > > > > at > > > > > > > > > > kafka.tools.KafkaMigrationTool$ParentLastURLClassLoader$ChildURLClassLoader.findClass(KafkaMigrationTool.java:463) > > > > at java.lang.ClassLoader.loadClass(ClassLoader.java:425) > > > > at java.lang.ClassLoader.loadClass(ClassLoader.java:358) > > > > ... 7 more > > > > > > > > [2014-11-01 02:51:35,124] ERROR Kafka migration tool failed: > > > > (kafka.tools.KafkaMigrationTool) > > > > java.lang.reflect.InvocationTargetException > > > > at > > sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > > > > Method) > > > > at > > > > > > > > > > sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) > > > > at > > > > > > > > > > sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) > > > > at > > > java.lang.reflect.Constructor.newInstance(Constructor.java:526) > > > > at > > > kafka.tools.KafkaMigrationTool.main(KafkaMigrationTool.java:200) > > > > Caused by: java.lang.NoClassDefFoundError: scala/Tuple2$mcLL$sp > > > > at kafka.utils.ZKConfig.<init>(ZkUtils.scala:302) > > > > at > > kafka.consumer.ConsumerConfig.<init>(ConsumerConfig.scala:44) > > > > ... 5 more > > > > Caused by: java.lang.ClassNotFoundException: scala.Tuple2$mcLL$sp > > > > at java.lang.ClassLoader.findClass(ClassLoader.java:531) > > > > at > > > > > > > > > > kafka.tools.KafkaMigrationTool$ParentLastURLClassLoader$FindClassClassLoader.findClass(KafkaMigrationTool.java:440) > > > > at java.lang.ClassLoader.loadClass(ClassLoader.java:425) > > > > at java.lang.ClassLoader.loadClass(ClassLoader.java:358) > > > > at > > > > > > > > > > kafka.tools.KafkaMigrationTool$ParentLastURLClassLoader$ChildURLClassLoader.findClass(KafkaMigrationTool.java:463) > > > > at java.lang.ClassLoader.loadClass(ClassLoader.java:425) > > > > at java.lang.ClassLoader.loadClass(ClassLoader.java:358) > > > > ... 7 more > > > > __________ > > > > > > > > > > > > The files kafka-0.7.2.jar and zkclient-0.1.jar are the exact same > ones > > > > that are being used in the old 0.7 cluster. > > > > > > > > I also tried downloading and building a new 0.7.2 jar file with > scala, > > > but > > > > it had the same error, too. > > > > > > > > What can I be doing wrong? Is there any way to get more output to see > > > > where is the error? > > > > > > > > Thanks in advance, > > > > > > > > -- > > > > Tomàs Núñez > > > > Enterprise Infrastructure Consultant > > > > The Pythian Group - Love your data! > > > > > > > > Office (international): +1 613 565 8696 x1501 > > > > > > > > > > > > > > > > -- > > > Tomàs Núñez > > > Enterprise Infrastructure Consultant > > > The Pythian Group - Love your data! > > > > > > Office (international): +1 613 565 8696 x1501 > > > > > > -- > > > > > > > > > -- > > > > > > > > > > > > > > > > > > -- > Tomàs Núñez > Enterprise Infrastructure Consultant > The Pythian Group - Love your data! > > Office (international): +1 613 565 8696 x1501 > > -- > > > -- > > > >