Unknown attibute causes StackOverflowError in XMLHelper.load() --------------------------------------------------------------
Key: TUSCANY-2236 URL: https://issues.apache.org/jira/browse/TUSCANY-2236 Project: Tuscany Issue Type: Bug Components: Java SDO Implementation Affects Versions: Java-SDO-Next Reporter: Raymond Feng With this XSD: <xs:schema xmlns:ax21="http://types.move.ec3/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://types.move.ec3/xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:complexType name="Comment"> <xs:sequence> <xs:element minOccurs="0" name="body" nillable="true" type="xs:string" /> <xs:element minOccurs="0" name="caption" nillable="true" type="xs:string" /> <xs:element minOccurs="0" name="entryId" nillable="true" type="xs:string" /> <xs:element minOccurs="0" name="owner" nillable="true" type="xs:string" /> <xs:element minOccurs="0" name="reference" nillable="true" type="xs:string" /> <xs:element minOccurs="0" name="tstamp" nillable="true" type="xs:dateTime" /> </xs:sequence> </xs:complexType> </xs:schema> And this XML: <ns:return xmlns:ns="http://services.move.ec3" xmlns:ax21="http://types.move.ec3/xsd" xmlns:_typens_="http://types.move.ec3/xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" type="ec3.move.types.Comment" xsi:type="_typens_:Comment"><ax21:body>c</ax21:body><ax21:caption>b</ax21:caption><ax21:entryId>1</ax21:entryId><ax21:owner>a1</ax21:owner><ax21:reference>a1</ax21:reference><ax21:tstamp>2008-04-16T16:22:07.812Z</ax21:tstamp></ns:return> And this test case: public void testLoad() { HelperContext context = SDOUtil.createHelperContext(); InputStream is = getClass().getResourceAsStream("/comment.xsd"); context.getXSDHelper().define(is, null); try { context.getXMLHelper().load(XML); } catch (StackOverflowError e) { // FIXME: This test case is failing at this point e.printStackTrace(); } } at org.eclipse.emf.ecore.xmi.impl.XMLHandler.setAttribValue(XMLHandler.java:2466) at org.eclipse.emf.ecore.xmi.impl.SAXXMLHandler.handleObjectAttribs(SAXXMLHandler.java:72) at org.apache.tuscany.sdo.util.resource.SDOXMLResourceImpl$SDOXMLLoadImpl$XmlHandler.handleUnknownFeature(SDOXMLResourceImpl.java:366) at org.eclipse.emf.ecore.xmi.impl.XMLHandler.setAttribValue(XMLHandler.java:2466) at org.eclipse.emf.ecore.xmi.impl.SAXXMLHandler.handleObjectAttribs(SAXXMLHandler.java:72) at org.apache.tuscany.sdo.util.resource.SDOXMLResourceImpl$SDOXMLLoadImpl$XmlHandler.handleUnknownFeature(SDOXMLResourceImpl.java:366) at org.eclipse.emf.ecore.xmi.impl.XMLHandler.setAttribValue(XMLHandler.java:2466) at org.eclipse.emf.ecore.xmi.impl.SAXXMLHandler.handleObjectAttribs(SAXXMLHandler.java:72) at org.apache.tuscany.sdo.util.resource.SDOXMLResourceImpl$SDOXMLLoadImpl$XmlHandler.handleUnknownFeature(SDOXMLResourceImpl.java:366) at org.eclipse.emf.ecore.xmi.impl.XMLHandler.setAttribValue(XMLHandler.java:2466) at org.eclipse.emf.ecore.xmi.impl.SAXXMLHandler.handleObjectAttribs(SAXXMLHandler.java:72) at org.apache.tuscany.sdo.util.resource.SDOXMLResourceImpl$SDOXMLLoadImpl$XmlHandler.handleUnknownFeature(SDOXMLResourceImpl.java:366) at org.eclipse.emf.ecore.xmi.impl.XMLHandler.setAttribValue(XMLHandler.java:2466) at org.eclipse.emf.ecore.xmi.impl.SAXXMLHandler.handleObjectAttribs(SAXXMLHandler.java:72) at org.apache.tuscany.sdo.util.resource.SDOXMLResourceImpl$SDOXMLLoadImpl$XmlHandler.handleUnknownFeature(SDOXMLResourceImpl.java:366) at org.eclipse.emf.ecore.xmi.impl.XMLHandler.setAttribValue(XMLHandler.java:2466) at org.eclipse.emf.ecore.xmi.impl.SAXXMLHandler.handleObjectAttribs(SAXXMLHandler.java:72) at org.apache.tuscany.sdo.util.resource.SDOXMLResourceImpl$SDOXMLLoadImpl$XmlHandler.handleUnknownFeature(SDOXMLResourceImpl.java:366) at org.eclipse.emf.ecore.xmi.impl.XMLHandler.setAttribValue(XMLHandler.java:2466) at org.eclipse.emf.ecore.xmi.impl.SAXXMLHandler.handleObjectAttribs(SAXXMLHandler.java:72) at org.apache.tuscany.sdo.util.resource.SDOXMLResourceImpl$SDOXMLLoadImpl$XmlHandler.handleUnknownFeature(SDOXMLResourceImpl.java:366) -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]