Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Facing issue to generate Schema for case class having a java construct in it. #856

Open
chandan-kumar-ai opened this issue Nov 27, 2024 · 0 comments

Comments

@chandan-kumar-ai
Copy link

test("Sample case class testing") {
    case class TestRecord(intField: Int, stringField: String, instant: Instant, doubleArray:  Array[java.lang.Double])
    val schema = AvroSchema[TestRecord]
    println(schema.toString(true))
  }

if change java.lang.Double to Double it works

Otherwise This generate error could not find implicit value for parameter schemaFor: com.sksamuel.avro4s.SchemaFor[TestRecord]
    val schema = AvroSchema[TestRecord]

if I add

implicit lazy val schemaFor: SchemaFor[TestRecord] = SchemaFor[TestRecord]

This ends with

java.lang.StackOverflowError

using avro4s 4.x version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant