Troubleshooting
Problem
When an Import component that has a WebSphere MQ binding receives a business object that has control characters or illegal XML characters, the business object is not processed and errors occur.
Symptom
When the Import component receives business objects of type string that have control characters, the business object is not processed, and the following exception is returned:
java.lang.RuntimeException: An invalid XML character (Unicode: 0x1d) was found in the element content:CCCC DDDD EEEE
at org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl$Escape.convertText(XMLSaveImpl.java:3101)
at org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.getDatatypeValue(XMLSaveImpl.java:2758)
at
com.ibm.ws.bo.bomodel.util.BOXMLSaveImpl.getDatatypeValue(BOXMLSaveImpl.java:232)
at
com.ibm.ws.bo.bomodel.util.BOXMLSaveImpl.getTrueType(BOXMLSaveImpl.java:569)at
com.ibm.ws.bo.bomodel.util.BOXMLSaveImpl.saveElement(BOXMLSaveImpl.java:251)at
com.ibm.ws.bo.bomodel.util.BOXMLSaveImpl.saveDataTypeElementSingle(BOXMLSaveImpl.java:239)
at
org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.saveFeatures(XMLSaveImpl.java:1366)
at
com.ibm.ws.bo.bomodel.util.BOXMLSaveImpl.saveFeatures(BOXMLSaveImpl.java:651)
at
org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.saveElementID(XMLSaveImpl.java:2458)
at
com.ibm.ws.bo.bomodel.util.BOXMLSaveImpl.saveElement(BOXMLSaveImpl.java:211) at
org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.saveElement(XMLSaveImpl.java:918)
The following exception occurs when business objects are of type hexBinary:
Caused by: org.eclipse.emf.ecore.xml.type.InvalidDatatypeValueException: Invalid hexBinary value: 'CCCC DDDD EEEE '
at
com.ibm.ws.bo.xmlmodel.impl.BOTypeFactoryImpl.createHexBinaryFromString(BOTypeFactoryImpl.java:1479)
at com.ibm.ws.bo.xmlmodel.impl.BOTypeFactoryImpl.createFromString(BOTypeFactoryImpl.java:154)
at com.ibm.ws.bo.bomodel.util.BOUtil.getSetValue(BOUtil.java:3114)
at com.ibm.ws.bo.bomodel.util.BOUtil.convert(BOUtil.java:221)
at com.ibm.ws.bo.bomodel.util.BOUtil.getSetValue(BOUtil.java:200)
at
com.ibm.ws.bo.bomodel.impl.DynamicBusinessObjectImpl.eDynamicSet(DynamicBusinessObjectImpl.java:464)
at
org.eclipse.emf.ecore.impl.BasicEObjectImpl.eSet(BasicEObjectImpl.java:683)
at
org.eclipse.emf.ecore.impl.BasicEObjectImpl.eSet(BasicEObjectImpl.java:654)
at com.ibm.ws.bo.bomodel.util.BOUtil.set(BOUtil.java:803)
at com.ibm.ws.bo.bomodel.util.BOUtil.setString(BOUtil.java:3012)
at
com.ibm.ws.bo.bomodel.impl.DynamicBusinessObjectImpl.setString(DynamicBusinessObjectImpl.java:1058)
at
com.ibm.wbiserver.datahandler.fixedwidth.FixedWidthDataHandler.
parseSimpleType(FixedWidthDataHandler.java:458)
Cause
This is the structure of the business object. The business object is populated with the following data:
field1 = AAAAA
field2 = BBBBB
field3 = CCCC DDDD EEEE (This field has three control characters (0x1D)).
The problem occurs when the SCALazyParsing call is invoked on the import:
com.ibm.ws.sca.internal.message.util.SCALazyParsingMessageUtil.
getSerializedSCABody(SCALazyParsingMessageUtil.java:127)
The SCALazyParsing component ignores the invalid characters in the data if the data itself is not used or processed, and no error is reported by the Service Component Architecture (SCA). In the case of an import artifact, the data is parsed to an XML, and the SCALazyParsing call reports the error. When using a business object field of type string, the SCA does not accept characters other than the XML character set. The value 0x1d is not expected when using type string. The Eclipse Modelling Framework (EMF) applies this restriction to any XML 1.0 document, which is shown in the following stack trace:
org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl$Escape.convertText(XMLSaveImpl.java:3101)
When using type hexBinary for the business object attributes, the InvalidDatatypeValueException exception is returned again because of the restrictions and limitations from the EMF:
Caused by: org.eclipse.emf.ecore.xml.type.InvalidDatatypeValueException.
Resolving The Problem
This is not a WebSphere Process Server problem but rather a known limitation. Redesign the application to avoid the use of invalid XML characters.
Related Information
Was this topic helpful?
Document Information
Modified date:
23 June 2018
UID
swg21406233