You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2022/05/10 18:04:54 UTC

[GitHub] [pulsar] nvmav opened a new issue, #15532: java.lang.NoClassDefFoundError: org/apache/pulsar/shade/com/google/common/primitives/Ints

nvmav opened a new issue, #15532:
URL: https://github.com/apache/pulsar/issues/15532

   
   I am trying to consume from pulsar topic. But, I am not able to consume. It is throwing NoClassDefFoundError. how can this be resolved?
   
   pulsar client version: 2.10 
   pulsar server version: 2.10 
   OS: Ubuntu 20.04.4 LTS
   installation type: standalone(not docker)
   java sdk version: 11 & 17
   
   consumer code: 
   
   ```
   private static void consumeFromPulsarAsync() throws Exception {
   
       logger.info("consumeFromPulsarAsync()");
   
       PulsarClient client = PulsarClient.
           builder()
           .serviceUrl("pulsar://localhost:6650")
           .build();
   
       logger.info("consumeFromPulsarAsync() client");
   
       Consumer<String> consumer = client.newConsumer(Schema.STRING)
           .topic("persistent://public/default/ack-2")
           .consumerName("pulsar-consumer-id-" + Math.random())
           .subscriptionName("pulsar-subscription-id-" + Math.random())
           .subscriptionType(SubscriptionType.Shared).subscribe();
   
       logger.info("consumeFromPulsarAsync() consumer");
   
       consumer.receiveAsync().thenCompose((msg) -> {
         logger.info("consumeFromPulsarAsync() consumed msg :: {}", msg.getValue());
         try {
           consumer.acknowledge(msg);
         } catch (PulsarClientException e) {
           throw new RuntimeException(e);
         }
         return null;
       });
     }
   ```
   
   schema for my topic:
   
   ```
   {
     "version": 0,
     "schemaInfo": {
       "name": "ack-2",
       "schema": "",
       "type": "STRING",
       "properties": {
         "env": "local"
       }
     }
   }
   ```
   
   I am seeing below error:
   
   ```
   2022-05-10 23:22:36,428 WARN  org.apache.pulsar.client.impl.MultiTopicsConsumerImpl        [] - Encountered error in partition auto update timer task for multi-topic consumer. Another task will be scheduled.
   java.lang.NoClassDefFoundError: org/apache/pulsar/shade/com/google/common/primitives/Ints
   	at org.apache.pulsar.shade.com.google.common.collect.Lists.computeArrayListCapacity(Lists.java:152) ~[477237be-607e-4d6e-94f3-3cdcfde7bd1b_my.work.manager-release-1.0-jar-with-dependencies.jar:?]
   	at org.apache.pulsar.shade.com.google.common.collect.Lists.newArrayListWithExpectedSize(Lists.java:192) ~[477237be-607e-4d6e-94f3-3cdcfde7bd1b_my.work.manager-release-1.0-jar-with-dependencies.jar:?]
   	at org.apache.pulsar.client.impl.MultiTopicsConsumerImpl$TopicsPartitionChangedListener.onTopicsExtended(MultiTopicsConsumerImpl.java:1238) ~[477237be-607e-4d6e-94f3-3cdcfde7bd1b_my.work.manager-release-1.0-jar-with-dependencies.jar:?]
   	at org.apache.pulsar.client.impl.MultiTopicsConsumerImpl$1.run(MultiTopicsConsumerImpl.java:1350) [477237be-607e-4d6e-94f3-3cdcfde7bd1b_my.work.manager-release-1.0-jar-with-dependencies.jar:?]
   	at org.apache.pulsar.shade.io.netty.util.HashedWheelTimer$HashedWheelTimeout.run(HashedWheelTimer.java:715) [477237be-607e-4d6e-94f3-3cdcfde7bd1b_my.work.manager-release-1.0-jar-with-dependencies.jar:?]
   	at org.apache.pulsar.shade.io.netty.util.concurrent.ImmediateExecutor.execute(ImmediateExecutor.java:34) [477237be-607e-4d6e-94f3-3cdcfde7bd1b_my.work.manager-release-1.0-jar-with-dependencies.jar:?]
   	at org.apache.pulsar.shade.io.netty.util.HashedWheelTimer$HashedWheelTimeout.expire(HashedWheelTimer.java:703) [477237be-607e-4d6e-94f3-3cdcfde7bd1b_my.work.manager-release-1.0-jar-with-dependencies.jar:?]
   	at org.apache.pulsar.shade.io.netty.util.HashedWheelTimer$HashedWheelBucket.expireTimeouts(HashedWheelTimer.java:790) [477237be-607e-4d6e-94f3-3cdcfde7bd1b_my.work.manager-release-1.0-jar-with-dependencies.jar:?]
   	at org.apache.pulsar.shade.io.netty.util.HashedWheelTimer$Worker.run(HashedWheelTimer.java:503) [477237be-607e-4d6e-94f3-3cdcfde7bd1b_my.work.manager-release-1.0-jar-with-dependencies.jar:?]
   	at org.apache.pulsar.shade.io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) [477237be-607e-4d6e-94f3-3cdcfde7bd1b_my.work.manager-release-1.0-jar-with-dependencies.jar:?]
   	at java.lang.Thread.run(Thread.java:829) [?:?]
   ```
   


-- 
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] tisonkun commented on issue #15532: java.lang.NoClassDefFoundError: org/apache/pulsar/shade/com/google/common/primitives/Ints

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

   Closed as stale. Cannot reproduce and I suspect it's other issues.


-- 
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


[GitHub] [pulsar] eolivelli commented on issue #15532: java.lang.NoClassDefFoundError: org/apache/pulsar/shade/com/google/common/primitives/Ints

Posted by GitBox <gi...@apache.org>.
eolivelli commented on issue #15532:
URL: https://github.com/apache/pulsar/issues/15532#issuecomment-1123204576

   Do you have other libraries in the claspath ?
   Which client are you using? pulsar-client (shaded) or pulsar-client-original (with explicit dependencies?)


-- 
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


[GitHub] [pulsar] tisonkun closed issue #15532: java.lang.NoClassDefFoundError: org/apache/pulsar/shade/com/google/common/primitives/Ints

Posted by "tisonkun (via GitHub)" <gi...@apache.org>.
tisonkun closed issue #15532: java.lang.NoClassDefFoundError: org/apache/pulsar/shade/com/google/common/primitives/Ints
URL: https://github.com/apache/pulsar/issues/15532


-- 
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


[GitHub] [pulsar] nvmav commented on issue #15532: java.lang.NoClassDefFoundError: org/apache/pulsar/shade/com/google/common/primitives/Ints

Posted by GitBox <gi...@apache.org>.
nvmav commented on issue #15532:
URL: https://github.com/apache/pulsar/issues/15532#issuecomment-1123210008

   @eolivelli This is my pulsar client library
   
   ```
       <dependency>
         <groupId>org.apache.pulsar</groupId>
         <artifactId>pulsar-client</artifactId>
         <version>2.10.0</version>
       </dependency>
   ```
   How do I check other libraries in classpath?
   
   
   


-- 
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


[GitHub] [pulsar] yxl1014 commented on issue #15532: java.lang.NoClassDefFoundError: org/apache/pulsar/shade/com/google/common/primitives/Ints

Posted by GitBox <gi...@apache.org>.
yxl1014 commented on issue #15532:
URL: https://github.com/apache/pulsar/issues/15532#issuecomment-1127326673

   If you use idea, project > external libraries > Maven: org apache. Pulsar: pulsar client: 2.10.0. Check whether the class causing the error is found. I speculate that there are other packages in Maven that cause this class not to be imported, which may be a version conflict.


-- 
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


[GitHub] [pulsar] github-actions[bot] commented on issue #15532: java.lang.NoClassDefFoundError: org/apache/pulsar/shade/com/google/common/primitives/Ints

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on issue #15532:
URL: https://github.com/apache/pulsar/issues/15532#issuecomment-1157154265

   The issue had no activity for 30 days, mark with Stale label.


-- 
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