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

java.lang.ClassNotFoundException: org.apache.spark.streaming.rabbitmq.RabbitMQUtils #105

Open
rkamaleswaran opened this issue Jun 8, 2017 · 1 comment

Comments

@rkamaleswaran
Copy link

Hi all,

I wrote a simple custom receiver to grab messages from RabbitMQ into spark streaming (using spark-rabbitmq 0.5.1, and spark 2.0.2). However, when I run the file, I get the following error:

Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/spark/streaming/rabbitmq/RabbitMQUtils$
	at CustomReceiver$.main(SparkReceiver.scala:25)
	at CustomReceiver.main(SparkReceiver.scala)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.apache.spark.deploy.SparkSubmit$.org$apache$spark$deploy$SparkSubmit$$runMain(SparkSubmit.scala:736)
	at org.apache.spark.deploy.SparkSubmit$.doRunMain$1(SparkSubmit.scala:185)
	at org.apache.spark.deploy.SparkSubmit$.submit(SparkSubmit.scala:210)
	at org.apache.spark.deploy.SparkSubmit$.main(SparkSubmit.scala:124)
	at org.apache.spark.deploy.SparkSubmit.main(SparkSubmit.scala)
Caused by: java.lang.ClassNotFoundException: org.apache.spark.streaming.rabbitmq.RabbitMQUtils$
	at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
	... 11 more

Please let me know how I can proceed from here, thank you!

@compae
Copy link
Member

compae commented Aug 18, 2017

It's possible that you don't generate one fat jar with dependencies?

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

No branches or pull requests

2 participants