You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@kafka.apache.org by Hussein Baghdadi <hu...@hotmail.com> on 2012/10/30 17:07:19 UTC

Does Kafka 0.8 works with Scala 2.9.2 ?

Hi,
I cloned Kafka 0.8 and build it on my machine (OS X)
My project is built with Scala 2.9.2 . So in my build file I indicated that Scala version is 2.9.2
Upon trying to send a message to Kafka topic, I got:
Caused by: java.lang.NoClassDefFoundError: scala/Tuple2$mcLL$sp	at kafka.producer.ProducerConfig.<init>(ProducerConfig.scala:29)	... 31 moreCaused by: java.lang.ClassNotFoundException: scala.Tuple2$mcLL$sp	at java.net.URLClassLoader$1.run(URLClassLoader.java:202)	at java.security.AccessController.doPrivileged(Native Method)	at java.net.URLClassLoader.findClass(URLClassLoader.java:190)	at java.lang.ClassLoader.loadClass(ClassLoader.java:306)	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)	at java.lang.ClassLoader.loadClass(ClassLoader.java:247)	... 32 more
Any idea what might going wrong?
Thanks for help and time. 		 	   		  

RE: Does Kafka 0.8 works with Scala 2.9.2 ?

Posted by Hussein Baghdadi <hu...@hotmail.com>.



Really thanks to share that, you saved my brain cycle.
Me too, I'm trying to get our Storm topology working.My setup is Storm , Kafka , Clojure
Our code is written in Scala 2.9.2 , there is no way around to change that.
What could I do?I know, you were clear. But any idea how to get Kafka (any version that works with Storm 0.8.x) would work with Scala 2.9.2 ?
> Date: Tue, 30 Oct 2012 18:28:48 +0100
> Subject: Re: Does Kafka 0.8 works with Scala 2.9.2 ?
> From: michael.g.noll@gmail.com
> To: kafka-users@incubator.apache.org
> 
> FWIW I have been running into the same problem when trying to write a Storm
> topology in Scala 2.9.1 that reads from a Kafka 0.7.2 cluster.
> 
> See the following JIRA tickets for more information:
> https://issues.apache.org/jira/browse/KAFKA-139
> https://issues.apache.org/jira/browse/KAFKA-134
> 
> I also have been trying to build Kafka from trunk because code was added to
> support multiple versions of Scala, but it didn't work for me.  After hours
> of troubleshooting I basically gave up trying to use Scala 2.9.x in
> combination with Kafka 0.7.2 or Kafka 0.8-trunk.
> 
> My setup was:
> - Mac OS X and CentOS6 (tried on both)
> - Scala 2.9.1
> - sbt 0.11.3 (also tried sbt 0.11.2)
> - Kafka 0.7.2 as it is downloadable from the Kafka homepage
> - Kafka 0.8-trunk from github
> - I used the Kafka Java API v0.7 as published at
> http://clojars.org/repo(storm::kafka::0.7.0-incubating), based on
> information in the Storm wiki
> 
> Sorry for not providing much more than "me too" information, but even
> confirming negative results may be useful ;-)
> 
> Best,
> Michael
> 
> 
> 
> On Tue, Oct 30, 2012 at 5:07 PM, Hussein Baghdadi <hu...@hotmail.com>wrote:
> 
> >
> > Hi,
> > I cloned Kafka 0.8 and build it on my machine (OS X)
> > My project is built with Scala 2.9.2 . So in my build file I indicated
> > that Scala version is 2.9.2
> > Upon trying to send a message to Kafka topic, I got:
> > Caused by: java.lang.NoClassDefFoundError: scala/Tuple2$mcLL$sp at
> > kafka.producer.ProducerConfig.<init>(ProducerConfig.scala:29)        ... 31
> > moreCaused by: java.lang.ClassNotFoundException: scala.Tuple2$mcLL$sp    at
> > java.net.URLClassLoader$1.run(URLClassLoader.java:202)       at
> > java.security.AccessController.doPrivileged(Native Method)   at
> > java.net.URLClassLoader.findClass(URLClassLoader.java:190)   at
> > java.lang.ClassLoader.loadClass(ClassLoader.java:306)        at
> > sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)        at
> > java.lang.ClassLoader.loadClass(ClassLoader.java:247)        ... 32 more
> > Any idea what might going wrong?
> > Thanks for help and time.

 		 	   		  

Re: Does Kafka 0.8 works with Scala 2.9.2 ?

Posted by "Michael G. Noll" <mi...@gmail.com>.
FWIW I have been running into the same problem when trying to write a Storm
topology in Scala 2.9.1 that reads from a Kafka 0.7.2 cluster.

See the following JIRA tickets for more information:
https://issues.apache.org/jira/browse/KAFKA-139
https://issues.apache.org/jira/browse/KAFKA-134

I also have been trying to build Kafka from trunk because code was added to
support multiple versions of Scala, but it didn't work for me.  After hours
of troubleshooting I basically gave up trying to use Scala 2.9.x in
combination with Kafka 0.7.2 or Kafka 0.8-trunk.

My setup was:
- Mac OS X and CentOS6 (tried on both)
- Scala 2.9.1
- sbt 0.11.3 (also tried sbt 0.11.2)
- Kafka 0.7.2 as it is downloadable from the Kafka homepage
- Kafka 0.8-trunk from github
- I used the Kafka Java API v0.7 as published at
http://clojars.org/repo(storm::kafka::0.7.0-incubating), based on
information in the Storm wiki

Sorry for not providing much more than "me too" information, but even
confirming negative results may be useful ;-)

Best,
Michael



On Tue, Oct 30, 2012 at 5:07 PM, Hussein Baghdadi <hu...@hotmail.com>wrote:

>
> Hi,
> I cloned Kafka 0.8 and build it on my machine (OS X)
> My project is built with Scala 2.9.2 . So in my build file I indicated
> that Scala version is 2.9.2
> Upon trying to send a message to Kafka topic, I got:
> Caused by: java.lang.NoClassDefFoundError: scala/Tuple2$mcLL$sp at
> kafka.producer.ProducerConfig.<init>(ProducerConfig.scala:29)        ... 31
> moreCaused by: java.lang.ClassNotFoundException: scala.Tuple2$mcLL$sp    at
> java.net.URLClassLoader$1.run(URLClassLoader.java:202)       at
> java.security.AccessController.doPrivileged(Native Method)   at
> java.net.URLClassLoader.findClass(URLClassLoader.java:190)   at
> java.lang.ClassLoader.loadClass(ClassLoader.java:306)        at
> sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)        at
> java.lang.ClassLoader.loadClass(ClassLoader.java:247)        ... 32 more
> Any idea what might going wrong?
> Thanks for help and time.