Erlang supervisor/gen_server exception exit: noproc - emacs

I'm going insane right now trying to figure out what the problem to this is.
Basically I just want to set up an easy Supervisor with 1 server and 1 gen_event-behaviour module.
Now the problem is that I can't get it to start anymore, the supervisor that is.
I get this error no matter what I do:
** exception exit: noproc
and when using the text-tracer it shows that it happends in sRPG_supervisor:init/1. And with this you think there's something wrong with the code, but I get exactly the same thing when I run other peoples examples of this(I've downloaded Joe Armstrongs examples and tested the sellaprime_supervisor with the same result).
It used to start fine when I ran it in my virtual Ubuntu installation. Then I set it up so I could code in Windows but I never even tested that the simplest form of this worked, and obviously it don't for some reason.
So if someone has had a similar problem, would be great to find a solution!
I'm using erl6.3 as the Erlang version with OTP 17.
Here's the code that I'm using, just a buildup from the Emacs generated skeleton:
sRPG_supervisor.erl
-module(sRPG_supervisor).
-behaviour(supervisor).
%% API
-export([start_link/0, start_link/1, start/0, start_in_shell_for_testing/0]).
%% Supervisor callbacks
-export([init/1]).
-define(SERVER, ?MODULE).
%%%===================================================================
%%% API functions
%%%===================================================================
%%--------------------------------------------------------------------
%% #doc
%% Starts the supervisor
%%
%% #spec start_link() -> {ok, Pid} | ignore | {error, Error}
%% #end
%%--------------------------------------------------------------------
start_link() ->
supervisor:start_link({local, ?SERVER}, ?MODULE, []).
start() ->
spawn(fun() ->
supervisor:start_link({local, ?SERVER}, ?MODULE, _Arg = [])
end).
start_in_shell_for_testing() ->
{ok, Pid} = supervisor:start_link({local, ?SERVER}, ?MODULE, _Arg = []),
unlink(Pid).
start_link(Args) ->
supervisor:start_link({local, ?SERVER}, ?MODULE, Args).
%%%===================================================================
%%% Supervisor callbacks
%%%===================================================================
%%--------------------------------------------------------------------
%% #private
%% #doc
%% Whenever a supervisor is started using supervisor:start_link/[2,3],
%% this function is called by the new process to find out about
%% restart strategy, maximum restart frequency and child
%% specifications.
%%
%% #spec init(Args) -> {ok, {SupFlags, [ChildSpec]}} |
%% ignore |
%% {error, Reason}
%% #end
%%--------------------------------------------------------------------
init([]) ->
%% Install sRPG event/error handler
gen_event:swap_handler(alarm_handler, {alarm_handler, swap}, {sRPG_event_handler, xyz}),
RestartStrategy = one_for_one,
MaxRestarts = 1000,
MaxSecondsBetweenRestarts = 3600,
SupFlags = {RestartStrategy, MaxRestarts, MaxSecondsBetweenRestarts},
Restart = permanent,
Shutdown = 2000,
Type = worker,
AChild = {sRPG_server, {sRPG_server, start_link, []},
Restart, Shutdown, Type, [sRPG_server]},
{ok, {SupFlags, [AChild]}}.
sRPG_server.erl
-module(sRPG_server).
-behaviour(gen_server).
%% API
-export([start_link/0, testServer/0]).
%% gen_server callbacks
-export([init/1, handle_call/3, handle_cast/2, handle_info/2,
terminate/2, code_change/3]).
-define(SERVER, ?MODULE).
-record(state, {}).
%%%===================================================================
%%% API
%%%===================================================================
testServer() ->
gen_server:call(?MODULE, {test, test}).
%%--------------------------------------------------------------------
%% #doc
%% Starts the server
%%
%% #spec start_link() -> {ok, Pid} | ignore | {error, Error}
%% #end
%%--------------------------------------------------------------------
start_link() ->
gen_server:start_link({local, ?SERVER}, ?MODULE, [], []).
%%%===================================================================
%%% gen_server callbacks
%%%===================================================================
%%--------------------------------------------------------------------
%% #private
%% #doc
%% Initializes the server
%%
%% #spec init(Args) -> {ok, State} |
%% {ok, State, Timeout} |
%% ignore |
%% {stop, Reason}
%% #end
%%--------------------------------------------------------------------
init([]) ->
%% Note we must set trap_exit = true if we want
%% terminate/2 to be called when the application is stopped
process_flag(trap_exit, true),
%MainGamePid = gameSystem:start(),
io:format("~p starting~n", [?MODULE]),
{ok, #state{}}.
%%--------------------------------------------------------------------
%% #private
%% #doc
%% Handling call messages
%%
%% #spec handle_call(Request, From, State) ->
%% {reply, Reply, State} |
%% {reply, Reply, State, Timeout} |
%% {noreply, State} |
%% {noreply, State, Timeout} |
%% {stop, Reason, Reply, State} |
%% {stop, Reason, State}
%% #end
%%--------------------------------------------------------------------
handle_call({test, test}, _From, State) ->
io:format("TEST TEST TEST ~n"),
Reply = ok,
{reply, Reply, State};
handle_call(_Request, _From, State) ->
Reply = ok,
{reply, Reply, State}.
%%--------------------------------------------------------------------
%% #private
%% #doc
%% Handling cast messages
%%
%% #spec handle_cast(Msg, State) -> {noreply, State} |
%% {noreply, State, Timeout} |
%% {stop, Reason, State}
%% #end
%%--------------------------------------------------------------------
handle_cast(_Msg, State) ->
{noreply, State}.
%%--------------------------------------------------------------------
%% #private
%% #doc
%% Handling all non call/cast messages
%%
%% #spec handle_info(Info, State) -> {noreply, State} |
%% {noreply, State, Timeout} |
%% {stop, Reason, State}
%% #end
%%--------------------------------------------------------------------
handle_info(_Info, State) ->
{noreply, State}.
%%--------------------------------------------------------------------
%% #private
%% #doc
%% This function is called by a gen_server when it is about to
%% terminate. It should be the opposite of Module:init/1 and do any
%% necessary cleaning up. When it returns, the gen_server terminates
%% with Reason. The return value is ignored.
%%
%% #spec terminate(Reason, State) -> void()
%% #end
%%--------------------------------------------------------------------
terminate(_Reason, _State) ->
ok.
%%--------------------------------------------------------------------
%% #private
%% #doc
%% Convert process state when code is changed
%%
%% #spec code_change(OldVsn, State, Extra) -> {ok, NewState}
%% #end
%%--------------------------------------------------------------------
code_change(_OldVsn, State, _Extra) ->
{ok, State}.
%%%===================================================================
%%% Internal functions
%%%===================================================================
sRPG_event_handler.erl
-module(sRPG_event_handler).
-behaviour(gen_event).
%% API
-export([start_link/0, add_handler/0]).
%% gen_event callbacks
-export([init/1, handle_event/2, handle_call/2,
handle_info/2, terminate/2, code_change/3]).
-define(SERVER, ?MODULE).
-record(state, {}).
%%%===================================================================
%%% gen_event callbacks
%%%===================================================================
%%--------------------------------------------------------------------
%% #doc
%% Creates an event manager
%%
%% #spec start_link() -> {ok, Pid} | {error, Error}
%% #end
%%--------------------------------------------------------------------
start_link() ->
gen_event:start_link({local, ?SERVER}).
%%--------------------------------------------------------------------
%% #doc
%% Adds an event handler
%%
%% #spec add_handler() -> ok | {'EXIT', Reason} | term()
%% #end
%%--------------------------------------------------------------------
add_handler() ->
gen_event:add_handler(?SERVER, ?MODULE, []).
%%%===================================================================
%%% gen_event callbacks
%%%===================================================================
%%--------------------------------------------------------------------
%% #private
%% #doc
%% Whenever a new event handler is added to an event manager,
%% this function is called to initialize the event handler.
%%
%% #spec init(Args) -> {ok, State}
%% #end
%%--------------------------------------------------------------------
init([]) ->
io:format("*** sRPG Event Handler init ***~n"),
{ok, #state{}};
init(Args) ->
io:format("*** sRPG Event Handler init: ~p~n", [Args]),
{ok, #state{}}.
%%--------------------------------------------------------------------
%% #private
%% #doc
%% Whenever an event manager receives an event sent using
%% gen_event:notify/2 or gen_event:sync_notify/2, this function is
%% called for each installed event handler to handle the event.
%%
%% #spec handle_event(Event, State) ->
%% {ok, State} |
%% {swap_handler, Args1, State1, Mod2, Args2} |
%% remove_handler
%% #end
%%--------------------------------------------------------------------
handle_event({set_alarm, testAlarm}, State) ->
error_logger:error_msg("*** BEEP BOOP TEST ALARM ***~n"),
{ok, State};
handle_event({clear_alarm, testAlarm}, State) ->
error_logger:error_msg("*** Brrrrppp... Test Alarm Over ***~n"),
{ok, State};
handle_event(_Event, State) ->
{ok, State}.
%%--------------------------------------------------------------------
%% #private
%% #doc
%% Whenever an event manager receives a request sent using
%% gen_event:call/3,4, this function is called for the specified
%% event handler to handle the request.
%%
%% #spec handle_call(Request, State) ->
%% {ok, Reply, State} |
%% {swap_handler, Reply, Args1, State1, Mod2, Args2} |
%% {remove_handler, Reply}
%% #end
%%--------------------------------------------------------------------
handle_call(_Request, State) ->
Reply = ok,
{ok, Reply, State}.
%%--------------------------------------------------------------------
%% #private
%% #doc
%% This function is called for each installed event handler when
%% an event manager receives any other message than an event or a
%% synchronous request (or a system message).
%%
%% #spec handle_info(Info, State) ->
%% {ok, State} |
%% {swap_handler, Args1, State1, Mod2, Args2} |
%% remove_handler
%% #end
%%--------------------------------------------------------------------
handle_info(_Info, State) ->
{ok, State}.
%%--------------------------------------------------------------------
%% #private
%% #doc
%% Whenever an event handler is deleted from an event manager, this
%% function is called. It should be the opposite of Module:init/1 and
%% do any necessary cleaning up.
%%
%% #spec terminate(Reason, State) -> void()
%% #end
%%--------------------------------------------------------------------
terminate(_Reason, _State) ->
ok.
%%--------------------------------------------------------------------
%% #private
%% #doc
%% Convert process state when code is changed
%%
%% #spec code_change(OldVsn, State, Extra) -> {ok, NewState}
%% #end
%%--------------------------------------------------------------------
code_change(_OldVsn, State, _Extra) ->
{ok, State}.
%%%===================================================================
%%% Internal functions
%%%===================================================================
and here's examples of what happens:
Eshell V6.3 (abort with ^G)
1> sRPG_supervisor:start_link().
** exception exit: noproc
2> sRPG_supervisor:start_in_shell_for_testing().
** exception exit: noproc
3> ServPid = sRPG_server:start_link().
sRPG_server starting
{ok,<0.39.0>}
4> gen_server:call(sRPG_server, {test, test}).
TEST TEST TEST
ok
As you can see the server works when called without a supervisor.
I've looked hard at the similar problems others have had, but to no avail.

Unless the sasl application is running, no alarm_handler will be running either, and the noproc exception occurs in your supervisor init as a result. Try this:
1> application:start(sasl).
ok
2> sRPG_supervisor:start_in_shell_for_testing().
*** sRPG Event Handler init: {xyz,{alarm_handler,[]}}
sRPG_server starting
=PROGRESS REPORT==== 12-Aug-2015::17:00:49 ===
supervisor: {local,sRPG_supervisor}
started: [{pid,<0.71.0>},
{id,sRPG_server},
{mfargs,{sRPG_server,start_link,[]}},
{restart_type,permanent},
{shutdown,2000},
{child_type,worker}]
true

Related

Unable to access files under resources (streamlets)

I am trying to access the files under the resource folder while running streamlets.
Below is my sbt structure.
i want to access files under streamlets -> src -> main -> resources.
i use
getClass.getClassLoader.getResource(s"file.txt")
running locally, it's working, but while running in cluster
getting error, no file and directory.
Please assist .
adding build.sbt :-
lazy val root = project.in(file(".")).aggregate(streamlets, app)
lazy val streamlets = project.in(file("streamlets"))
.enablePlugins(CloudflowAkkaPlugin, ScalaxbPlugin)
.settings(
name := s"$baseName-streamlets",
libraryDependencies ++= Seq(
"ch.qos.logback" % "logback-classic" % logbackVersion,
"org.scalactic" %% "scalactic" % "3.1.1" % "test",
"org.scalatest" %% "scalatest" % "3.1.1" % "test",
"com.lightbend.akka" %% "akka-stream-alpakka-s3" % alpakkaVersion,
"com.typesafe.akka" %% "akka-stream" % akkaVersion,
"com.typesafe.akka" %% "akka-http" % akkaHttpVersion,
"com.typesafe.akka" %% "akka-http-xml" % akkaHttpVersion,
"org.glassfish.jaxb" % "jaxb-runtime" % jaxbVersion, // for JDK11
)
)
lazy val app = project.in(file("app"))
.enablePlugins(CloudflowApplicationPlugin)
.settings(
name := s"$baseName-dev",
runLocalConfigFile := Some("app/src/main/resources/local.conf")
)
.dependsOn(streamlets)

incompatible akka-http versions with elasticmq version

im trying to run sqs server using elasticmq-rest-sqs:
"org.elasticmq" %% "elasticmq-rest-sqs" % "0.14.7"
and my akka dependencies are:
val akka = Seq(
"com.lightbend.akka" %% "akka-stream-alpakka-sns" % "0.15",
"com.typesafe.akka" %% "akka-testkit" % "2.5.8" % Test withSources(),
"com.typesafe.akka" %% "akka-stream-testkit" % "2.5.8" % Test withSources(),
"com.lightbend.akka" %% "akka-stream-alpakka-sqs" % "0.15"
)
now in my test im writing:
// sqs server
val sqsServer: SQSRestServer = SQSRestServerBuilder.withPort(4576).withInterface("localhost").start()
sqsServer.waitUntilStarted()
and i get the following error:
A needed class was not found. This could be due to an error in your
runpath. Missing class: akka/http/impl/util/SettingsCompanion
java.lang.NoClassDefFoundError: akka/http/impl/util/SettingsCompanion
its versioning thing for sure since im using it the same way in another project, but with play 2.6 (not sure if it has anything to do with it)
if im downgrading elasticmq version i get this error:
An exception or error caused a run to abort:
java.lang.NoClassDefFoundError:
akka/http/scaladsl/settings/RoutingSettings
java.lang.BootstrapMethodError: java.lang.NoClassDefFoundError:
akka/http/scaladsl/settings/RoutingSettings
please help :/
For me, the following version is working: (also matched this problem but fixed it with version)
"org.elasticmq" %% "elasticmq-rest-sqs" % "0.15.2"
"com.typesafe.akka" %% "akka-testkit" % "2.5.8" % Test withSources(),
"com.typesafe.akka" %% "akka-stream-testkit" % "2.5.8" % Test withSources(),
"com.lightbend.akka" %% "akka-stream-alpakka-sqs" % alpakkaVersion
val alpakkaVersion = "1.0-M2"
and:
"com.typesafe.play" % "sbt-plugin" % "2.7.2"

Akka Version mismatch in Class path Error

i am using SBT to setup Akka Persistence but it's failing with Error :
Detected java.lang.NoSuchMethodError error, which MAY be caused by incompatible Akka versions on the classpath. Please note that a given Akka version MUST be the same across all modules of Akka that you are using, e.g. if you use akka-actor [2.5.6 (resolved from current classpath)] all other core Akka modules MUST be of the same version. External projects like Alpakka, Persistence plugins or Akka HTTP etc. have their own version numbers - please make sure you're using a compatible set of libraries.
Uncaught error from thread [TopsActivitiesSystem-akka.actor.default-dispatcher-16]: akka.persistence.Eventsourced.persist$(Lakka/persistence/Eventsourced;Ljava/lang/Object;Lscala/Function1;)V, shutting down JVM since 'akka.jvm-exit-on-fatal-error' is enabled for for ActorSystem[TopsActivitiesSystem]
Detected java.lang.NoSuchMethodError error, which MAY be caused by incompatible Akka versions on the classpath. Please note that a given Akka version MUST be the same across all modules of Akka that you are using, e.g. if you use akka-actor [2.5.6 (resolved from current classpath)] all other core Akka modules MUST be of the same version. External projects like Alpakka, Persistence plugins or Akka HTTP etc. have their own version numbers - please make sure you're using a compatible set of libraries.
Uncaught error from thread [TopsActivitiesSystem-akka.actor.default-dispatcher-3]: akka.persistence.Eventsourced.persist$(Lakka/persistence/Eventsourced;Ljava/lang/Object;Lscala/Function1;)V, shutting down JVM since 'akka.jvm-exit-on-fatal-error' is enabled for for ActorSystem[TopsActivitiesSystem]
java.lang.NoSuchMethodError: akka.persistence.Eventsourced.persist$(Lakka/persistence/Eventsourced;Ljava/lang/Object;Lscala/Function1;)V
My Configuration SBT Build file is :
scalaVersion := "2.12.4"
lazy val root = (project in file("."))
.configs(IntegrationTest)
def akkaVersion = "2.5.6"
def akkaHttpVersion = "10.0.10"
def logbackVersion = "1.2.3"
def ItAndTest = "it, test"
libraryDependencies ++= Seq(
"com.typesafe.akka" %% "akka-actor" % akkaVersion,
"com.typesafe.akka" %% "akka-stream" % akkaVersion,
"com.typesafe.akka" %% "akka-cluster" % akkaVersion,
"com.typesafe.akka" %% "akka-cluster-tools" % akkaVersion,
"com.typesafe.akka" % "akka-cluster-metrics_2.12" % akkaVersion,
"com.redmart.fc" %% "fc-capacity-model" % "1.7.0",
"com.redmart.akka" %% "akka-downing" % "1.1.0",
"com.jsuereth" %% "scala-arm" % "2.0",
"com.typesafe" % "config" % "1.3.1",
"com.typesafe.scala-logging" %% "scala-logging" % "3.7.2",
"com.typesafe.akka" %% "akka-slf4j" % akkaVersion,
"ch.qos.logback" % "logback-classic" % logbackVersion,
"ch.qos.logback" % "logback-access" % logbackVersion,
"net.logstash.logback" % "logstash-logback-encoder" % "4.11",
"joda-time" % "joda-time" % "2.9.3",
"com.typesafe.akka" %% "akka-http" % akkaHttpVersion,
"com.typesafe.akka" %% "akka-http-spray-json" % akkaHttpVersion,
"com.typesafe.akka" %% "akka-persistence-cassandra" % "0.58",
// "com.typesafe.akka" %% "akka-cluster" % akkaVersion,
// "com.typesafe.akka" %% "akka-cluster-tools" % akkaVersion,
"com.lightbend.akka" %% "akka-management-cluster-http" % "0.4",
// "org.iq80.leveldb" % "leveldb" % "0.9",
// "org.fusesource.leveldbjni" % "leveldbjni-all" % "1.8",
"io.spray" %% "spray-json" % "1.3.3",
"com.enragedginger" %% "akka-quartz-scheduler" % "1.6.1-akka-2.5.x",
// "com.softwaremill.macwire" %% "macros" % "2.2.2" % "provided",
// "com.softwaremill.macwire" %% "util" % "2.2.2",
"com.esotericsoftware" % "kryo" % "4.0.1",
"com.github.romix.akka" %% "akka-kryo-serialization" % "0.5.2",
"com.typesafe.akka" %% "akka-http-testkit" % akkaHttpVersion % ItAndTest,
"org.scalatest" %% "scalatest" % "3.0.4" % ItAndTest,
"org.mockito" % "mockito-core" % "2.10.0" % ItAndTest,
"com.github.dnvriend" %% "akka-persistence-inmemory" % "2.5.1.1" % ItAndTest
)
dependencyOverrides += "com.typesafe.akka" %% "akka-actor" % akkaVersion
dependencyOverrides += "com.typesafe.akka" %% "akka-stream" % akkaVersion
dependencyOverrides += "com.typesafe.akka" %% "akka-cluster" % akkaVersion
dependencyOverrides += "com.typesafe.akka" %% "akka-cluster-tools" % akkaVersion
dependencyOverrides += "com.typesafe.akka" %% "akka-persistence" % akkaVersion
dependencyOverrides += "com.typesafe.akka" %% "akka-slf4j" % akkaVersion
dependencyOverrides += "com.typesafe.akka" % "akka-cluster-metrics_2.12" % akkaVersion
Can Anyone explain the reason why it's failing? I am sure i am overriding to latest package. which is 2.5.6 using Dependency Overrides. i am Using SBT 0.13.
Use the current version (0.5) of akka-management-cluster-http:
"com.lightbend.akka" %% "akka-management-cluster-http" % "0.5"
Version 0.4 depends on an older version of Akka.

sbt not setting javaOptions in a forked setting

I'm trying to instrument my server with Kamon, which requires Aspectj weaver. I'm using sbt 0.13.8
However, the options aren't being passed to the forked process.
I've looked here:
https://github.com/eigengo/activator-akka-aspectj/blob/master/build.sbt
and here:
http://www.scala-sbt.org/0.13/docs/Forking.html
And this is my build.sbt:
import sbt.Keys._
name := """myApp"""
version := "0.0.1"
lazy val root = (project in file(".")).enablePlugins(PlayScala)
scalaVersion := "2.11.6"
libraryDependencies ++= Seq(
//jdbc, don not enable this when using slick
cache,
ws,
specs2 % Test,
"com.typesafe.akka" %% "akka-contrib" % "2.4.+",
"org.scalatest" % "scalatest_2.11" % "2.2.4" % "test",
"org.scalatestplus" %% "play" % "1.4.0-M3" % "test",
"com.github.seratch" %% "awscala" % "0.5.+",
"com.typesafe.play" %% "play-slick" % "1.1.1",
"com.typesafe.play" %% "play-slick-evolutions" % "1.1.1",
"mysql" % "mysql-connector-java" % "5.1.+",
"commons-net" % "commons-net" % "3.3",
"net.sourceforge.htmlcleaner" % "htmlcleaner" % "2.15",
"io.strongtyped" %% "active-slick" % "0.3.3",
"org.aspectj" % "aspectjweaver" % "1.8.8",
"org.aspectj" % "aspectjrt" % "1.8.8",
"io.kamon" %% "kamon-core" % "0.5.+",
// "io.kamon" %% "kkamon-system-metrics" % "0.5.+",
"io.kamon" %% "kamon-scala" % "0.5.+",
// "io.kamon" %% "kamon-akka" % "0.5.+",
"io.kamon" %% "kamon-datadog" % "0.5.+"
)
resolvers ++= Seq(
"scalaz-bintray" at "http://dl.bintray.com/scalaz/releases"
)
// Play provides two styles of routers, one expects its actions to be injected, the
// other, legacy style, accesses its actions statically.
routesGenerator := InjectedRoutesGenerator
javaOptions in run += "-javaagent:" + System.getProperty("user.home") + "/.ivy2/cache/org.aspectj/aspectjweaver/jars/aspectjweaver-1.8.8.jar -Xmx:2G"
fork in run := true
connectInput in run := true
I've tried running the app using ./activator start as well as ./activator stage and then running the script.
What am I doing wrong?
Thanks!
The production application should be configurable during deployment. This is my example of start script:
PARAMETERS="-Dconfig.file=conf/production.conf -Dlogger.file=conf/prod-logger.xml"
PARAMETERS="$PARAMETERS -Dhttp.port=9000"
PARAMETERS="$PARAMETERS -J-Xmx8g -J-Xms8g -J-server -J-verbose:gc -J-Xloggc:../logs/portal/gc.log -J-XX:+PrintGCDateStamps"
nohup bin/myApp $PARAMETERS &
For more details see Production Configuration

Scalatra shutting down system - "No Such Method Error"

I have some code in Scalatra using Atmosphere framework that keeps causing the system to crash after a web request is made. The console shows the data being sent from server to client, but straight after it the following error always appears:
Uncaught error from thread [default-akka.actor.default-dispatcher-11] shutting down JVM since 'akka.jvm-exit-on-fatal-error' is enabled for ActorSystem[default]
java.lang.NoSuchMethodError: akka.actor.ActorSystem.dispatcher()Lakka/dispatch/MessageDispatcher;
at org.scalatra.atmosphere.package$.jucFuture2akkaFuture(package.scala:29)
at org.scalatra.atmosphere.ScalatraBroadcaster.broadcast(ScalatraBroadcaster.scala:19)
I am using dispatch to make the web requests inside m actors. But I got the same message when I was using spray.
Here is how I make the web request:
Http(Req(_.setUrl(fullUrl))) map {response =>
But the error happens after data has been sent to the client (as you can see the call to "broadcast" in the stack trace. So I don't think it is the web request.
My project build file:
lazy val project = Project (
"",
file("."),
settings = Defaults.defaultSettings ++ ScalatraPlugin.scalatraWithJRebel ++ scalateSettings ++ assemblySettings ++ Seq(
organization := Organization,
name := Name,
version := Version,
scalaVersion := ScalaVersion,
resolvers += Classpaths.typesafeReleases,
test in assembly := {},
jarName in assembly := "",
mergeStrategy in assembly <<= (mergeStrategy in assembly) { (old) =>
{
case PathList(xs) if xs.equals("about.html") => MergeStrategy.first
case x => old(x)
}
},
libraryDependencies ++= Seq(
"org.scalatra" %% "scalatra" % ScalatraVersion,
"org.scalatra" %% "scalatra-scalate" % ScalatraVersion,
"org.scalatra" %% "scalatra-specs2" % ScalatraVersion % "test",
"ch.qos.logback" % "logback-classic" % "1.0.6" % "runtime",
"org.eclipse.jetty" % "jetty-webapp" % "8.1.8.v20121106" % "container;compile",
"org.eclipse.jetty.orbit" % "javax.servlet" % "3.0.0.v201112011016" % "container;provided;test;compile" artifacts (Artifact("javax.servlet", "jar", "jar")),
"org.scalatra" %% "scalatra-atmosphere" % "2.2.1",
"org.scalatra" %% "scalatra-json" % "2.2.1",
"org.json4s" %% "json4s-jackson" % "3.2.4",
"org.eclipse.jetty" % "jetty-websocket" % "8.1.10.v20130312" % "container;compile",
"org.scalatest" % "scalatest_2.10" % "2.0.M6-SNAP17",
"com.typesafe.akka" % "akka-testkit_2.10" % "2.2.0",
"joda-time" % "joda-time" % "2.3",
"com.github.nscala-time" %% "nscala-time" % "0.6.0",
"com.cloudphysics" % "jerkson_2.10" % "0.6.3",
"net.databinder.dispatch" %% "dispatch-core" % "0.11.0"
I looked at the source code of scalatra and it appears that it is code inside the future that is blowing up. I am using the following execution context, which may be relevant:
implicit val ec: ExecutionContext = context.dispatcher
I'm going to take a guess here and say that you are pulling in two versions of the akka-actor jar. You explicitly referencing akka-testkit is going to pull in the akka-actor 2.2.0 jar. I'm guessing that something else (maybe scalatra atmosphere) is also pulling in akka-actor and not the 2.2.0 version. You should check your classpath and see if you indeed to have two versions of akka-actor