Re: [akka-user] NoSuchMethodError: Akka 2.5-M2 and Akka-Http 10.0.4

2017-03-08 Thread Patrik Nordwall
The line numbers doesn't match 2.5-M2.
See
https://github.com/akka/akka/blob/v2.5-M2/akka-stream/src/main/scala/akka/stream/stage/GraphStage.scala#L142

It looks like you are using 2.4.17 of akka-stream
See
https://github.com/akka/akka/blob/v2.4.17/akka-stream/src/main/scala/akka/stream/stage/GraphStage.scala#L142

On Tue, Mar 7, 2017 at 10:49 PM, 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("Say hello to akka-http")
> )
> );
> }
> }
>
>
> 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.
>



-- 

Patrik Nordwall
Akka Tech Lead
Lightbend  -  Reactive apps on the JVM
Twitter: @patriknw

-- 
>>  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.


[akka-user] NoSuchMethodError: Akka 2.5-M2 and Akka-Http 10.0.4

2017-03-07 Thread Rob Crawford
>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.(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("Say hello to akka-http")
)
);
}
}


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.