title: Could not initialize class org.apache.pulsar.client.api.Schema When trying to create a pulsar producer in kotlin with dropwizard
body: <p>Hi i'm new to kotlin &amp; guice i've a problem to send some data to a pulsar so currently the solution flow as described, in the application file there's two modules one for pulsar client(pulsarModule) &amp; one for producer(pulsarProducerModule), pulsar module creates a pulsar client and binds it to a class &amp; i use guice to inject those.
  for pulsarModule it looks like this</p>
  <pre><code>class PulsarModule(
      private val config: Config
      ) : AbstractModule() {
  
      override fun configure() {
          bindPulsarConfig()
          bindPulsarClient()
      }
  
      private fun bindPulsarConfig() {
          bind(PulsarConfig::class.java).toInstance(config.getPulsarConfig())
      }
  
  
      private fun bindPulsarClient() {
          val pulsarClient = createPulsarClient()
          if (pulsarClient != null) {
              bind(PulsarClient::class.java).toInstance(pulsarClient)
          }
      }
  
      private fun createPulsarClient(): PulsarClient? {
       val serviceUrl = “pulsar://localhost:6650”
           return PulsarClientBuilder()
              .localPulsar(serviceUrl)
              .build()
      }
  </code></pre>
  <p>for pulsarProducer module it looks like this</p>
  <pre><code>class PulsarProducerModule : AbstractModule() {
      override fun configure() {
          bind(ClassProducer::class.java).to(ClassEventProducer::class.java).asEagerSingleton()
      }
  }
  </code></pre>
  <p>now class Producer is an interface</p>
  <pre><code>interface ClassProducer {
      @Throws(PulsarClientException::class)
      fun publishData(Data: Data)
  }
  </code></pre>
  <p>ClassEventProducer has the actual implementation</p>
  <pre><code>class ClassEventProducer @Inject constructor(
      private val config: PulsarConfig,
      pulsarClient: PulsarClient
  ) : ClassProducer {
      private val producerProvider = ProducerProvider(pulsarClient)
      @Throws(PulsarClientException::class)
      override fun publishData (Data: Data) {
          val producer: Producer&lt;ByteArray&gt; = producerProvider.getOrCreateProducer(
                                              config.topic,
                                              config.producerName)
          
      }
  
  }
  </code></pre>
  <p>now whenever that method is invoked i'm getting an error Could not initialize class org.apache.pulsar.client.api.Schema i'm not sure where to start looking for error is this because issue with my gradle or something else</p>