Technote (troubleshooting)
Problem(Abstract)
If you use the MQ binding to read data from MQ, when you parse the business objects in the message, you might see a "org.eclipse.emf.ecore.resource.Resource$IOWrappedException: Content is not allowed in prolog." message in the log files.
Symptom
The following exception is thrown in the log files or FFDC file:
com.ibm.ws.sca.databinding.impl.DataBindingImplXML com.ibm.ws.sca.databinding.impl.DataBindingImplXML#002 Exception:
java.io.IOException: Error reading XML
at com.ibm.ws.bo.service.BOXMLSerializerImpl.load(BOXMLSerializerImpl.java:271)
at com.ibm.ws.bo.service.BOXMLSerializerImpl.readXMLDocumentWithOptions(BOXMLSerializerImpl.java:509)
at com.ibm.ws.sca.internal.sdo.impl.BOXMLSerializerDelegatorImpl.load(BOXMLSerializerDelegatorImpl.java:95)
at com.ibm.ws.sca.internal.sdo.impl.XMLFileServiceImpl.load(XMLFileServiceImpl.java:329)
at com.ibm.wsspi.sca.sdo.XMLFileService$1.load(XMLFileService.java:70)
at com.ibm.ws.sca.databinding.impl.DataBindingImplXML.read(DataBindingImplXML.java:226)
at com.ibm.websphere.sca.mq.data.impl.MQDataBindingImplXML.parseNativeData(MQDataBindingImplXML.java:242)
at com.ibm.websphere.sca.mq.data.impl.MQDataBindingImplXML.getDataObject(MQDataBindingImplXML.java:215)
.............
Caused by: org.eclipse.emf.ecore.resource.Resource$IOWrappedException: Content is not allowed in prolog.
at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl.java:199)
at org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doLoad(XMLResourceImpl.java:179)
at org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(ResourceImpl.java:1094)
at com.ibm.ws.bo.bomodel.util.SerializerUtil$2.run(SerializerUtil.java:171)
at java.security.AccessController.doPrivileged(AccessController.java:246)
at com.ibm.ws.bo.bomodel.util.SerializerUtil.privilegedLoad(SerializerUtil.java:162)
at com.ibm.ws.bo.service.BOXMLSerializerImpl.load(BOXMLSerializerImpl.java:266)
... 38 more
Caused by: org.xml.sax.SAXParseException: Content is not allowed in prolog.
at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
at org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLScanner.reportFatalError(Unknown Source)
at org.apache.xerces.impl.XMLDocumentScannerImpl$PrologDispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl.parse(Unknown Source)
at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl.java:179)
... 44 more
Cause
This message can be the result of one of the following issues:
- There is unreachable code in the body of the business objects.
- There is a business object encoding problem.
Resolving the problem
To solve the problem, ensure that unreachable characters do not exist in the body of the business objects. Also, ensure that the business object encoding is consistent with the encoding that you use to parse them.
Rate this page:
Copyright and trademark information
IBM, the IBM logo and ibm.com are trademarks of International Business Machines Corp., registered in many jurisdictions worldwide. Other product and service names might be trademarks of IBM or other companies. A current list of IBM trademarks is available on the Web at "Copyright and trademark information" at www.ibm.com/legal/copytrade.shtml.