pulsar4s icon indicating copy to clipboard operation
pulsar4s copied to clipboard

Crc32cIntChecksum - Failed to load Circe JNI library

Open colinbes opened this issue 4 years ago • 6 comments

I am using the jackson dependency in my sbt file

name := "pulsarc"
version := "0.1"
scalaVersion := "2.13.4"
libraryDependencies += "com.sksamuel.pulsar4s" %% "pulsar4s-jackson" % "2.7.0"
libraryDependencies += "ch.qos.logback" % "logback-classic" % "1.2.3"

and am using intellij idea ide. On running (settings use java 8 to run app) my simple test app I get the following error message which is confusing as I am not using Circe library. Is Circe used somewhere behind the scenes?

[pulsar-client-io-1-1] Crc32cIntChecksum - Failed to load Circe JNI library. Falling back to Java based CRC32c provider 

colinbes avatar Dec 14 '20 18:12 colinbes

I assume you're not adding pulsar4s-circe to your build?

On Mon, 14 Dec 2020 at 12:13, Colin Bester [email protected] wrote:

I am using the jackson dependency in my sbt file

name := "pulsarc" version := "0.1" scalaVersion := "2.13.4" libraryDependencies += "com.sksamuel.pulsar4s" %% "pulsar4s-jackson" % "2.7.0" libraryDependencies += "ch.qos.logback" % "logback-classic" % "1.2.3"

and am using intellij idea ide. On running (settings use java 8 to run app) my simple test app I get the following error message which is confusing as I am not using Circe library. Is Circe used somewhere behind the scenes?

[pulsar-client-io-1-1] Crc32cIntChecksum - Failed to load Circe JNI library. Falling back to Java based CRC32c provider

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/sksamuel/pulsar4s/issues/256, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAFVSGQQDWVN55ZJZMKBE43SUZITJANCNFSM4U3EE7VQ .

sksamuel avatar Dec 14 '20 18:12 sksamuel

I can't see anything in the jackson module that would pull it down.

On Mon, 14 Dec 2020 at 12:16, Stephen Samuel (Sam) [email protected] wrote:

I assume you're not adding pulsar4s-circe to your build?

On Mon, 14 Dec 2020 at 12:13, Colin Bester [email protected] wrote:

I am using the jackson dependency in my sbt file

name := "pulsarc" version := "0.1" scalaVersion := "2.13.4" libraryDependencies += "com.sksamuel.pulsar4s" %% "pulsar4s-jackson" % "2.7.0" libraryDependencies += "ch.qos.logback" % "logback-classic" % "1.2.3"

and am using intellij idea ide. On running (settings use java 8 to run app) my simple test app I get the following error message which is confusing as I am not using Circe library. Is Circe used somewhere behind the scenes?

[pulsar-client-io-1-1] Crc32cIntChecksum - Failed to load Circe JNI library. Falling back to Java based CRC32c provider

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/sksamuel/pulsar4s/issues/256, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAFVSGQQDWVN55ZJZMKBE43SUZITJANCNFSM4U3EE7VQ .

sksamuel avatar Dec 14 '20 18:12 sksamuel

Ok here we are, it's nothing to do with the Scala Circe json library, but this https://github.com/trevorr/circe

Which I assume pulsar itself is using.

On Mon, 14 Dec 2020 at 12:17, Stephen Samuel (Sam) [email protected] wrote:

I can't see anything in the jackson module that would pull it down.

On Mon, 14 Dec 2020 at 12:16, Stephen Samuel (Sam) [email protected] wrote:

I assume you're not adding pulsar4s-circe to your build?

On Mon, 14 Dec 2020 at 12:13, Colin Bester [email protected] wrote:

I am using the jackson dependency in my sbt file

name := "pulsarc" version := "0.1" scalaVersion := "2.13.4" libraryDependencies += "com.sksamuel.pulsar4s" %% "pulsar4s-jackson" % "2.7.0" libraryDependencies += "ch.qos.logback" % "logback-classic" % "1.2.3"

and am using intellij idea ide. On running (settings use java 8 to run app) my simple test app I get the following error message which is confusing as I am not using Circe library. Is Circe used somewhere behind the scenes?

[pulsar-client-io-1-1] Crc32cIntChecksum - Failed to load Circe JNI library. Falling back to Java based CRC32c provider

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/sksamuel/pulsar4s/issues/256, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAFVSGQQDWVN55ZJZMKBE43SUZITJANCNFSM4U3EE7VQ .

sksamuel avatar Dec 14 '20 18:12 sksamuel

No, I have not included circe.

Here's my simple code:


import com.sksamuel.pulsar4s.{Consumer, ConsumerConfig, ProducerConfig, PulsarClient, Subscription, Topic}
import com.sksamuel.pulsar4s.jackson._
import scala.util.{Failure, Success}
case class TestMessage(name: String, value: Int)


object MyApp extends App {

  val pulsarHost = System.getProperty("org.bdesigns.pulsar", "pulsar://localhost:6650")
  val client = PulsarClient(pulsarHost)

  def receive(consumer: Consumer[TestMessage], label: String): Unit = {
    val msg = consumer.receive

    msg match {
      case Success(value) =>
        println(s"${consumer.subscription} Success, $label ${value.value}")
        consumer.acknowledge(value)
      case Failure(exception) =>
        println(s"Failed: ${exception.getMessage}")
    }
  }

  val topic = Topic("persistent://sample/standalone/ns2/b1")

  val producer = client.producer[TestMessage](ProducerConfig(topic))
  val consumerFn = client.consumer[TestMessage](ConsumerConfig(subscriptionName=Subscription("mysub"), topics=Seq(topic)))
//  consumerFn.seek(MessageId.earliest)

  producer.send(TestMessage("msg1", 100))
  receive(consumerFn, "1: received1")

  producer.close()
  consumerFn.close()
  client.close()
}

Looking at link you sent now.

colinbes avatar Dec 14 '20 18:12 colinbes

Which I assume pulsar itself is using.

You thinking the pulsar java library?

colinbes avatar Dec 14 '20 18:12 colinbes

Yep. I'd imagine it's looking for the JNI version and falling back. Hadoop and Avro do similar things for other JNI libraries.

On Mon, 14 Dec 2020 at 12:23, Colin Bester [email protected] wrote:

Which I assume pulsar itself is using.

You thinking the pulsar java library?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/sksamuel/pulsar4s/issues/256#issuecomment-744623702, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAFVSGTSHUDDDJWGRLC5NYLSUZJ3ZANCNFSM4U3EE7VQ .

sksamuel avatar Dec 14 '20 18:12 sksamuel