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

          exabrial created issue -
          kenaiadmin made changes -
          Field Original Value New Value
          issue.field.bugzillaimportkey 12564 44168
          Jill Sato made changes -
          Fix Version/s 4.0 [ 10970 ]
          Fix Version/s 3.2 [ 10969 ]
          Nigel Deakin made changes -
          Link This issue depends on MQ-165 [ MQ-165 ]
          Nigel Deakin made changes -
          Fix Version/s 4.0.1 [ 16061 ]
          Fix Version/s 4.0 [ 10970 ]
          Romain Grécourt made changes -
          Fix Version/s 4.1 [ 16387 ]
          Fix Version/s 4.0.1 [ 16061 ]

            People

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

              Dates

              • Created:
                Updated: