1

I have been trying to build a program in Scala to use stream tweets. My issue is while building the program.

I am getting this error

Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/spark/streaming/twitter/TwitterUtils$

I believe there is something wrong in the sbt file. I have tried different configurations and none of them has worked. Can anyone point me in the right direction?

I am aware of this thread with a similar problem: java.lang.NoClassDefFoundError: org/apache/spark/streaming/twitter/TwitterUtils$ while running TwitterPopularTags

This my current sbt file

name := "Tweets"

version := "1.0"

scalaVersion := "2.10.4"

libraryDependencies += "org.apache.spark" %% "spark-core" % "1.4.0"

libraryDependencies += "org.apache.spark" % "spark-streaming_2.10" % "1.4.0"

libraryDependencies += "org.apache.spark" % "spark-streaming-twitter_2.10" % "1.4.0"

Thanks

Community
  • 1
  • 1
user3276768
  • 1,416
  • 3
  • 18
  • 28

1 Answers1

0

i tested this example , and had similar issue , the solution was creating a folder "lib" in the project path and put all the required jars manually to in this folder , hope this solution works for you

Mr.Boter
  • 13
  • 3