Http.get is ambiguous + java11


(ramya ) #1

Hi ,

I’m migrating the Lagom project from java8 to java11 .

Have the dependency on akka-http

        <groupId>com.typesafe.akka</groupId>

        <artifactId>akka-http_2.12</artifactId>

        <version>10.1.5</version>

    </dependency>

Getting the below compiler error .
reference to get is ambiguous both method get(akka.actor.ActorSystem) in akka.http.javadsl.Http and method get(akka.actor.ActorSystem) in akka.http.javadsl.Http match

Please could you help me fix this .

Thanks and Regards,
Ramya S


(Johan Andrén) #2

Hi Ramiya, this is a known issue, we are working on getting that fixed.

Some related issues:


Note that Java 11 is not quite officially supported yet, there may be more things hiding there, especially if you are also on top of Lagom which pulls in more third party libraries than vanilla Akka.


(ramya ) #3

Thanks @johanandren , for the update .

Can we expect ETA for the same .


(Johan Andrén) #4

We thought it was solved in the upcoming 2.5.18 release but we have just discovered it also has problems, albeit potentially different problems (IntelliJ and Eclipse finding the overload ambigous but not the compiler).

Can’t give you any estimate, we will need to wait for a new Scala release before we get this fixed. There is a workaround noted in a comment in https://github.com/akka/akka-http/issues/2211 but it requires adding some Scala code to your project and calling that instead of the extension directly, so it’s not ideal.


(ramya ) #5

Thanks for the quick reply .

I would wait for the fix .

Thank you.