You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a Scala/ScalaJS project with Protobuf messages defined in a shared project (Play Framework). On the JVM I try to use the these messages as values in Kafka topics and I've defined appropriate Serializers and Deserializers. These work fine. When I use the KafkaProducerActor with the serializer I get the following in the logs:
2018-04-02 19:36:20,607 [error] a.actor.OneForOneStrategy - class x.y.ProtobufMessage in JavaMirror with DependencyClassLoader{file:/home/mvh/.ivy2/cache/org.scala-lang/scala-library/jars/scala-library-2.12.4.jar,
.... gazillion more lines of classpath ....
file:/usr/lib/jvm/java-8-oracle/jre/lib/ext/sunjce_provider.jar,file:/usr/lib/jvm/java-8-oracle/jre/lib/ext/zipfs.jar,file:/usr/lib/jvm/java-8-oracle/jre/lib/ext/localedata.jar,file:/usr/lib/jvm/java-8-oracle/jre/lib/ext/sunec.jar,file:/usr/lib/jvm/java-8-oracle/jre/lib/ext/dnsns.jar,file:/usr/lib/jvm/java-8-oracle/jre/lib/ext/jfxrt.jar,file:/usr/lib/jvm/java-8-oracle/jre/lib/ext/cldrdata.jar] and parent being primordial classloader with boot classpath [/usr/lib/jvm/java-8-oracle/jre/lib/resources.jar:/usr/lib/jvm/java-8-oracle/jre/lib/rt.jar:/usr/lib/jvm/java-8-oracle/jre/lib/sunrsasign.jar:/usr/lib/jvm/java-8-oracle/jre/lib/jsse.jar:/usr/lib/jvm/java-8-oracle/jre/lib/jce.jar:/usr/lib/jvm/java-8-oracle/jre/lib/charsets.jar:/usr/lib/jvm/java-8-oracle/jre/lib/jfr.jar:/usr/lib/jvm/java-8-oracle/jre/classes] not found.
at scala.reflect.internal.Mirrors$RootsBase.staticClass(Mirrors.scala:122)
at scala.reflect.internal.Mirrors$RootsBase.staticClass(Mirrors.scala:22)
at x.y.z.KafkaProducer$$typecreator4$1.apply(KafkaTraits.scala:25)
at scala.reflect.api.TypeTags$WeakTypeTagImpl.tpe$lzycompute(TypeTags.scala:230)
at scala.reflect.api.TypeTags$WeakTypeTagImpl.tpe(TypeTags.scala:230)
at cakesolutions.kafka.akka.ProducerRecords$$typecreator1$1.apply(ProducerRecords.scala:143)
at scala.reflect.api.TypeTags$WeakTypeTagImpl.tpe$lzycompute(TypeTags.scala:230)
at scala.reflect.api.TypeTags$WeakTypeTagImpl.tpe(TypeTags.scala:230)
at scala.reflect.api.TypeTags.typeOf(TypeTags.scala:339)
at scala.reflect.api.TypeTags.typeOf$(TypeTags.scala:339)
x.y.ProtobufMessage is the (ScalaPB) message I'm trying to push to Kafka and KafkaTraits.scala:25 is:
private val protobufMessageProducerActor =
context.actorOf(KafkaProducerActor.props(producerConfig,
new StringSerializer(),
ProtobufMessageSerde),
"ProtobufMessageProducer")
Is there some special classloader/macro stuff going on where it doesn't find the implementation for my class because it's in the shared project? Everything works fine if I setup the KafkaProducerActor with a ByteArraySerializer for the value and explicitly use my ProtobufMessageSerializer to serialize the message before sending it to the producer actor.
Thanks! Best Regards!
The text was updated successfully, but these errors were encountered:
Hi,
I have a Scala/ScalaJS project with Protobuf messages defined in a shared project (Play Framework). On the JVM I try to use the these messages as values in Kafka topics and I've defined appropriate Serializers and Deserializers. These work fine. When I use the KafkaProducerActor with the serializer I get the following in the logs:
x.y.ProtobufMessage is the (ScalaPB) message I'm trying to push to Kafka and KafkaTraits.scala:25 is:
Is there some special classloader/macro stuff going on where it doesn't find the implementation for my class because it's in the shared project? Everything works fine if I setup the KafkaProducerActor with a ByteArraySerializer for the value and explicitly use my ProtobufMessageSerializer to serialize the message before sending it to the producer actor.
Thanks! Best Regards!
The text was updated successfully, but these errors were encountered: