question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support for avro4s 2+

See original GitHub issue

We’ve updated avro4s to 2.0.2 as they’ve added support for deserialising instant values but this looks to have broken something.

[error] sbt.ForkMain$ForkError: java.lang.NoSuchMethodError: com.sksamuel.avro4s.ToRecord.apply(Ljava/lang/Object;)Lorg/apache/avro/generic/GenericRecord;
[error]         at com.ovoenergy.kafka.serialization.avro4s.Avro4sSerialization$$anonfun$avroBinarySchemaIdSerializerWithProps$1.apply(Avro4sSerialization.scala:284)
[error]         at com.ovoenergy.kafka.serialization.avro4s.Avro4sSerialization$$anonfun$avroBinarySchemaIdSerializerWithProps$1.apply(Avro4sSerialization.scala:283)
[error]         at com.ovoenergy.kafka.serialization.core.Serialization$$anon$1.serialize(Serialization.scala:41)```

From what we could gather it looks like the apply in avro4s 2+ FromRecord and ToRecord expects extra parameters from the one in 1.9.1. 1.9.1 https://github.com/sksamuel/avro4s/blob/v1.9.1/avro4s-macros/src/main/scala/com/sksamuel/avro4s/ToRecord.scala#L204 v2.0.2 https://github.com/sksamuel/avro4s/blob/v2.0.2/avro4s-core/src/main/scala/com/sksamuel/avro4s/ToRecord.scala#L23

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:5

github_iconTop GitHub Comments

2reactions
filosgangacommented, Oct 25, 2018

Hi, The work to support avro4s 2 is already in progress in one of the branch. Thanks for reporting. Will take a look at the specific issue you have raised

0reactions
filosgangacommented, Jan 29, 2019
Read more comments on GitHub >

github_iconTop Results From Across the Web

sksamuel/avro4s - Gitter
Can anybody help to understand how genTraitObjectEnum works. I need to generate schema and other typeclasses for sealed trait of objects and can...
Read more >
Is there a way to support schema evolution in avro4s
No. Avro in general supports Schema Evolution when you provide it a schema, it can match against the name of the properties and...
Read more >
com.sksamuel.avro4s.SchemaFor - javadoc.io
There must be a instance of this typeclass in scope for any type we want to support in avro4s. Users can add their...
Read more >
com.sksamuel.avro4s : avro4s-json_2.12 : 4.0.2 - Maven Central
avro4s -json - avro4s-json. ... Source code, git@github.com:sksamuel/avro4s.git ... com.sksamuel.avro4s:avro4s-json_2.12 4.0.2. content_copy.
Read more >
crealytics / avro4s Download - JitPack
1.6.4 - Added support for Vectors; 1.6.3 - Fixed issue with decimal schema using strings instead of ints for scale and precision; 1.6.2...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found