TIBCOeddie opened a new issue #9806:
URL: https://github.com/apache/pulsar/issues/9806


   **Describe the bug**
   NPE seen by the client when it tried to use AUTO_CONSUME against a topic
   
   > (fragment deploy): 2021-03-03 21:28:38.154000-0500 
[15819:OperatorThread(default.Java:1)] ERROR 
pulsar.PulsarConsumer.default.Java: Fatal error
   > (fragment deploy): java.lang.NullPointerException: null
   > (fragment deploy): at 
org.apache.pulsar.client.impl.schema.AutoConsumeSchema.generateSchema(AutoConsumeSchema.java:154)
   > (fragment deploy): at 
org.apache.pulsar.client.impl.schema.AutoConsumeSchema.decode(AutoConsumeSchema.java:91)
   > (fragment deploy): at 
org.apache.pulsar.client.impl.schema.AutoConsumeSchema.decode(AutoConsumeSchema.java:40)
   > (fragment deploy): at 
org.apache.pulsar.client.impl.MessageImpl.getValue(MessageImpl.java:301)
   
   **To Reproduce**
   Consumer created this way:
   ```
   pulsarConsumer = 
pulsarClient.newConsumer(org.apache.pulsar.client.api.Schema.AUTO_CONSUME())
                                        .topic(getTopic())
                                        
.subscriptionName(UUID.randomUUID().toString())
                                        .subscribe();
   ...
   Message<GenericRecord> message = pulsarConsumer.receive(5, TimeUnit.SECONDS);
   if (message == null) continue;
   GenericRecord record = message.getValue(); <-- NPE inside
   ```
   
   **Expected behavior**
   No NPE. If there's some configuration that could have been done better, the 
error should identify it.
   
   **Additional context**
   Java client 2.7.0
   


----------------------------------------------------------------
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:
[email protected]


Reply via email to