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 2021/03/04 16:05:40 UTC

[GitHub] [pulsar] TIBCOeddie opened a new issue #9806: AutoConsumeSchema NPE

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:
users@infra.apache.org



[GitHub] [pulsar] codelipenghui commented on issue #9806: AutoConsumeSchema NPE

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


   It should not throw NPE, the auto_consume schema only works for the struct schema such as Avro, Json. I labeled as release/2.7.2 to make sure this one can be fixed in the next release.


----------------------------------------------------------------
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] eolivelli commented on issue #9806: AutoConsumeSchema NPE

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


   This issue has been fixed in 2.8.0. we enhanced a lot the support for AutoConsumeSchema, now it is able to deal with every Schema and with topics without a Schema.
   
   Look for GenericObject related issues and PRs


-- 
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] eolivelli closed issue #9806: AutoConsumeSchema NPE

Posted by GitBox <gi...@apache.org>.
eolivelli closed issue #9806:
URL: https://github.com/apache/pulsar/issues/9806


   


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