Uploaded image for project: 'Flume'
  1. Flume
  2. FLUME-2966

NULL text in a TextMessage from a JMS source in Flume can lead to NPE

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.5.0
    • 1.7.0
    • None
    • None

    Description

      Code at https://github.com/apache/flume/blob/trunk/flume-ng-sources/flume-jms-source/src/main/java/org/apache/flume/source/jms/DefaultJMSMessageConverter.java#L103 does not check for a NULL text in a TextMessage from a Flume JMS source. This can lead to a NullPointerException here:

      textMessage.getText().getBytes(charset)

      while trying to de-reference a null text from the textmessage.

      We should probably skip these like the NULL Objects in the ObjectMessage just below at: https://github.com/apache/flume/blob/trunk/flume-ng-sources/flume-jms-source/src/main/java/org/apache/flume/source/jms/DefaultJMSMessageConverter.java#L107.

      Attachments

        1. FLUME-2966-0.patch
          3 kB
          Siddharth Ahuja
        2. App.java
          4 kB
          Siddharth Ahuja
        3. FLUME-2966-1.patch
          3 kB
          Siddharth Ahuja

        Activity

          People

            sahuja Siddharth Ahuja
            sahuja Siddharth Ahuja
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: