Hi David, That's indeed the problem, the Scala runtime is contained in those jars currently missing in your environment. I'm not sure why they are not there automatically, it might be some setup aspect of sbt. I was under the impression sbt would make ivy fetch all necessary libraries.
To your other question, *core/lib* are external dependencies. *core/target *is where sbt will place the Kafka package when building kafka via './sbt package', as well as where it will place classes if you just compile Kafka rather than packaging it into a jar. I believe *lib* and *target* serve all 'sub-projects' contained in the repo - *core*, *perf*, *examples*, and *contrib. *The later provide performance testing, java examples, and hadoop extensions, respectively. For running Kafka, core is typically enough. That's why when you run ./sbt for compiling or packaging, the default project is core. Sorry about the suggestion for compiling with 2.9.2 before, which was not compatible with the run scripts. Matan On Mon, Mar 11, 2013 at 6:07 PM, David Arthur (JIRA) <j...@apache.org>wrote: > > [ > https://issues.apache.org/jira/browse/KAFKA-797?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13598926#comment-13598926] > > David Arthur commented on KAFKA-797: > ------------------------------------ > > So upon further inspection, I see a couple of problems: > > 1. 2.8.0 is hard coded in the kafka-run-class.sh script > 2. Even when compiling with 2.8.0, the script doesn't find scala-compiler > or scala-library in the Ivy cache. It builds: > /Users/mumrah/.ivy2/cache/org.scala-lang/scala-library/jars/scala-library-2.8.0.jar > and > ~/Users/mumrah/.ivy2/cache/org.scala-lang/scala-compiler/jars/scala-compiler-2.8.0.jar, > but neither exist > > Building up classpaths from the Ivy cache without really using Ivy is very > brittle, IMO. > > I would be willing to work on a fix for this, but I'd need clarification > on the placement and usage of the libraries throughout the project. E.g., > what's the difference between core/lib, lib, core/target, target? > > > Cannot start Kafka 0.8 per Quick Start instructions > > --------------------------------------------------- > > > > Key: KAFKA-797 > > URL: https://issues.apache.org/jira/browse/KAFKA-797 > > Project: Kafka > > Issue Type: Bug > > Affects Versions: 0.8 > > Reporter: David Arthur > > > > Checked out latest 0.8 (b5edbb193b33ebf0b3056935a537967ff21478a6), and > ran: > > ./sbt update > > ./sbt package > > Both complete successfully. Then I try to start the server: > > $ ./bin/kafka-server-start.sh config/server.properties > > Exception in thread "main" java.lang.NoClassDefFoundError: > scala/ScalaObject > > at java.lang.ClassLoader.defineClass1(Native Method) > > at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631) > > at java.lang.ClassLoader.defineClass(ClassLoader.java:615) > > at > java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141) > > at java.net.URLClassLoader.defineClass(URLClassLoader.java:283) > > at java.net.URLClassLoader.access$000(URLClassLoader.java:58) > > at java.net.URLClassLoader$1.run(URLClassLoader.java:197) > > 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) > > at java.lang.ClassLoader.defineClass1(Native Method) > > at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631) > > at java.lang.ClassLoader.defineClass(ClassLoader.java:615) > > at > java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141) > > at java.net.URLClassLoader.defineClass(URLClassLoader.java:283) > > at java.net.URLClassLoader.access$000(URLClassLoader.java:58) > > at java.net.URLClassLoader$1.run(URLClassLoader.java:197) > > 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) > > at kafka.Kafka.main(Kafka.scala) > > Caused by: java.lang.ClassNotFoundException: scala.ScalaObject > > 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) > > ... 25 more > > -- > This message is automatically generated by JIRA. > If you think it was sent incorrectly, please contact your JIRA > administrators > For more information on JIRA, see: http://www.atlassian.com/software/jira >