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 2020/05/19 06:31:41 UTC

[GitHub] [pulsar] iitsoftware opened a new issue #6982: pulsar-client-all jar file misses dependencies

iitsoftware opened a new issue #6982:
URL: https://github.com/apache/pulsar/issues/6982


   This is the fat jar file for a pulsar client. It misses these dependencies:
   
   - `org.lz4-lz4-java-1.5.0`
   - `org.apache.pulsar-protobuf-shaded-2.1.0-incubating`
   - `org.apache.pulsar-pulsar-client-api-2.5.1`
   
   Might be there are more missing, i.e., the bouncy castle jars when using TLS. 
   
   The `pulsar-client-all.jar` should include everything I need to run a pulsar client.


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

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



[GitHub] [pulsar] iitsoftware edited a comment on issue #6982: pulsar-client-all jar file misses dependencies

Posted by GitBox <gi...@apache.org>.
iitsoftware edited a comment on issue #6982:
URL: https://github.com/apache/pulsar/issues/6982#issuecomment-631259467


   Here is the code:
   
   ```
   package de.iit;
   
   import org.apache.pulsar.client.api.Producer;
   import org.apache.pulsar.client.api.PulsarClient;
   import org.apache.pulsar.client.api.Schema;
   
   public class Main {
   
       public static void main(String[] args) {
           try {
               PulsarClient client = PulsarClient.builder()
                       .serviceUrl("pulsar://localhost:6650")
                       .build();
               Producer<String> producer = client.newProducer(Schema.STRING)
                       .topic("my-topic")
                       .create();
               producer.send("My message");
               producer.close();
               client.close();
           } catch(Exception e) {
               e.printStackTrace();
           }
       }
   }
   
   
   ```
   Run with pulsar-client-all only:
   
   `java -cp classes:lib/pulsar-client-all-2.5.1.jar de.iit.Main
   Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/pulsar/client/api/PulsarClient
   `
   
   Add pulsar-client-api:
   
   `java -cp classes:lib/pulsar-client-all-2.5.1.jar:lib/org.apache.pulsar-pulsar-client-api-2.5.1.jar de.iit.Main
   Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/pulsar/shaded/com/google/protobuf/v241/UninitializedMessageException
   `
   
   Add protobuf:
   
   `java -cp classes:lib/pulsar-client-all-2.5.1.jar:lib/org.apache.pulsar-pulsar-client-api-2.5.1.jar:lib/org.apache.pulsar-protobuf-shaded-2.1.0-incubating.jar de.iit.Main
   Exception in thread "main" java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory
   `
   
   And so on... You should actually be able to check the content of pulsar-client-all yourself:
   
   `jar tvf pulsar-client-all-2.5.1.jar`
   
   And yes, I'm using the latest 2.5.1.
   


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

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



[GitHub] [pulsar] iitsoftware commented on issue #6982: pulsar-client-all jar file misses dependencies

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


   The issue still exists in 2.6.1. There seems also a memory leak. When I stop/start a Pulsar consumer, it consumes 100 MB without releasing it.


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

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



[GitHub] [pulsar] jiazhai commented on issue #6982: pulsar-client-all jar file misses dependencies

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


   @iitsoftware Are you using 2.5.1 version? How do you identified these 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.

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



[GitHub] [pulsar] iitsoftware commented on issue #6982: pulsar-client-all jar file misses dependencies

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


   Here is the code:
   
   `package de.iit;
   
   import org.apache.pulsar.client.api.Producer;
   import org.apache.pulsar.client.api.PulsarClient;
   import org.apache.pulsar.client.api.Schema;
   
   public class Main {
   
       public static void main(String[] args) {
           try {
               PulsarClient client = PulsarClient.builder()
                       .serviceUrl("pulsar://localhost:6650")
                       .build();
               Producer<String> producer = client.newProducer(Schema.STRING)
                       .topic("my-topic")
                       .create();
               producer.send("My message");
               producer.close();
               client.close();
           } catch(Exception e) {
               e.printStackTrace();
           }
       }
   }`
   
   Run with pulsar-client-all only:
   
   `java -cp classes:lib/pulsar-client-all-2.5.1.jar de.iit.Main
   Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/pulsar/client/api/PulsarClient
   `
   
   Add pulsar-client-api:
   
   `java -cp classes:lib/pulsar-client-all-2.5.1.jar:lib/org.apache.pulsar-pulsar-client-api-2.5.1.jar de.iit.Main
   Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/pulsar/shaded/com/google/protobuf/v241/UninitializedMessageException
   `
   
   Add protobuf:
   
   `java -cp classes:lib/pulsar-client-all-2.5.1.jar:lib/org.apache.pulsar-pulsar-client-api-2.5.1.jar:lib/org.apache.pulsar-protobuf-shaded-2.1.0-incubating.jar de.iit.Main
   Exception in thread "main" java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory
   `
   
   And so on... You should actually be able to check the content of pulsar-client-all yourself:
   
   `jar -t pulsar-client-all-2.5.1.jar`
   
   And yes, I'm using the latest 2.5.1.
   


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

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



[GitHub] [pulsar] iitsoftware edited a comment on issue #6982: pulsar-client-all jar file misses dependencies

Posted by GitBox <gi...@apache.org>.
iitsoftware edited a comment on issue #6982:
URL: https://github.com/apache/pulsar/issues/6982#issuecomment-695762745


   The issue still exists in 2.6.1. 
   
   `Access to host class org.apache.pulsar.client.api.AuthenticationFactory is not allowed or does not exist.`
   
   There seems also be a memory leak. When I stop/start a Pulsar consumer, it consumes 100 MB without releasing it.


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

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