Uploaded image for project: 'Kafka'
  1. Kafka
  2. KAFKA-2105

NullPointerException in client on MetadataRequest

Agile BoardAttach filesAttach ScreenshotVotersStop watchingWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 0.8.2.1
    • Fix Version/s: 0.11.0.1, 1.0.0
    • Component/s: clients
    • Labels:
      None

      Description

      With the new producer, if you accidentally pass null to KafkaProducer.partitionsFor(null), it will cause the IO thread to throw NPE.

      Uncaught error in kafka producer I/O thread:
      java.lang.NullPointerException
      at org.apache.kafka.common.utils.Utils.utf8Length(Utils.java:174)
      at org.apache.kafka.common.protocol.types.Type$5.sizeOf(Type.java:176)
      at org.apache.kafka.common.protocol.types.ArrayOf.sizeOf(ArrayOf.java:55)
      at org.apache.kafka.common.protocol.types.Schema.sizeOf(Schema.java:81)
      at org.apache.kafka.common.protocol.types.Struct.sizeOf(Struct.java:218)
      at org.apache.kafka.common.requests.RequestSend.serialize(RequestSend.java:35)
      at org.apache.kafka.common.requests.RequestSend.<init>(RequestSend.java:29)
      at org.apache.kafka.clients.NetworkClient.metadataRequest(NetworkClient.java:369)
      at org.apache.kafka.clients.NetworkClient.maybeUpdateMetadata(NetworkClient.java:391)
      at org.apache.kafka.clients.NetworkClient.poll(NetworkClient.java:188)
      at org.apache.kafka.clients.producer.internals.Sender.run(Sender.java:191)
      at org.apache.kafka.clients.producer.internals.Sender.run(Sender.java:122)
      at java.lang.Thread.run(Thread.java:745)

        Attachments

          Activity

            People

            • Assignee:
              omkreddy Manikumar
              Reporter:
              theduderog Roger Hoover
              Reviewer:
              Gwen Shapira

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment