IBM Support

A "Content not allowed in prolog" error message and WMSG0031E is received when WebSphere MQ JMS bindings are being used with WebSphere Process Server (WPS) or WebSphere Enterprise Service Bus (WESB)

Troubleshooting


Problem

A "Content not allowed in prolog" error is received when an MQ Java Message Service (JMS) binding parses an incoming message. The most common cause for this error is that a single connection factory resource is being shared between WebSphere MQ and WebSphere MQ JMS bindings scenarios.

Symptom

You see the following messages:

0000003b ServerSession W WMSG0031E: Exception processing JMS Message for MDB _export.JMSMQExportMQJMS, JMSDestination mq/testqueue: An error occurred while parsing native data: The error message is: commonj.connector.runtime.DataBindingException:

Caused By: commonj.connector.runtime.DataBindingException: commonj.connector.runtime.DataBindingException: commonj.connector.runtime.DataHandlerException: java.io.IOException: Error reading XML
at com.ibm.wsspi.sca.jms.data.JMSParsableNativeDataHolder.getBody
(JMSParsableNativeDataHolder.java:301)

You will also see the following messages in the stack trace:

Caused by: org.eclipse.emf.ecore.resource.Resource$IOWrappedException: Content is not allowed in prolog.

Cause

Although this error typically occurs due to incorrect message data, one additional possible cause for this message is the reuse of an MQ connection factory resource.

An MQ binding component requires an MQ connection factory to be configured with Service Component Architecture (SCA)-specific channel exits for correct data handling. If this same connection factory is reused for an MQ JMS binding component, these channel exits inhibit proper data handling and result in an error.

A single connection factory resource cannot be shared between MQ and MQ JMS bindings scenarios. View the Related URL for more information on the channel exits for MQ Binding.

Diagnosing The Problem

In the administrative console, examine the Resources >JMS > Connection Factories > [name of connection factory] >Custom Properties panel to see if channel exits are configured.

Resolving The Problem

To resolve this issue, complete the following steps:

  1. If channel exits are configured, either remove the extra channel exits in the existing connection factory or create a new connection factory (without the exits) specifically for the MQ JMS scenario.

  2. Restart the server for the changes to take effect.


If the error still exists, this issue indicates there is likely an error in your message data or format.

[{"Product":{"code":"SSQH9M","label":"WebSphere Process Server"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"Messaging","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF010","label":"HP-UX"},{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"},{"code":"PF033","label":"Windows"},{"code":"PF035","label":"z\/OS"},{"code":"PF012","label":"IBM i"}],"Version":"7.0.0.5;7.0.0.4;7.0.0.3;7.0.0.2;7.0.0.1;7.0;6.2.0.3;6.2.0.2;6.2.0.1;6.2;6.1.2.3;6.1.2.2;6.1.2.1;6.1.2;6.1.0.4;6.1.0.3;6.1.0.2;6.1.0.1;6.1","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}},{"Product":{"code":"SS7J6S","label":"WebSphere Enterprise Service Bus"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"JMS","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF010","label":"HP-UX"},{"code":"","label":"i5\/OS"},{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"},{"code":"PF033","label":"Windows"},{"code":"PF035","label":"z\/OS"}],"Version":"7.0;6.2;6.1.2;6.1;6.0.2","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}}]

Historical Number

36268;49R;000

Document Information

Modified date:
15 June 2018

UID

swg21424237