<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Re: sbt compilation error in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/sbt-compilation-error/m-p/154357#M40783</link>
    <description>&lt;P&gt;this build.sbt fix the issue and now it compiles the package fine &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[root@hadoop1 TwitterPopularTags]# more build.sbt
name := "TwitterPopularTags"&lt;/P&gt;&lt;P&gt;version := "1.0"&lt;/P&gt;&lt;P&gt;scalaVersion := "2.11.8"&lt;/P&gt;&lt;P&gt;val sparkVersion = "1.6.1"&lt;/P&gt;&lt;P&gt;libraryDependencies ++= Seq(
  "org.apache.spark" %% "spark-core" % sparkVersion,
  "org.apache.spark" %% "spark-streaming" % sparkVersion,
  "org.apache.spark" %% "spark-streaming-twitter" % sparkVersion
)&lt;/P&gt;&lt;P&gt;resolvers += "Akka Repository" at "&lt;A href="http://repo.akka.io/releases/"&gt;http://repo.akka.io/releases/&lt;/A&gt;"&lt;/P&gt;&lt;P&gt;[root@hadoop1 TwitterPopularTags]#&lt;/P&gt;</description>
    <pubDate>Fri, 16 Sep 2016 02:51:37 GMT</pubDate>
    <dc:creator>aliyesami</dc:creator>
    <dc:date>2016-09-16T02:51:37Z</dc:date>
    <item>
      <title>sbt compilation error</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/sbt-compilation-error/m-p/154355#M40781</link>
      <description>&lt;P&gt;&lt;A href="https://community.cloudera.com/legacyfs/online/attachments/7706-utilitiesscala.txt"&gt;utilitiesscala.txt&lt;/A&gt;&lt;A href="https://community.cloudera.com/legacyfs/online/attachments/7705-printtweetsscala.txt"&gt;printtweetsscala.txt&lt;/A&gt;my build file is ,I am attaching the source code .&lt;/P&gt;&lt;PRE&gt;[root@hadoop1 SparkStreaming]# more build.sbt
name := "SparkStreaming"
version := "1.0"
scalaVersion := "2.11.7"
resolvers += "Akka Repository" at "http://repo.akka.io/releases/"
libraryDependencies ++= Seq("org.apache.spark" % "spark-core_2.10" % "1.2.1","org.apache.spark" % "spark-mllib_2.10" % "1.2.1")
scalacOptions += "-deprecation"

&lt;/PRE&gt;&lt;P&gt;compilation error :&lt;/P&gt;&lt;PRE&gt;
[root@hadoop1 SparkStreaming]# sbt compile
[info] Set current project to SparkStreaming (in build file:/root/SparkStreaming/)
[info] Compiling 2 Scala sources to /root/SparkStreaming/target/scala-2.11/classes...
[error] /root/SparkStreaming/src/main/scala/PrintTweets.scala:7: object twitter is not a member of package org.apache.spark.streaming
[error] import org.apache.spark.streaming.twitter._
[error]                                   ^
[error] /root/SparkStreaming/src/main/scala/PrintTweets.scala:29: not found: value TwitterUtils
[error]     val tweets = TwitterUtils.createStream(ssc, None)
[error]                  ^
[error] two errors found
[error] (compile:compile) Compilation failed
[error] Total time: 3 s, completed Sep 15, 2016 12:57:15 PM
&lt;/PRE&gt;&lt;P&gt;thanks&lt;/P&gt;</description>
      <pubDate>Fri, 16 Sep 2016 00:05:06 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/sbt-compilation-error/m-p/154355#M40781</guid>
      <dc:creator>aliyesami</dc:creator>
      <dc:date>2016-09-16T00:05:06Z</dc:date>
    </item>
    <item>
      <title>Re: sbt compilation error</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/sbt-compilation-error/m-p/154356#M40782</link>
      <description>&lt;P&gt;the twitter related jars I have placed in the 'resource' folder as shown below :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[root@hadoop1 resources]# pwd
/root/SparkStreaming/src/main/resources
[root@hadoop1 resources]# ls
dstream-twitter_2.11-0.1.0-SNAPSHOT.jar  target  twitter4j-core-4.0.4.ziptwitter4j-core-4.0.4.jar  twitter4j-stream-4.0.4.jar
[root@hadoop1 resources]# jar tvf dstream-twitter_2.11-0.1.0-SNAPSHOT.jar | grep TwitterUtils
  5862 Wed Aug 10 11:11:36 EDT 2016 org/apache/spark/streaming/twitter/TwitterUtils$.class
  4749 Wed Aug 10 11:11:34 EDT 2016 org/apache/spark/streaming/twitter/TwitterUtils.class
[root@hadoop1 resources]#&lt;/P&gt;</description>
      <pubDate>Fri, 16 Sep 2016 00:07:27 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/sbt-compilation-error/m-p/154356#M40782</guid>
      <dc:creator>aliyesami</dc:creator>
      <dc:date>2016-09-16T00:07:27Z</dc:date>
    </item>
    <item>
      <title>Re: sbt compilation error</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/sbt-compilation-error/m-p/154357#M40783</link>
      <description>&lt;P&gt;this build.sbt fix the issue and now it compiles the package fine &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[root@hadoop1 TwitterPopularTags]# more build.sbt
name := "TwitterPopularTags"&lt;/P&gt;&lt;P&gt;version := "1.0"&lt;/P&gt;&lt;P&gt;scalaVersion := "2.11.8"&lt;/P&gt;&lt;P&gt;val sparkVersion = "1.6.1"&lt;/P&gt;&lt;P&gt;libraryDependencies ++= Seq(
  "org.apache.spark" %% "spark-core" % sparkVersion,
  "org.apache.spark" %% "spark-streaming" % sparkVersion,
  "org.apache.spark" %% "spark-streaming-twitter" % sparkVersion
)&lt;/P&gt;&lt;P&gt;resolvers += "Akka Repository" at "&lt;A href="http://repo.akka.io/releases/"&gt;http://repo.akka.io/releases/&lt;/A&gt;"&lt;/P&gt;&lt;P&gt;[root@hadoop1 TwitterPopularTags]#&lt;/P&gt;</description>
      <pubDate>Fri, 16 Sep 2016 02:51:37 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/sbt-compilation-error/m-p/154357#M40783</guid>
      <dc:creator>aliyesami</dc:creator>
      <dc:date>2016-09-16T02:51:37Z</dc:date>
    </item>
  </channel>
</rss>

