Troubleshooting messaging client problems
This topic contains additional for diagnosing problems when using messaging within IBM WebSphere® sMash applications.
Unable to identify protocol
A common problem seen with the messaging protocol is to call
Connection.doPOST(String resourceName) for a value of resourceName
that is not defined in the /config/connection/destinations section of the
zero.config file.
The Connection API will throw a ConnectionException if the
protocol for the request is not identified by the application or in zero.config.
SEVERE [ CWPZC1124E: Unable to identify protocol for request. Request target: queue1 ] zero.core.connection.ConnectionException: Unable to identify protocol for request. Request target:queue1 at zero.core.connection.engine.TransportFactory.getTransport(...
Messaging exceptions received by the client application
If a messaging exception is thrown when client application is using the messaging protocol,
the Connection API will throw a ConnectionException to the application with
a javax.jms.JMSException as the cause.
This exception can be addressed by calling the getCause() method of the ConnectionException.
The text of the javax.jms.JMSException may be useful in diagnosing the problem
but in some cases the linked exception contained within the javax.jms.JMSException
may also be required.
The linked exception can be addressed by calling the getLinkedException()
method of the javax.jms.JMSException.
Some common situations which can be diagnosed from the javax.jms.JMSException
and any linked exception are listed below.
Exceeding the maximum message size
If an application attempts to send a message which is larger than the maximum message size
configured for the messaging broker,
a MqttNegativeAckException will be thrown with a reason code of 4.
Example exception:
javax.jms.JMSException: An exception thrown while sending the message by MqttProducer for clientId
E1211212817546-1-18916478 connected to MicroBroker tls://localhost:9091.
at com.ibm.msg.client.mqtt.internal.ProviderMessageProducerMqttImpl.send(...
at com.ibm.msg.client.jms.internal.JmsMessageProducerImpl.sendMessage(...
...
Example linked exception:
com.ibm.mqttclient.v4.base.MqttNegativeAckException: (Reason code=4)
....
Exceeding the maximum queue depth
The specific exception that is thrown when an application attempts to send a message to a queue which
has already reached its maximum depth depends on whether the session is transacted or not.
However, in each case, the linked exception will be a
MqttNegativeAckException with a reason code of 400.
Example exception for a transacted session:
javax.jms.JMSException: Commit failed on session.
at com.ibm.msg.client.mqtt.internal.ProviderSessionMqttImpl.commit(...
at com.ibm.msg.client.jms.internal.JmsSessionImpl.commitTransaction(...
...
Example exception for a non-transacted session:
javax.jms.JMSException: An exception thrown while sending the message by MqttProducer for clientId
E1211209604787-1-18916478 connected to MicroBroker tls://localhost:9091.
at com.ibm.msg.client.mqtt.internal.ProviderMessageProducerMqttImpl.send(...
at com.ibm.msg.client.jms.internal.JmsMessageProducerImpl.sendMessage(...
...
Example linked exception:
com.ibm.mqttclient.v4.base.MqttNegativeAckException: (Reason code=400)
...
Messaging request timeouts
If a client application does not receive a response to a messaging request within
a specified amount of time,
a MqttNegativeAckException will be thrown with a reason code of 5.
Timeouts can occur under situations of heavy load or when working with very large messages.
The timeout for an individual connection to the broker can be set using the deliveryTimeout
broker connection property.