Saturday, 15 August 2015

Trying to build and run Apache Kafka 0.8 against Scala 2.9.2 without success -



Trying to build and run Apache Kafka 0.8 against Scala 2.9.2 without success -

as stated in topic description, i'm trying kafka 0.8 running scala 2.9.2.

i able working version using quick start 0.8 (https://cwiki.apache.org/kafka/kafka-08-quick-start.html), compiled against scala 2.8.0 default.

i tried modify step

./sbt bundle

to

./sbt "++2.9.2 package"

it compiles without errors during start complains cannot find main class.

/tmp/kafka-8-test/kafka[0.8]$ bin/kafka-server-start.sh onfig/server1.properties error: not find or load main class kafka.kafka

any help highly appreciated.

the problem bin/kafka-server-start.sh script uses bin/kafka-run-class.sh execute generated jar file.

this script has hard-coded versions, need customize this:

... library=$(echo "$ivypath/org.scala-lang/scala-library/jars/scala-library-2.9.2.jar") classpath=$classpath:$library compiler=~$(echo "$ivypath/org.scala-lang/scala-compiler/jars/scala-compiler-2.9.2.jar") classpath=$classpath:$compiler log4j=$(echo "$ivypath/log4j/log4j/jars/log4j-1.2.15.jar") classpath=$classpath:$log4j slf=$(echo "$ivypath/org.slf4j/slf4j-api/jars/slf4j-api-1.6.4.jar") classpath=$classpath:$slf zookeeper=$(echo "$ivypath/org.apache.zookeeper/zookeeper/jars/zookeeper-3.3.4.jar") classpath=$classpath:$zookeeper jopt=$(echo "$ivypath/net.sf.jopt-simple/jopt-simple/jars/jopt-simple-3.2.jar") classpath=$classpath:$jopt file in $base_dir/core/target/scala-2.9.2/*.jar; classpath=$classpath:$file done file in $base_dir/core/lib/*.jar; classpath=$classpath:$file done file in $base_dir/perf/target/scala-2.9.2/kafka*.jar; classpath=$classpath:$file done ...

scala apache-kafka

No comments:

Post a Comment