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.

Cassandra Sink: exception java.lang.NoClassDefFoundError: Could not initialize class com.landoop.json.sql.JacksonJson$

See original GitHub issue

Hi, we are running Kafka Connect Cassandra Sink connector using com.datamountaineer.kafka-connect-cassandra v2.0.1 and got this exception below. I wonder if any of you ever seen it before. Looks like it failed when trying to insert the data from Kafka topic, which we’re using JSON format. The KCQL is pretty straightforward, i.e. “INSERT INTO tick_events SELECT event_id, event_timestamp, event_type, tick_price, tick_quantity, tick_symbol FROM kf-test-sink” I checked everything is correct, do you know what might be the culprit? Thanks!

c.d.s.c.c.s.CassandraJsonWriter | There was an error writing the records Boxed Error
java.util.concurrent.ExecutionException: Boxed Error
        at scala.concurrent.impl.Promise$.resolver(Promise.scala:87)
        at scala.concurrent.impl.Promise$.scala$concurrent$impl$Promise$$resolveTry(Promise.scala:79)
        at scala.concurrent.impl.Promise$DefaultPromise.tryComplete(Promise.scala:284)
        at scala.concurrent.Promise.complete(Promise.scala:53)
        at scala.concurrent.Promise.complete$(Promise.scala:52)
        at scala.concurrent.impl.Promise$DefaultPromise.complete(Promise.scala:187)
        at scala.concurrent.Promise.failure(Promise.scala:104)
        at scala.concurrent.Promise.failure$(Promise.scala:104)
        at scala.concurrent.impl.Promise$DefaultPromise.failure(Promise.scala:187)
        at com.datamountaineer.streamreactor.connect.concurrent.ExecutorExtension$RunnableWrapper$$anon$1.run(ExecutorExtension.scala:33)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
        at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.lang.NoClassDefFoundError: Could not initialize class com.landoop.json.sql.JacksonJson$
        at com.datamountaineer.streamreactor.connect.converters.Transform$.apply(Transform.scala:93)
        at com.datamountaineer.streamreactor.connect.cassandra.sink.CassandraJsonWriter.$anonfun$insert$2(CassandraJsonWriter.scala:187)
        at com.datamountaineer.streamreactor.connect.cassandra.sink.CassandraJsonWriter.$anonfun$insert$2$adapted(CassandraJsonWriter.scala:181)
        at scala.collection.immutable.Map$Map1.foreach(Map.scala:128)
        at com.datamountaineer.streamreactor.connect.cassandra.sink.CassandraJsonWriter.insert(CassandraJsonWriter.scala:181)
        at com.datamountaineer.streamreactor.connect.cassandra.sink.CassandraJsonWriter.$anonfun$write$4(CassandraJsonWriter.scala:161)
        at com.datamountaineer.streamreactor.connect.cassandra.sink.CassandraJsonWriter.$anonfun$write$4$adapted(CassandraJsonWriter.scala:159)
        at scala.collection.Iterator.foreach(Iterator.scala:941)
        at scala.collection.Iterator.foreach$(Iterator.scala:941)
        at scala.collection.AbstractIterator.foreach(Iterator.scala:1429)
        at scala.collection.IterableLike.foreach(IterableLike.scala:74)
        at scala.collection.IterableLike.foreach$(IterableLike.scala:73)
        at scala.collection.AbstractIterable.foreach(Iterable.scala:56)
        at com.datamountaineer.streamreactor.connect.cassandra.sink.CassandraJsonWriter.$anonfun$write$3(CassandraJsonWriter.scala:159)
        at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:23)
        at com.datamountaineer.streamreactor.connect.concurrent.ExecutorExtension$RunnableWrapper$$anon$1.run(ExecutorExtension.scala:30)
        ... 3 common frames omitted

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:40 (13 by maintainers)

github_iconTop GitHub Comments

2reactions
vvash94commented, May 10, 2022

@davidsloan Im having the same issue as @dberardo-com with MQTT sink connector. I have reached out on the community slack channel. It would be awesome if you could guide me on how to get past this. Thanks.

1reaction
davidsloancommented, Oct 4, 2022

@davidsloan is there any update on when a new release (4.0.0?) including this fix is going to be issued and new binaries provided for download? Thanks!

@aromanos please see here for the new release: https://github.com/lensesio/stream-reactor/releases/tag/4.0.0

Read more comments on GitHub >

github_iconTop Results From Across the Web

Landoop/support - Gitter
Thread.run(Thread.java:748) Caused by: java.lang.NoClassDefFoundError: Could not initialize class com.landoop.json.sql.JacksonJson$ at ...
Read more >
java.lang.NoClassDefFoundError: Could not initialize class XXX
It would appear some uncaught exception occurred and propagated up to the actual ClassLoader attempting to load the class.
Read more >
Cassandra Sink — Lenses.io
The connector converts the value from the Kafka Connect SinkRecords to JSON and uses Cassandra's JSON insert functionality to insert the rows. The...
Read more >
Common Issues - StreamSets Community
SDC error - REST API call error: java.lang. ... Kafka consumer: java.lang.NoClassDefFoundError: Could not initialize class org.xerial.snappy.Snappyx.
Read more >
Could not initialize class org.apache.cassandra.config ...
Could not initialize class org.apache.cassandra.config. ... DebuggableThreadPoolExecutor.java:242 - Error in ThreadPoolExecutor java.lang.
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