storm-kafka-0.8-plus-test
storm-kafka-0.8-plus-test copied to clipboard
adding required packages to avoid NoClassDefFoundError
Hi, could you please explain when you get the log4 related errors?
Thanks
Hi, You will get these errors if you compile with the cluster profile (mvn clean package -P cluster) Unfortunately my cluster is down now because of a university network outage the past 4 days and I cannot send you the stack trace, but I guess you will be able to reproduce the problem. Otherwise I can repeat the steps and send you the trace soon...
Could you please try with the latest version when you get a chance? I can't reproduce the issue.
Thanks
I am sorry for the vague comment - Its been a time since I was testing this and I cannot remember what exactly was wrong. Sure I will reproduce the error and let you know as long as I get my cluster running. I cannot really test your last version though because I am using the 0.9.2-incubating version on top of Mesos. Last time I tried 0.9.3 on Mesos I was getting errors...
OK so the error is caused because you have the org.slf4j dependency with provided scope for the cluster profile. If you comment this then its fine. Leaving it as is makes sense depending on the cluster setup and you could assume that someone will provide slf4j at runtime. I wasn't so I was getting the error as you can see bellow: And btw sorry I haven't paid much attention to your pom - too much after midnight setups lately! :-/
java -cp /root/testing/storm-kafka-0.8-plus-test/target/storm-kafka-0.8-plus-test-0.2.0-SNAPSHOT-jar-with-dependencies.jar storm.kafka.tools.StormProducer $ACTIVE_MASTER_PRIVATE:9092
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/log4j/Logger
at kafka.utils.Logging$class.logger(Logging.scala:24)
at kafka.utils.VerifiableProperties.logger(VerifiableProperties.scala:24)
at kafka.utils.Logging$class.info(Logging.scala:67)
at kafka.utils.VerifiableProperties.info(VerifiableProperties.scala:24)
at kafka.utils.VerifiableProperties.verify(VerifiableProperties.scala:197)
at kafka.producer.ProducerConfig.