我们正面临一个棘手的问题,希望有人可以就如何解决此问题提供建议。
我们在日志记录中遇到以下XMSException:
IBM.XMS.XMSException: CWSMQ0282E: A null value has been used for argument BUFFER = <> NULL within method ImportMQMDMesageBuffer(WmqSession, WmqDestination, MQMD,byte[],int,int).
The preceding method detected an invalid null argument.
If necessary, recode the application to avoid the error condition.
at IBM.XMS.Client.WMQ.WmqReceiveMarshal.ImportMQMDMesageBuffer(MQMessageDescriptor mqmd, Byte[] buffer, Int32 dataStart, Int32 dataEnd)
at IBM.XMS.Client.WMQ.WmqAsyncConsumerShadow.Consumer(Phconn hconn, MQMessageDescriptor mqmd, MQGetMessageOptions mqgmo, Byte[] pBuffer, MQCBC mqcbc)
at IBM.WMQ.Nmqi.UnmanagedNmqiMQ.NmqiConsumerMethodUM(Int32 hconn, IntPtr structMqmd, IntPtr structMqgmo, IntPtr buffer, IntPtr structMqcbc)
此XMSException之后,Windows服务崩溃。困难的部分是我们无法在开发环境中重现此行为。我们仍在进行故障排除,找不到导致此问题的根本原因。
下面您可以找到有关我们如何建立联系的信息:
使用的版本:IBM.XMS 8.0.0.5
以这种方式创建连接:
XMSFactoryFactory factory = XMSFactoryFactory.GetInstance(XMSC.CT_WMQ);
IConnectionFactory cf = factory.CreateConnectionFactory();
cf.SetIntProperty(XMSC.WMQ_CONNECTION_MODE, XMSC.WMQ_CM_CLIENT_UNMANAGED);
cf.SetStringProperty(XMSC.WMQ_HOST_NAME, hostname);
cf.SetStringProperty(XMSC.WMQ_PORT, port);
cf.SetStringProperty(XMSC.WMQ_CHANNEL, channelname);
cf.SetStringProperty(XMSC.WMQ_QUEUE_MANAGER, qmname);
IConnection connection = cf.CreateConnection();
会话是通过以下方式创建的:
ISession session = connection.CreateSession(false, AcknowledgeMode.AutoAcknowledge);
目标是通过以下方式创建的:
destination = session.CreateQueue("queuename");
destination.SetIntProperty(XMSC.WMQ_MESSAGE_BODY, XMSC.WMQ_MESSAGE_BODY_MQ);
destination.SetBooleanProperty(XMSC.WMQ_MQMD_WRITE_ENABLED, true);
destination.SetBooleanProperty(XMSC.WMQ_MQMD_READ_ENABLED, true);
侦听器是通过以下方式创建的:
IMessageConsumer consumer = session.CreateConsumer(destination);
consumer.MessageListener = listenerDelegate;
几年前,同样的XMSException
也被问到here。我看到他们为此问题打开了PMR,但是没有任何更新...
答案 0 :(得分:1)
2019年3月28日,IBM发布了一个APAR,它似乎与您所报告的问题完全匹配。
IT28062: While getting an empty message, XMS .Net applications reports CWSMQ0282E and crash.
不幸的是,当前的任何MQ版本(截至3月29日)均未包含APAR。您将需要等待包含该APAR的发行版发布,或者让您的客户端打开PMR并要求他们针对您所使用的MQ版本针对该APAR的IFIX。
APAR的目标是以下维护级别,我还从IBM MQ planned maintenance release dates添加了每个级别的目标日期。
Version Maintenance Level Planned Release Date
v8.0 8.0.0.12 2Q 2019
v9.0 LTS 9.0.0.7 2Q 2019
v9.1 LTS 9.1.0.3 Not noted yet, 9.1.0.2 is targeted for 2Q 2019
v9.1 CD 9.1.3 CD releases historically have been between
2 and 6 months apart.
9.1.2 was released March 21 2019.