Forum Stats

  • 3,770,348 Users
  • 2,253,098 Discussions
  • 7,875,411 Comments

Discussions

NullPointerException in ActiveMQ due to Oracle AQ setting message headers to null

user12000104
user12000104 Member Posts: 3 Blue Ribbon

Hi,

I am sending messages via Oracle AQ on an Oracle Database 18c Enterprise Edition Release 18.0.0.0.0. An application server (Wildfly 18) running ActiveMQ (Apache Artemis 2.10.1) is set up consuming all the messages from the Oracel AQ.

While processing the messages I hit a NullPointerException when the message header JMSXGroupSeq is handled. Further investigations show that Oracle AQ is setting some headers to null by default for new messages. Here is a list of JMS headers of one of the messages I received:

JMS_OracleHeaderOnly=null,

JMSXUserID=null,

JMSXGroupSeq=null,

JMS_OracleOriginalMessageID=null,

JMS_OracleDelay=0,

JMSXAppID=null,

JMSXRcvTimestamp=1574267857226,

JMSXGroupID=null,

JMS_OracleDeliveryMode=null,

JMSXState=0,

JMSXDeliveryCount=1,

JMS_OracleConnectionID=null,

JMS_OracleExcpQ=null,

JMS_OracleTimestamp=1574267858226

Is this a desired behaviour? I would prefer not having some headers set automatically.

Additionally: Section 3.5.9 of both the JMS 2.0 & 1.1 specifications indicate that the JMSXGroupSeq property is of type int. An int is a primitive type and therefore should not be null. Based on this, using null is not compliant with the JMS specification.

Thanks for the support and kind regards

Michael Szodorai