glassfish
  1. glassfish
  2. GLASSFISH-12564

Cannot set null string property on Object Message

    Details

    • Type: Bug Bug
    • Status: Reopened
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: v3.0.1
    • Fix Version/s: 4.1.1
    • Component/s: jms
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: All

      Description

      glassfish v3.0.1
      sun jdk 1.6.0_20
      windows xp 32bit

      The JMS Message interface javadoc states that null is valid value for a string
      property on a message.

      If you invoke this code in a stateless ejb, you receive the stack trace below

      Connection connection = connectionFactory.createConnection();
      Session session = connection.createSession(true, Session.AUTO_ACKNOWLEDGE);
      MessageProducer producer = session.createProducer(destination);
      ObjectMessage message = session.createObjectMessage();
      message.setObject(new Object());
      message.setStringProperty("aStringProperty", null);

      Caused by: java.lang.NullPointerException
      at
      com.sun.messaging.jms.ra.DirectPacket._checkAndSetProperty(DirectPacket.java:157
      9)
      at
      com.sun.messaging.jms.ra.DirectPacket.setStringProperty(DirectPacket.java:1390)

        Issue Links

          Activity

          Hide
          Nigel Deakin added a comment -

          This does seem a valid complaint, though as it's a spec misinterpretation rather
          than a bug, and MQ has almost certainly had this behaviour for many years,
          fixing it can't be considered a priority for 3.1.

          I'm leaving this as a P3 priority, but deferring it until 3.2 (MQ 4.6).

          Show
          Nigel Deakin added a comment - This does seem a valid complaint, though as it's a spec misinterpretation rather than a bug, and MQ has almost certainly had this behaviour for many years, fixing it can't be considered a priority for 3.1. I'm leaving this as a P3 priority, but deferring it until 3.2 (MQ 4.6).
          Hide
          vladchuk added a comment -

          Why is this not being addressed in 3.1.2? It seems that 3.2 has been abandoned (superseded by 4.0) and 4.0 is far away.
          Please consider fixing it in 3.1.2.

          Show
          vladchuk added a comment - Why is this not being addressed in 3.1.2? It seems that 3.2 has been abandoned (superseded by 4.0) and 4.0 is far away. Please consider fixing it in 3.1.2.
          Hide
          exabrial added a comment -

          any chance this could be fixed in 3.1.2? I can't imagine this is a difficult fix.

          Show
          exabrial added a comment - any chance this could be fixed in 3.1.2? I can't imagine this is a difficult fix.
          Hide
          Nigel Deakin added a comment -

          I've logged MQ-165 and made this issue dependent on it.

          Show
          Nigel Deakin added a comment - I've logged MQ-165 and made this issue dependent on it.
          Hide
          Nigel Deakin added a comment -

          In accordance with the project triage guidelines this is not needed for 4.0 and so has been deferred until 4.0.1. Setting "fix version" accordingly.

          Show
          Nigel Deakin added a comment - In accordance with the project triage guidelines this is not needed for 4.0 and so has been deferred until 4.0.1. Setting "fix version" accordingly.

            People

            • Assignee:
              Nigel Deakin
              Reporter:
              exabrial
            • Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated: