Spray client reports Exception: akka.actor.ActorSystem.dispatcher()Lscala/concurrent/ExecutionContext

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

Spray client reports Exception: akka.actor.ActorSystem.dispatcher()Lscala/concurrent/ExecutionContext

Jianshi Huang
Hi,

I got the following exceptions when using Spray client to write to OpenTSDB using its REST API.

  Exception in thread "pool-10-thread-2" java.lang.NoSuchMethodError: akka.actor.ActorSystem.dispatcher()Lscala/concurrent/ExecutionContext;

It worked locally in my Intellij but failed when I launch it from Spark-submit.

Google suggested it's a compatibility issue in Akka. And I'm using latest Spark built from the HEAD, so the Akka used in Spark-submit is 2.3.4-spark.

I tried both Spray 1.3.2 (built for Akka 2.3.6) and 1.3.1 (built for 2.3.4). Both failed with the same exception.

Anyone has idea what went wrong? Need help!

--
Jianshi Huang

LinkedIn: jianshi
Twitter: @jshuang
Github & Blog: http://huangjs.github.com/
Reply | Threaded
Open this post in threaded view
|

Re: Spray client reports Exception: akka.actor.ActorSystem.dispatcher()Lscala/concurrent/ExecutionContext

Jianshi Huang
Here's the answer I got from Akka's user ML.

"""
This looks like a binary incompatibility issue. As far as I know Spark is using a custom built Akka and Scala for various reasons.

You should ask this on the Spark mailing list, Akka is binary compatible between major versions (2.3.6 is compatible with 2.3.4) but Spark uses its own build which I guess does not guarantee binary compatiblity.
"""

Anyone have used Spray or other Akka dependent libraries? Any binary compatibility issues?

Does that mean if I build Spray with Spark's Akka version

      <akka.group>org.spark-project.akka</akka.group>
      <akka.version>2.3.4-spark</akka.version>

it should solve problem. Makes sense? I'll give it a shot when I have time, now probably I'll just not using Spray client...

Cheers,
Jianshi



On Tue, Oct 28, 2014 at 6:02 PM, Jianshi Huang <[hidden email]> wrote:
Hi,

I got the following exceptions when using Spray client to write to OpenTSDB using its REST API.

  Exception in thread "pool-10-thread-2" java.lang.NoSuchMethodError: akka.actor.ActorSystem.dispatcher()Lscala/concurrent/ExecutionContext;

It worked locally in my Intellij but failed when I launch it from Spark-submit.

Google suggested it's a compatibility issue in Akka. And I'm using latest Spark built from the HEAD, so the Akka used in Spark-submit is 2.3.4-spark.

I tried both Spray 1.3.2 (built for Akka 2.3.6) and 1.3.1 (built for 2.3.4). Both failed with the same exception.

Anyone has idea what went wrong? Need help!

--
Jianshi Huang

LinkedIn: jianshi
Twitter: @jshuang
Github & Blog: http://huangjs.github.com/



--
Jianshi Huang

LinkedIn: jianshi
Twitter: @jshuang
Github & Blog: http://huangjs.github.com/
Reply | Threaded
Open this post in threaded view
|

RE: Spray client reports Exception: akka.actor.ActorSystem.dispatcher()Lscala/concurrent/ExecutionContext

Mohammed Guller
In reply to this post by Jianshi Huang

Try a version built with Akka 2.2.x

 

Mohammed

 

From: Jianshi Huang [mailto:[hidden email]]
Sent: Tuesday, October 28, 2014 3:03 AM
To: user
Subject: Spray client reports Exception: akka.actor.ActorSystem.dispatcher()Lscala/concurrent/ExecutionContext

 

Hi,

 

I got the following exceptions when using Spray client to write to OpenTSDB using its REST API.

 

  Exception in thread "pool-10-thread-2" java.lang.NoSuchMethodError: akka.actor.ActorSystem.dispatcher()Lscala/concurrent/ExecutionContext;

 

It worked locally in my Intellij but failed when I launch it from Spark-submit.

 

Google suggested it's a compatibility issue in Akka. And I'm using latest Spark built from the HEAD, so the Akka used in Spark-submit is 2.3.4-spark.

 

I tried both Spray 1.3.2 (built for Akka 2.3.6) and 1.3.1 (built for 2.3.4). Both failed with the same exception.

 

Anyone has idea what went wrong? Need help!

 

--
Jianshi Huang

LinkedIn: jianshi
Twitter: @jshuang
Github & Blog: http://huangjs.github.com/

Reply | Threaded
Open this post in threaded view
|

Re: Spray client reports Exception: akka.actor.ActorSystem.dispatcher()Lscala/concurrent/ExecutionContext

Jianshi Huang
I'm using Spark built from HEAD, I think it uses modified Akka 2.3.4, right?

Jianshi

On Wed, Oct 29, 2014 at 5:53 AM, Mohammed Guller <[hidden email]> wrote:

Try a version built with Akka 2.2.x

 

Mohammed

 

From: Jianshi Huang [mailto:[hidden email]]
Sent: Tuesday, October 28, 2014 3:03 AM
To: user
Subject: Spray client reports Exception: akka.actor.ActorSystem.dispatcher()Lscala/concurrent/ExecutionContext

 

Hi,

 

I got the following exceptions when using Spray client to write to OpenTSDB using its REST API.

 

  Exception in thread "pool-10-thread-2" java.lang.NoSuchMethodError: akka.actor.ActorSystem.dispatcher()Lscala/concurrent/ExecutionContext;

 

It worked locally in my Intellij but failed when I launch it from Spark-submit.

 

Google suggested it's a compatibility issue in Akka. And I'm using latest Spark built from the HEAD, so the Akka used in Spark-submit is 2.3.4-spark.

 

I tried both Spray 1.3.2 (built for Akka 2.3.6) and 1.3.1 (built for 2.3.4). Both failed with the same exception.

 

Anyone has idea what went wrong? Need help!

 

--
Jianshi Huang

LinkedIn: jianshi
Twitter: @jshuang
Github & Blog: http://huangjs.github.com/




--
Jianshi Huang

LinkedIn: jianshi
Twitter: @jshuang
Github & Blog: http://huangjs.github.com/
Reply | Threaded
Open this post in threaded view
|

Re: Spray client reports Exception: akka.actor.ActorSystem.dispatcher()Lscala/concurrent/ExecutionContext

Prashant Sharma
Yes we shade akka to change its protobuf version (If I am not wrong.). Yes, binary compatibility with other akka modules is compromised. One thing you can try is use akka from org.spark-project.akka, I have not tried this and not sure if its going to help you but may be you could exclude the akka spray depends on and use the akka spark depends on.

Prashant Sharma



On Wed, Oct 29, 2014 at 9:27 AM, Jianshi Huang <[hidden email]> wrote:
I'm using Spark built from HEAD, I think it uses modified Akka 2.3.4, right?

Jianshi

On Wed, Oct 29, 2014 at 5:53 AM, Mohammed Guller <[hidden email]> wrote:

Try a version built with Akka 2.2.x

 

Mohammed

 

From: Jianshi Huang [mailto:[hidden email]]
Sent: Tuesday, October 28, 2014 3:03 AM
To: user
Subject: Spray client reports Exception: akka.actor.ActorSystem.dispatcher()Lscala/concurrent/ExecutionContext

 

Hi,

 

I got the following exceptions when using Spray client to write to OpenTSDB using its REST API.

 

  Exception in thread "pool-10-thread-2" java.lang.NoSuchMethodError: akka.actor.ActorSystem.dispatcher()Lscala/concurrent/ExecutionContext;

 

It worked locally in my Intellij but failed when I launch it from Spark-submit.

 

Google suggested it's a compatibility issue in Akka. And I'm using latest Spark built from the HEAD, so the Akka used in Spark-submit is 2.3.4-spark.

 

I tried both Spray 1.3.2 (built for Akka 2.3.6) and 1.3.1 (built for 2.3.4). Both failed with the same exception.

 

Anyone has idea what went wrong? Need help!

 

--
Jianshi Huang

LinkedIn: jianshi
Twitter: @jshuang
Github & Blog: http://huangjs.github.com/




--
Jianshi Huang

LinkedIn: jianshi
Twitter: @jshuang
Github & Blog: http://huangjs.github.com/

Reply | Threaded
Open this post in threaded view
|

Re: Spray client reports Exception: akka.actor.ActorSystem.dispatcher()Lscala/concurrent/ExecutionContext

Chester Chen
We used both spray and Akka. To avoid  comparability issue, we used spark shaded akka version. It works for us. This is 1.1.0 branch, I have not tried with master branch

Chester

Sent from my iPad

On Oct 28, 2014, at 11:48 PM, Prashant Sharma <[hidden email]> wrote:

Yes we shade akka to change its protobuf version (If I am not wrong.). Yes, binary compatibility with other akka modules is compromised. One thing you can try is use akka from org.spark-project.akka, I have not tried this and not sure if its going to help you but may be you could exclude the akka spray depends on and use the akka spark depends on.

Prashant Sharma



On Wed, Oct 29, 2014 at 9:27 AM, Jianshi Huang <[hidden email]> wrote:
I'm using Spark built from HEAD, I think it uses modified Akka 2.3.4, right?

Jianshi

On Wed, Oct 29, 2014 at 5:53 AM, Mohammed Guller <[hidden email]> wrote:

Try a version built with Akka 2.2.x

 

Mohammed

 

From: Jianshi Huang [mailto:[hidden email]]
Sent: Tuesday, October 28, 2014 3:03 AM
To: user
Subject: Spray client reports Exception: akka.actor.ActorSystem.dispatcher()Lscala/concurrent/ExecutionContext

 

Hi,

 

I got the following exceptions when using Spray client to write to OpenTSDB using its REST API.

 

  Exception in thread "pool-10-thread-2" java.lang.NoSuchMethodError: akka.actor.ActorSystem.dispatcher()Lscala/concurrent/ExecutionContext;

 

It worked locally in my Intellij but failed when I launch it from Spark-submit.

 

Google suggested it's a compatibility issue in Akka. And I'm using latest Spark built from the HEAD, so the Akka used in Spark-submit is 2.3.4-spark.

 

I tried both Spray 1.3.2 (built for Akka 2.3.6) and 1.3.1 (built for 2.3.4). Both failed with the same exception.

 

Anyone has idea what went wrong? Need help!

 

--
Jianshi Huang

LinkedIn: jianshi
Twitter: @jshuang
Github & Blog: http://huangjs.github.com/




--
Jianshi Huang

LinkedIn: jianshi
Twitter: @jshuang
Github & Blog: http://huangjs.github.com/

Reply | Threaded
Open this post in threaded view
|

RE: Spray client reports Exception: akka.actor.ActorSystem.dispatcher()Lscala/concurrent/ExecutionContext

Mohammed Guller
In reply to this post by Jianshi Huang

I am not sure about that.

 

Can you try a Spray version built with 2.2.x along with Spark 1.1 and include the Akka dependencies in your project’s sbt file?

 

Mohammed

 

From: Jianshi Huang [mailto:[hidden email]]
Sent: Tuesday, October 28, 2014 8:58 PM
To: Mohammed Guller
Cc: user
Subject: Re: Spray client reports Exception: akka.actor.ActorSystem.dispatcher()Lscala/concurrent/ExecutionContext

 

I'm using Spark built from HEAD, I think it uses modified Akka 2.3.4, right?

 

Jianshi

 

On Wed, Oct 29, 2014 at 5:53 AM, Mohammed Guller <[hidden email]> wrote:

Try a version built with Akka 2.2.x

 

Mohammed

 

From: Jianshi Huang [mailto:[hidden email]]
Sent: Tuesday, October 28, 2014 3:03 AM
To: user
Subject: Spray client reports Exception: akka.actor.ActorSystem.dispatcher()Lscala/concurrent/ExecutionContext

 

Hi,

 

I got the following exceptions when using Spray client to write to OpenTSDB using its REST API.

 

  Exception in thread "pool-10-thread-2" java.lang.NoSuchMethodError: akka.actor.ActorSystem.dispatcher()Lscala/concurrent/ExecutionContext;

 

It worked locally in my Intellij but failed when I launch it from Spark-submit.

 

Google suggested it's a compatibility issue in Akka. And I'm using latest Spark built from the HEAD, so the Akka used in Spark-submit is 2.3.4-spark.

 

I tried both Spray 1.3.2 (built for Akka 2.3.6) and 1.3.1 (built for 2.3.4). Both failed with the same exception.

 

Anyone has idea what went wrong? Need help!

 

--
Jianshi Huang

LinkedIn: jianshi
Twitter: @jshuang
Github & Blog: http://huangjs.github.com/



 

--
Jianshi Huang

LinkedIn: jianshi
Twitter: @jshuang
Github & Blog: http://huangjs.github.com/

Reply | Threaded
Open this post in threaded view
|

Re: Spray client reports Exception: akka.actor.ActorSystem.dispatcher()Lscala/concurrent/ExecutionContext

Jianshi Huang
Hi Preshant, Chester, Mohammed,

I switched to Spark's Akka and now it works well. Thanks for the help!

(Need to exclude Akka from Spray dependencies, or specify it as provided)


Jianshi


On Thu, Oct 30, 2014 at 3:17 AM, Mohammed Guller <[hidden email]> wrote:

I am not sure about that.

 

Can you try a Spray version built with 2.2.x along with Spark 1.1 and include the Akka dependencies in your project’s sbt file?

 

Mohammed

 

From: Jianshi Huang [mailto:[hidden email]]
Sent: Tuesday, October 28, 2014 8:58 PM
To: Mohammed Guller
Cc: user
Subject: Re: Spray client reports Exception: akka.actor.ActorSystem.dispatcher()Lscala/concurrent/ExecutionContext

 

I'm using Spark built from HEAD, I think it uses modified Akka 2.3.4, right?

 

Jianshi

 

On Wed, Oct 29, 2014 at 5:53 AM, Mohammed Guller <[hidden email]> wrote:

Try a version built with Akka 2.2.x

 

Mohammed

 

From: Jianshi Huang [mailto:[hidden email]]
Sent: Tuesday, October 28, 2014 3:03 AM
To: user
Subject: Spray client reports Exception: akka.actor.ActorSystem.dispatcher()Lscala/concurrent/ExecutionContext

 

Hi,

 

I got the following exceptions when using Spray client to write to OpenTSDB using its REST API.

 

  Exception in thread "pool-10-thread-2" java.lang.NoSuchMethodError: akka.actor.ActorSystem.dispatcher()Lscala/concurrent/ExecutionContext;

 

It worked locally in my Intellij but failed when I launch it from Spark-submit.

 

Google suggested it's a compatibility issue in Akka. And I'm using latest Spark built from the HEAD, so the Akka used in Spark-submit is 2.3.4-spark.

 

I tried both Spray 1.3.2 (built for Akka 2.3.6) and 1.3.1 (built for 2.3.4). Both failed with the same exception.

 

Anyone has idea what went wrong? Need help!

 

--
Jianshi Huang

LinkedIn: jianshi
Twitter: @jshuang
Github & Blog: http://huangjs.github.com/



 

--
Jianshi Huang

LinkedIn: jianshi
Twitter: @jshuang
Github & Blog: http://huangjs.github.com/




--
Jianshi Huang

LinkedIn: jianshi
Twitter: @jshuang
Github & Blog: http://huangjs.github.com/
Reply | Threaded
Open this post in threaded view
|

Re: Spray client reports Exception: akka.actor.ActorSystem.dispatcher()Lscala/concurrent/ExecutionContext

Srinivas Chamarthi
I am trying to use spark with spray and I have the  dependency problem with quasiquotes. The issue comes up only when I include spark dependencies. I am not sure how this one can be excluded. 

Jianshi: can you let me know what version of spray + akka + spark are you using ? 

[error]    org.scalamacros:quasiquotes _2.10, _2.10.3
[trace] Stack trace suppressed: run last *:update for the full output.
[error] (*:update) Conflicting cross-version suffixes in: org.scalamacros:quasiq
uotes


On Thu, Oct 30, 2014 at 9:50 PM, Jianshi Huang <[hidden email]> wrote:
Hi Preshant, Chester, Mohammed,

I switched to Spark's Akka and now it works well. Thanks for the help!

(Need to exclude Akka from Spray dependencies, or specify it as provided)


Jianshi


On Thu, Oct 30, 2014 at 3:17 AM, Mohammed Guller <[hidden email]> wrote:

I am not sure about that.

 

Can you try a Spray version built with 2.2.x along with Spark 1.1 and include the Akka dependencies in your project’s sbt file?

 

Mohammed

 

From: Jianshi Huang [mailto:[hidden email]]
Sent: Tuesday, October 28, 2014 8:58 PM
To: Mohammed Guller
Cc: user
Subject: Re: Spray client reports Exception: akka.actor.ActorSystem.dispatcher()Lscala/concurrent/ExecutionContext

 

I'm using Spark built from HEAD, I think it uses modified Akka 2.3.4, right?

 

Jianshi

 

On Wed, Oct 29, 2014 at 5:53 AM, Mohammed Guller <[hidden email]> wrote:

Try a version built with Akka 2.2.x

 

Mohammed

 

From: Jianshi Huang [mailto:[hidden email]]
Sent: Tuesday, October 28, 2014 3:03 AM
To: user
Subject: Spray client reports Exception: akka.actor.ActorSystem.dispatcher()Lscala/concurrent/ExecutionContext

 

Hi,

 

I got the following exceptions when using Spray client to write to OpenTSDB using its REST API.

 

  Exception in thread "pool-10-thread-2" java.lang.NoSuchMethodError: akka.actor.ActorSystem.dispatcher()Lscala/concurrent/ExecutionContext;

 

It worked locally in my Intellij but failed when I launch it from Spark-submit.

 

Google suggested it's a compatibility issue in Akka. And I'm using latest Spark built from the HEAD, so the Akka used in Spark-submit is 2.3.4-spark.

 

I tried both Spray 1.3.2 (built for Akka 2.3.6) and 1.3.1 (built for 2.3.4). Both failed with the same exception.

 

Anyone has idea what went wrong? Need help!

 

--
Jianshi Huang

LinkedIn: jianshi
Twitter: @jshuang
Github & Blog: http://huangjs.github.com/



 

--
Jianshi Huang

LinkedIn: jianshi
Twitter: @jshuang
Github & Blog: http://huangjs.github.com/




--
Jianshi Huang

LinkedIn: jianshi
Twitter: @jshuang
Github & Blog: http://huangjs.github.com/

Reply | Threaded
Open this post in threaded view
|

Re: Spray client reports Exception: akka.actor.ActorSystem.dispatcher()Lscala/concurrent/ExecutionContext

Jianshi Huang
Hi Srinivas,

Here's the versions I'm using.

        <spark.version>1.2.0-SNAPSHOT</spark.version>
        <spray.version>1.3.2</spray.version>
        <spray.json.version>1.3.0</spray.json.version>
        <akka.group>org.spark-project.akka</akka.group>
        <akka.version>2.3.4-spark</akka.version>

I'm using Spark built from master. so it's 1.2.0-SNAPSHOT.

Jianshi



On Tue, Nov 11, 2014 at 4:06 AM, Srinivas Chamarthi <[hidden email]> wrote:
I am trying to use spark with spray and I have the  dependency problem with quasiquotes. The issue comes up only when I include spark dependencies. I am not sure how this one can be excluded. 

Jianshi: can you let me know what version of spray + akka + spark are you using ? 

[error]    org.scalamacros:quasiquotes _2.10, _2.10.3
[trace] Stack trace suppressed: run last *:update for the full output.
[error] (*:update) Conflicting cross-version suffixes in: org.scalamacros:quasiq
uotes


On Thu, Oct 30, 2014 at 9:50 PM, Jianshi Huang <[hidden email]> wrote:
Hi Preshant, Chester, Mohammed,

I switched to Spark's Akka and now it works well. Thanks for the help!

(Need to exclude Akka from Spray dependencies, or specify it as provided)


Jianshi


On Thu, Oct 30, 2014 at 3:17 AM, Mohammed Guller <[hidden email]> wrote:

I am not sure about that.

 

Can you try a Spray version built with 2.2.x along with Spark 1.1 and include the Akka dependencies in your project’s sbt file?

 

Mohammed

 

From: Jianshi Huang [mailto:[hidden email]]
Sent: Tuesday, October 28, 2014 8:58 PM
To: Mohammed Guller
Cc: user
Subject: Re: Spray client reports Exception: akka.actor.ActorSystem.dispatcher()Lscala/concurrent/ExecutionContext

 

I'm using Spark built from HEAD, I think it uses modified Akka 2.3.4, right?

 

Jianshi

 

On Wed, Oct 29, 2014 at 5:53 AM, Mohammed Guller <[hidden email]> wrote:

Try a version built with Akka 2.2.x

 

Mohammed

 

From: Jianshi Huang [mailto:[hidden email]]
Sent: Tuesday, October 28, 2014 3:03 AM
To: user
Subject: Spray client reports Exception: akka.actor.ActorSystem.dispatcher()Lscala/concurrent/ExecutionContext

 

Hi,

 

I got the following exceptions when using Spray client to write to OpenTSDB using its REST API.

 

  Exception in thread "pool-10-thread-2" java.lang.NoSuchMethodError: akka.actor.ActorSystem.dispatcher()Lscala/concurrent/ExecutionContext;

 

It worked locally in my Intellij but failed when I launch it from Spark-submit.

 

Google suggested it's a compatibility issue in Akka. And I'm using latest Spark built from the HEAD, so the Akka used in Spark-submit is 2.3.4-spark.

 

I tried both Spray 1.3.2 (built for Akka 2.3.6) and 1.3.1 (built for 2.3.4). Both failed with the same exception.

 

Anyone has idea what went wrong? Need help!

 

--
Jianshi Huang

LinkedIn: jianshi
Twitter: @jshuang
Github & Blog: http://huangjs.github.com/



 

--
Jianshi Huang

LinkedIn: jianshi
Twitter: @jshuang
Github & Blog: http://huangjs.github.com/




--
Jianshi Huang

LinkedIn: jianshi
Twitter: @jshuang
Github & Blog: http://huangjs.github.com/




--
Jianshi Huang

LinkedIn: jianshi
Twitter: @jshuang
Github & Blog: http://huangjs.github.com/