• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Liutauras Vilda
  • Paul Clapham
  • paul wheaton
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Piet Souris
  • Mike London

Large message while testing MDB locally - MQJE001: Completion Code 2, Reason 2031

Ranch Hand
Posts: 160
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Am having a small problem while testing a MDB locally on WSAD v5.1.2 on Win 2K.

I chose the "MQ Simulator for Java Developers" in my local Websphere v5.1 Test environment. I have the MQ message stored in a local file (4 MB) and a test servlet reads this file and puts it onto a local queue. While doing this, I am getting the following error:

Are there any size limitations on the message for the local JMS simulator? If yes, is it a configurable parameter?

Thanks in advance

Ranch Hand
Posts: 82
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
you must read the exception.

If you are trying to code j2ee components with MQ you must at least understand how to read the exception from here out so you can be successful and please refer to the Websphere manuals afterwards.

the exception clearly says Comp Code 2, Reason code 2031. Therefore...

An MQPUT or MQPUT1 call was issued to put a message on a queue, but the message was
too long for the queue manager and MQMF_SEGMENTATION_ALLOWED was not specified
in the MsgFlags field in MQMD. If segmentation is not allowed, the length of the message
cannot exceed the lesser of the queue and queue-manager MaxMsgLength attributes.
This reason code can also occur when MQMF_SEGMENTATION_ALLOWED is specified, but
the nature of the data present in the message prevents the queue manager splitting it into
segments that are small enough for the queue-manager limit:
v For a user-defined format, the smallest segment that the queue manager can create is 16
v For a built-in format, the smallest segment that the queue manager can create depends on
the particular format, but is greater than 16 bytes in all cases other than MQFMT_STRING
(for MQFMT_STRING the minimum segment size is 16 bytes).
MQRC_MSG_TOO_BIG_FOR_Q_MGR can also occur in the Feedback field in the message
descriptor of a report message; in this case it indicates that the error was encountered by a
message channel agent when it attempted to put the message on a remote queue.
This reason also occurs if a channel, through which the message is to pass, has restricted the
maximum message length to a value that is actually less than that supported by the queue
manager, and the message length is greater than this value.
On z/OS, this return code is issued only if you are using CICS for distributed queuing.
Otherwise, MQRC_MSG_TOO_BIG_FOR_CHANNEL is issued.
Corrective action: Check whether the BufferLength parameter is specified correctly; if it is, do
one of the following:
v Increase the value of the queue-manager �s MaxMsgLength attribute; the queue�s MaxMsgLength
attribute may also need increasing.
v Break the message into several smaller messages.
v Specify MQMF_SEGMENTATION_ALLOWED in the MsgFlags field in MQMD; this will
allow the queue manager to break the message into segments.
v Check the channel definitions.

fix it accordingly and you are set to go. Good luck to you
[ September 02, 2006: Message edited by: david lightman ]
    Bookmark Topic Watch Topic
  • New Topic