Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adding required packages to avoid NoClassDefFoundError #6

Open
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

strat0sphere
Copy link

No description provided.

@wurstmeister
Copy link
Owner

Hi,
could you please explain when you get the log4 related errors?

Thanks

@strat0sphere
Copy link
Author

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...

@wurstmeister
Copy link
Owner

Could you please try with the latest version when you get a chance? I can't reproduce the issue.

Thanks

@strat0sphere
Copy link
Author

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...

@strat0sphere
Copy link
Author

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.(ProducerConfig.scala:57)
at storm.kafka.tools.StormProducer.main(StormProducer.java:25)
Caused by: java.lang.ClassNotFoundException: org.apache.log4j.Logger
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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants