You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by "avinash-fk (via GitHub)" <gi...@apache.org> on 2023/05/07 23:59:18 UTC

[GitHub] [pulsar-adapters] avinash-fk opened a new issue, #50: Shaded client throw NoSuchMethodError when using a http url for bootstrap servers

avinash-fk opened a new issue, #50:
URL: https://github.com/apache/pulsar-adapters/issues/50

   **Describe the bug**
   
   When using the shaded kafka pulsar adapter with HTTP URL for bootstrap.servers, results in the following error
   
   ```java
   Exception in thread "main" java.lang.NoSuchMethodError: org.asynchttpclient.DefaultAsyncHttpClientConfig$Builder.setEventLoopGroup(Lorg/apache/pulsar/shade/io/netty/channel/EventLoopGroup;)Lorg/asynchttpclient/DefaultAsyncHttpClientConfig$Builder;
   	at org.apache.pulsar.client.impl.HttpClient.<init>(HttpClient.java:158)
   	at org.apache.pulsar.client.impl.HttpLookupService.<init>(HttpLookupService.java:67)
   	at org.apache.pulsar.client.impl.PulsarClientImpl.<init>(PulsarClientImpl.java:207)
   	at org.apache.pulsar.client.impl.PulsarClientImpl.<init>(PulsarClientImpl.java:154)
   	at org.apache.pulsar.client.impl.ClientBuilderImpl.build(ClientBuilderImpl.java:63)
   	at org.apache.kafka.clients.producer.KafkaProducer.<init>(KafkaProducer.java:151)
   	at org.apache.kafka.clients.producer.KafkaProducer.<init>(KafkaProducer.java:106)
   	at com.flipkart.viesti.producer.KafkaProducerClient.<init>(KafkaProducerClient.java:41)
   	at com.flipkart.viesti.producer.ProducerMain$SyncProduce.singleThreaded(ProducerMain.java:32)
   	at com.flipkart.viesti.producer.ProducerMain.main(ProducerMain.java:19)
   ```
   
   Looks like async HTTP client is not part of the shaded jar and netty included in leading to this issue.
   
   **To Reproduce**
   Run a producer or consumer with the shaded version of the adapter as the dependency.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [pulsar-adapters] tisonkun commented on issue #50: Shaded client throw NoSuchMethodError when using a http url for bootstrap servers

Posted by "tisonkun (via GitHub)" <gi...@apache.org>.
tisonkun commented on issue #50:
URL: https://github.com/apache/pulsar-adapters/issues/50#issuecomment-1593967586

   Hi @avinash-fk, Thanks for reporting this issue!
   
   May I ask what version of pulsar-client did you use?
   
   I notice that `org.asynchttpclient` is relocated to `org.apache.pulsar.shade.org.asynchttpclient`. Maybe you can ensure that class is imported? From you log it seems the original one is imported that can be the cause.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org