Skip to content

Commit

Permalink
fix: exclude old org.jboss.netty classes
Browse files Browse the repository at this point in the history
The akka-remote transitive dependency brings an older io.netty jar into
the assembly causing an occasional "Wrong return type in function"
exception starting SJS:

```
[sparkDriver-akka.actor.default-dispatcher-2] ERROR akka.actor.ActorSystemImpl - Uncaught fatal error from thread [sparkDriver-akka.remote.default-remote-dispatcher-5] shutting down ActorSystem [sparkDriver]
java.lang.VerifyError: (class: org/jboss/netty/channel/socket/nio/NioWorkerPool, method: createWorker signature: (Ljava/util/concurrent/Executor;)Lorg/jboss/netty/channel/socket/nio/AbstractNioWorker;) Wrong return type in function
```

See <sbt/sbt#1518> why the simple exclude of
akka-remote does not work.
  • Loading branch information
jonbuffington committed Nov 5, 2016
1 parent a94406a commit ac4bb5a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion project/Dependencies.scala
Expand Up @@ -13,11 +13,15 @@ object Dependencies {
"joda-time" % "joda-time" % jodaTime
)

// See <https://github.com/sbt/sbt/issues/1518> why the simple exclude for a scala dependency does not work.
val excludeAkkaRemotes = Seq("0", "1", "2").map(x => ExclusionRule(organization = "com.typesafe.akka", name = "akka-remote_2.1" + x))

lazy val akkaDeps = Seq(
// Akka is provided because Spark already includes it, and Spark's version is shaded so it's not safe
// to use this one
"com.typesafe.akka" %% "akka-slf4j" % akka % "provided",
"com.typesafe.akka" %% "akka-cluster" % akka exclude("com.typesafe.akka", "akka-remote"),
// See <https://github.com/sbt/sbt/issues/1518> why the simple exclude for a scala dependency does not work.
"com.typesafe.akka" %% "akka-cluster" % akka excludeAll(excludeAkkaRemotes : _*),
"io.spray" %% "spray-json" % sprayJson,
"io.spray" %% "spray-can" % spray,
"io.spray" %% "spray-caching" % spray,
Expand Down

0 comments on commit ac4bb5a

Please sign in to comment.