NoSuchMethodError - Akka - Props

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

NoSuchMethodError - Akka - Props

bearrito
This post has NOT been accepted by the mailing list yet.
Trying to get started with  a few simple stand alone local cases. Receiving the below.

STACK

Exception in thread "main" java.lang.NoSuchMethodError: akka.actor.Props$.apply(Lscala/Function0;Lscala/reflect/ClassTag;)Lakka/actor/Props;
        at org.apache.spark.SparkEnv$.registerOrLookup$1(SparkEnv.scala:156)
        at org.apache.spark.SparkEnv$.create(SparkEnv.scala:168)
        at org.apache.spark.SparkContext.<init>(SparkContext.scala:139)
        at org.apache.spark.SparkContext.<init>(SparkContext.scala:100)




build.sbt

name := "Simple Project"

version := "1.0"

scalaVersion := "2.10.3"

libraryDependencies += "org.apache.spark" %% "spark-core" % "0.9.0-incubating"

resolvers += "Akka Repository" at "http://repo.akka.io/releases/""
Reply | Threaded
Open this post in threaded view
|

Re: NoSuchMethodError - Akka - Props

Deepak Nulu
I see the same error. I am trying a standalone example integrated into a Play Framework v2.2.2 application. The error occurs when I try to create a Spark Streaming Context. Compilation succeeds, so I am guessing it has to do with the version of Akka getting picked up at runtime.
Reply | Threaded
Open this post in threaded view
|

Re: NoSuchMethodError - Akka - Props

bearrito
This post has NOT been accepted by the mailing list yet.
Yes, it is. I had all sorts of issues and still haven't quite managed them.

I'm running on IntelliJ 13 and here is what did and did not work for me.

1. Running straight from the SBT Console did not work.
2. Running the example using Intellij's built in debugger did not work.
3. Since 13 IntelliJ has had tighter integration with SBT, so there is now a sort of embedded SBT console window. Running from this window did work for me.

Ultimately to fix, I could see what this embedded console is doing compared to the regular SBT console and fix accordingly. I have not done so yet as I prefer to develop than troubleshoot build issues.
Reply | Threaded
Open this post in threaded view
|

Re: NoSuchMethodError - Akka - Props

Tathagata Das
In reply to this post by Deepak Nulu
Are you launching your application using scala or java command? scala command bring in a version of Akka that we have found to cause conflicts with Spark's version for Akka. So its best to launch using Java. 

TD



On Thu, Mar 6, 2014 at 3:45 PM, Deepak Nulu <[hidden email]> wrote:
I see the same error. I am trying a standalone example integrated into a Play
Framework v2.2.2 application. The error occurs when I try to create a Spark
Streaming Context. Compilation succeeds, so I am guessing it has to do with
the version of Akka getting picked up at runtime.



--
View this message in context: http://apache-spark-user-list.1001560.n3.nabble.com/NoSuchMethodError-Akka-Props-tp2191p2375.html
Sent from the Apache Spark User List mailing list archive at Nabble.com.

Reply | Threaded
Open this post in threaded view
|

Re: NoSuchMethodError - Akka - Props

Deepak Nulu
In reply to this post by bearrito
I was just able to fix this in my environment.

By looking at the repository/cache in my Play Framework installation, I was able to determine that spark-0.9.0-incubating uses Akka version 2.2.3. Similarly, looking at repository/local revealed that Play Framework 2.2.2 ships with Akka version 2.2.0.

So I added the following to my play project dependencies:

    "com.typesafe.akka" %% "akka-actor" % "2.2.3",
    "com.typesafe.akka" %% "akka-slf4j" % "2.2.3",

That fixed the runtime exception and my standalone spark program works fine now.

-deepak
Reply | Threaded
Open this post in threaded view
|

Please remove me from the mail list.//Re: NoSuchMethodError - Akka - Props

Qiuxin (robert)
In reply to this post by Deepak Nulu
Please remove me from the mail list.

-----邮件原件-----
发件人: Deepak Nulu [mailto:[hidden email]]
发送时间: 2014年3月7日 7:45
收件人: [hidden email]
主题: Re: NoSuchMethodError - Akka - Props

I see the same error. I am trying a standalone example integrated into a Play Framework v2.2.2 application. The error occurs when I try to create a Spark Streaming Context. Compilation succeeds, so I am guessing it has to do with the version of Akka getting picked up at runtime.



--
View this message in context: http://apache-spark-user-list.1001560.n3.nabble.com/NoSuchMethodError-Akka-Props-tp2191p2375.html
Sent from the Apache Spark User List mailing list archive at Nabble.com.