its works after including akka-stream dependency (transitive) with never 
version.
  "com.typesafe.akka" %% "akka-http" % "10.0.10",
  "com.typesafe.akka" %% "akka-actor" % "2.5.4",
  "com.typesafe.akka" %% "akka-stream" % "2.5.4",  
  "com.typesafe.akka" %% "akka-http-spray-json" % "10.0.10"


On Wednesday, March 8, 2017 at 3:19:43 AM UTC+5:30, Rob Crawford wrote:
>
> From my understanding of the binary compatibility statement, these should 
> work together, but after I start an Akka-http server, I get this exception:
>
> java.lang.NoSuchMethodError: 
> akka.actor.ActorCell.addFunctionRef(Lscala/Function2;)Lakka/actor/FunctionRef;
> at 
> akka.stream.stage.GraphStageLogic$StageActor.<init>(GraphStage.scala:142)
> at akka.stream.stage.GraphStageLogic.getStageActor(GraphStage.scala:929)
> ...
>
> Now, I'm starting this from inside an actor, but didn't think that would 
> be an issue. I've tried starting the Http server from main(), but it throws 
> the same exception. To start it, I'm doing this:
>
> ActorSystem system = getContext().system();
>
>
> final HttpBinding myServer = new HttpBinding();
> myServer.startServer("localhost", 8080, ServerSettings.create(system), 
> system);
>
>
> The HttpBinding class is:
>
>
> public class HttpBinding extends HttpApp {
>
>     protected Route route() {
>         return path("hello", () ->
>                 get(() ->
>                         complete("<h1>Say hello to akka-http</h1>")
>                 )
>         );
>     }
> }
>
>
> I've checked the dependencies, and nothing's brought in an older version of 
> akka. I'm using the Scala 2.12 versions of everything. From my build.gradle:
>
>
> compile group: 'com.typesafe.akka', name: 'akka-actor_2.12', version: '2.5-M2'
> compile group: 'com.typesafe.akka', name: 'akka-persistence_2.12', version: 
> '2.5-M2'
> compile group: 'com.typesafe.akka', name: 'akka-slf4j_2.12', version: '2.5-M2'
>
> compile group: 'com.typesafe.akka', name: 'akka-http_2.12', version: '10.0.4'
>
>
> The only place I've seen a similar exception discussed was a StackOverflow 
> question that involved Play, and I'm not using Play. Any suggestions on 
>
> where to look for the problem? Or should I just wait for the final release of 
> Akka 2.5 and Akka-Http to catch up?
>
>
> Thanks!
>
>
>

-- 
>>>>>>>>>>      Read the docs: http://akka.io/docs/
>>>>>>>>>>      Check the FAQ: 
>>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>>>>>>>>>      Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to