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.

Schema Registry register fails.

See original GitHub issue

I’m trying to register schema in Confluent Kafka, but facing the following issue.

This code is being used on Azure Databricks, Runtime 9.1 LTS, scala 2.12, Spark 3.1.2

Code:

val registryConfig = Map(
  AbrisConfig.SCHEMA_REGISTRY_URL -> "https://localhost:8081..",
  "basic.auth.credentials.source" -> "USER_INFO",
  "basic.auth.user.info" -> "key:value"
)

val schemaManager = SchemaManagerFactory.create(registryConfig)

val subject = SchemaSubject.usingTopicNameStrategy("topicName", isKey=false) 

val schema = AvroSchemaUtils.toAvroSchema(dataFrame)
val schema_string = schema.toString()

schemaManager.register(subject, schema_string)

ERROR:

NoSuchMethodError: org.apache.avro.Schema.toString(Ljava/util/Collection;Z)Ljava/lang/String;

at io.confluent.kafka.schemaregistry.avro.AvroSchema.canonicalString(AvroSchema.java:151)
	at io.confluent.kafka.schemaregistry.client.CachedSchemaRegistryClient.testCompatibility(CachedSchemaRegistryClient.java:456)
	at za.co.absa.abris.avro.registry.AbstractConfluentRegistryClient.testCompatibility(AbstractConfluentRegistryClient.scala:32)
	at za.co.absa.abris.avro.read.confluent.SchemaManager.isCompatible(SchemaManager.scala:103)
	at za.co.absa.abris.avro.read.confluent.SchemaManager.register(SchemaManager.scala:79)
	at za.co.absa.abris.avro.read.confluent.SchemaManager.register(SchemaManager.scala:70)
	at $line1ead0f8c9ebb4c9b9bd65eed54668c9e167.$read$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw.<init>([command-3618265933055528:38]())
	at $line1ead0f8c9ebb4c9b9bd65eed54668c9e167.$read$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw.<init>([command-3618265933055528:330]())
	at $line1ead0f8c9ebb4c9b9bd65eed54668c9e167.$read$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw.<init>([command-3618265933055528:332]())
	at $line1ead0f8c9ebb4c9b9bd65eed54668c9e167.$read$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw.<init>([command-3618265933055528:334]())
	at $line1ead0f8c9ebb4c9b9bd65eed54668c9e167.$read$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw.<init>([command-3618265933055528:336]())
	at $line1ead0f8c9ebb4c9b9bd65eed54668c9e167.$read$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw.<init>([command-3618265933055528:338]())
	at $line1ead0f8c9ebb4c9b9bd65eed54668c9e167.$read$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw.<init>([command-3618265933055528:340]())
	at $line1ead0f8c9ebb4c9b9bd65eed54668c9e167.$read$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw.<init>([command-3618265933055528:342]())
	at $line1ead0f8c9ebb4c9b9bd65eed54668c9e167.$read$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw.<init>([command-3618265933055528:344]())
	at $line1ead0f8c9ebb4c9b9bd65eed54668c9e167.$read$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw.<init>([command-3618265933055528:346]())
	at $line1ead0f8c9ebb4c9b9bd65eed54668c9e167.$read$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw.<init>([command-3618265933055528:348]())
	at $line1ead0f8c9ebb4c9b9bd65eed54668c9e167.$read$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw.<init>([command-3618265933055528:350]())
	at $line1ead0f8c9ebb4c9b9bd65eed54668c9e167.$read$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw.<init>([command-3618265933055528:352]())
	at $line1ead0f8c9ebb4c9b9bd65eed54668c9e167.$read$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw.<init>([command-3618265933055528:354]())
	at $line1ead0f8c9ebb4c9b9bd65eed54668c9e167.$read$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw.<init>([command-3618265933055528:356]())
	at $line1ead0f8c9ebb4c9b9bd65eed54668c9e167.$read$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw.<init>([command-3618265933055528:358]())
	at $line1ead0f8c9ebb4c9b9bd65eed54668c9e167.$read$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw.<init>([command-3618265933055528:360]())
	at $line1ead0f8c9ebb4c9b9bd65eed54668c9e167.$read$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw.<init>([command-3618265933055528:362]())
	at $line1ead0f8c9ebb4c9b9bd65eed54668c9e167.$read$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw.<init>([command-3618265933055528:364]())
	at $line1ead0f8c9ebb4c9b9bd65eed54668c9e167.$read$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw.<init>([command-3618265933055528:366]())
	at $line1ead0f8c9ebb4c9b9bd65eed54668c9e167.$read$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw.<init>([command-3618265933055528:368]())
	at $line1ead0f8c9ebb4c9b9bd65eed54668c9e167.$read$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw.<init>([command-3618265933055528:370]())
	at $line1ead0f8c9ebb4c9b9bd65eed54668c9e167.$read$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw.<init>([command-3618265933055528:372]())
	at $line1ead0f8c9ebb4c9b9bd65eed54668c9e167.$read$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw.<init>([command-3618265933055528:374]())
	at $line1ead0f8c9ebb4c9b9bd65eed54668c9e167.$read$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw.<init>([command-3618265933055528:376]())
	at $line1ead0f8c9ebb4c9b9bd65eed54668c9e167.$read$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw.<init>([command-3618265933055528:378]())
	at $line1ead0f8c9ebb4c9b9bd65eed54668c9e167.$read$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw.<init>([command-3618265933055528:380]())
	at $line1ead0f8c9ebb4c9b9bd65eed54668c9e167.$read$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw.<init>([command-3618265933055528:382]())
	at $line1ead0f8c9ebb4c9b9bd65eed54668c9e167.$read$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw.<init>([command-3618265933055528:384]())
	at $line1ead0f8c9ebb4c9b9bd65eed54668c9e167.$read$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw.<init>([command-3618265933055528:386]())
	at $line1ead0f8c9ebb4c9b9bd65eed54668c9e167.$read$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw.<init>([command-3618265933055528:388]())
	at $line1ead0f8c9ebb4c9b9bd65eed54668c9e167.$read$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw.<init>([command-3618265933055528:390]())
	at $line1ead0f8c9ebb4c9b9bd65eed54668c9e167.$read$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw.<init>([command-3618265933055528:392]())
	at $line1ead0f8c9ebb4c9b9bd65eed54668c9e167.$read$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw.<init>([command-3618265933055528:394]())
	at $line1ead0f8c9ebb4c9b9bd65eed54668c9e167.$read$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw.<init>([command-3618265933055528:396]())
	at $line1ead0f8c9ebb4c9b9bd65eed54668c9e167.$read$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw.<init>([command-3618265933055528:398]())
	at $line1ead0f8c9ebb4c9b9bd65eed54668c9e167.$read$$iw$$iw$$iw$$iw$$iw$$iw$$iw$$iw.<init>([command-3618265933055528:400]())
	at $line1ead0f8c9ebb4c9b9bd65eed54668c9e167.$read$$iw$$iw$$iw$$iw$$iw$$iw$$iw.<init>([command-3618265933055528:402]())
	at $line1ead0f8c9ebb4c9b9bd65eed54668c9e167.$read$$iw$$iw$$iw$$iw$$iw$$iw.<init>([command-3618265933055528:404]())
	at $line1ead0f8c9ebb4c9b9bd65eed54668c9e167.$read$$iw$$iw$$iw$$iw$$iw.<init>([command-3618265933055528:406]())
	at $line1ead0f8c9ebb4c9b9bd65eed54668c9e167.$read$$iw$$iw$$iw$$iw.<init>([command-3618265933055528:408]())
	at $line1ead0f8c9ebb4c9b9bd65eed54668c9e167.$read$$iw$$iw$$iw.<init>([command-3618265933055528:410]())
	at $line1ead0f8c9ebb4c9b9bd65eed54668c9e167.$read$$iw$$iw.<init>([command-3618265933055528:412]())
	at $line1ead0f8c9ebb4c9b9bd65eed54668c9e167.$read$$iw.<init>([command-3618265933055528:414]())
	at $line1ead0f8c9ebb4c9b9bd65eed54668c9e167.$read.<init>([command-3618265933055528:416]())
	at $line1ead0f8c9ebb4c9b9bd65eed54668c9e167.$read$.<init>([command-3618265933055528:420]())
	at $line1ead0f8c9ebb4c9b9bd65eed54668c9e167.$read$.<clinit>(command-3618265933055528)
	at $line1ead0f8c9ebb4c9b9bd65eed54668c9e167.$eval$.$print$lzycompute(<notebook>:7)
	at $line1ead0f8c9ebb4c9b9bd65eed54668c9e167.$eval$.$print(<notebook>:6)
	at $line1ead0f8c9ebb4c9b9bd65eed54668c9e167.$eval.$print(<notebook>)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at scala.tools.nsc.interpreter.IMain$ReadEvalPrint.call(IMain.scala:745)
	at scala.tools.nsc.interpreter.IMain$Request.loadAndRun(IMain.scala:1021)
	at scala.tools.nsc.interpreter.IMain.$anonfun$interpret$1(IMain.scala:574)
	at scala.reflect.internal.util.ScalaClassLoader.asContext(ScalaClassLoader.scala:41)
	at scala.reflect.internal.util.ScalaClassLoader.asContext$(ScalaClassLoader.scala:37)
	at scala.reflect.internal.util.AbstractFileClassLoader.asContext(AbstractFileClassLoader.scala:41)
	at scala.tools.nsc.interpreter.IMain.loadAndRunReq$1(IMain.scala:573)
	at scala.tools.nsc.interpreter.IMain.interpret(IMain.scala:600)
	at scala.tools.nsc.interpreter.IMain.interpret(IMain.scala:570)
	at com.databricks.backend.daemon.driver.DriverILoop.execute(DriverILoop.scala:219)
	at com.databricks.backend.daemon.driver.ScalaDriverLocal.$anonfun$repl$1(ScalaDriverLocal.scala:235)
	at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:23)
	at com.databricks.backend.daemon.driver.DriverLocal$TrapExitInternal$.trapExit(DriverLocal.scala:887)
	at com.databricks.backend.daemon.driver.DriverLocal$TrapExit$.apply(DriverLocal.scala:840)
	at com.databricks.backend.daemon.driver.ScalaDriverLocal.repl(ScalaDriverLocal.scala:235)
	at com.databricks.backend.daemon.driver.DriverLocal.$anonfun$execute$11(DriverLocal.scala:526)
	at com.databricks.logging.UsageLogging.$anonfun$withAttributionContext$1(UsageLogging.scala:266)
	at scala.util.DynamicVariable.withValue(DynamicVariable.scala:62)
	at com.databricks.logging.UsageLogging.withAttributionContext(UsageLogging.scala:261)
	at com.databricks.logging.UsageLogging.withAttributionContext$(UsageLogging.scala:258)
	at com.databricks.backend.daemon.driver.DriverLocal.withAttributionContext(DriverLocal.scala:50)
	at com.databricks.logging.UsageLogging.withAttributionTags(UsageLogging.scala:305)
	at com.databricks.logging.UsageLogging.withAttributionTags$(UsageLogging.scala:297)
	at com.databricks.backend.daemon.driver.DriverLocal.withAttributionTags(DriverLocal.scala:50)
	at com.databricks.backend.daemon.driver.DriverLocal.execute(DriverLocal.scala:503)
	at com.databricks.backend.daemon.driver.DriverWrapper.$anonfun$tryExecutingCommand$1(DriverWrapper.scala:689)
	at scala.util.Try$.apply(Try.scala:213)
	at com.databricks.backend.daemon.driver.DriverWrapper.tryExecutingCommand(DriverWrapper.scala:681)
	at com.databricks.backend.daemon.driver.DriverWrapper.getCommandOutputAndError(DriverWrapper.scala:522)
	at com.databricks.backend.daemon.driver.DriverWrapper.executeCommand(DriverWrapper.scala:634)
	at com.databricks.backend.daemon.driver.DriverWrapper.runInnerLoop(DriverWrapper.scala:427)
	at com.databricks.backend.daemon.driver.DriverWrapper.runInner(DriverWrapper.scala:370)
	at com.databricks.backend.daemon.driver.DriverWrapper.run(DriverWrapper.scala:221)
	at java.lang.Thread.run(Thread.java:748)

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6

github_iconTop GitHub Comments

1reaction
srikanth-platformatorycommented, Feb 14, 2022

Hey, I can confirm that it was due to dependency issues. The problem has been resolved. Thanks for taking the time to look into this @cerveada

1reaction
cerveadacommented, Feb 11, 2022

Abris 6 supports only Spark 3.2. Please use Abris 5 for older Spark versions.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Schema registry fails to start or is unable to register ... - GitHub
Hi, We are seeing intermittently, that when Kafka is restarted, Schema Registry either fails to start, or is unable to register the schema...
Read more >
Confluent Schema registry failed failed POST request
I got it to work when I called DELETE i.e. curl -X DELETE localhost:8081/subjects/mySchema and started again. I think the issue was the...
Read more >
Error 50002: Register operation timed out - Schema Registry
Encountered this error in our production environment when trying to evolve an existing schema. Our Schema Registry cluster is comprised of 3 ...
Read more >
Unable to register new schemas in SR - Google Groups
We've been successfully using our Confluent Platform involving SR, but just recently (last week) we started getting an error when trying to register...
Read more >
Replicate Avro Messages To Target - Towards Data Science
On the target side, you have a separate schema-registry instance that ... the message and fails to insert/register a schema on target.
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