You should combine the same versions of Scala. If you use
akka-stream-kafka_2.12 then the Akka version you use (and all other
libraries written in Scala you use in fact) must have the same version of
Scala since the major versions of Scala (2.11, 2.12) are not binary
compatible. In addition to this you must also combine this with a version
of Akka that the driver works with. Easiest is probably to just use the
latest reactive-kaka and let it pull in the right versions of Akka as
transitive dependencies, you can do that by just having:
<dependency>
<groupId>com.typesafe.akka</groupId>
<artifactId>akka-stream-kafka_2.11</artifactId>
<version>0.15</version>
</dependency>
In your maven pomfile, if you want to explicitly list Akka as well,
you could then see in your IDE which versions that kaka-stream-kafka pulls
in and add those versions.
--
Johan
Akka Team
On Fri, Apr 28, 2017 at 4:38 PM, Shannon Ma <[email protected]> wrote:
> With 2.12, i had to update the code,
>
>
> return new ProducerMessage.Message<SpecificRecord, SpecificRecord,
> ConsumerMessage.Committable>(
> new ProducerRecord<SpecificRecord, SpecificRecord>("akkatest",
> msg.record().key(), msg.record().value()), msg.committableOffset());
>
>
> but getting
>
> Exception in thread "main" java.lang.NoSuchMethodError:
> scala.Product.$init$(Lscala/Product;)V
> at akka.util.Timeout.<init>(Timeout.scala:13)
> at akka.actor.ActorSystem$Settings.<init>(ActorSystem.scala:328)
> at akka.actor.ActorSystemImpl.<init>(ActorSystem.scala:683)
> at akka.actor.ActorSystem$.apply(ActorSystem.scala:245)
> at akka.actor.ActorSystem$.apply(ActorSystem.scala:288)
> at akka.actor.ActorSystem$.apply(ActorSystem.scala:233)
> at akka.actor.ActorSystem$.apply(ActorSystem.scala:224)
> at akka.actor.ActorSystem$.create(ActorSystem.scala:159)
> at akka.actor.ActorSystem.create(ActorSystem.scala)
> at com.javacodegeeks.camel.AkkaTest.main(AkkaTest.java:36)
>
> --
> >>>>>>>>>> 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 [email protected].
> To post to this group, send email to [email protected].
> Visit this group at https://groups.google.com/group/akka-user.
> For more options, visit https://groups.google.com/d/optout.
>
--
>>>>>>>>>> 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 [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.