[ http://issues.apache.org/jira/browse/TUSCANY-114?page=all ]
Jean-Sebastien Delfino updated TUSCANY-114:
-------------------------------------------
Component: Java SDO Implementation
Moving to the correct component.
> Loaded SDO2 Type for xsd:anyType cannot be used in DataFactory.create()
> -----------------------------------------------------------------------
>
> Key: TUSCANY-114
> URL: http://issues.apache.org/jira/browse/TUSCANY-114
> Project: Tuscany
> Type: Bug
> Components: Java SDO Implementation
> Reporter: Raymond Feng
>
> I have this element defined in the XSD:
> <element name="comment3" type="anyType"/>
> When the XSD is loaded by XSDHelper.define(), I got this type:
> [EMAIL PROTECTED] (name: EObject) (instanceClassName: null) (abstract: false,
> interface: false)
> Unfortunately, it's container is:
>
> [EMAIL PROTECTED] (name: ecore) (nsURI:
> http://www.eclipse.org/emf/2002/Ecore, nsPrefix: ecore)
> In this case, EcoreUtil.create() will return EObject instead of DataObject.
> The following code fails with ClassCastException.
> AnyTypeDataObject comment3 = (AnyTypeDataObject)
> dataFactory.create(c3.getType());
> Exception in thread "main" java.lang.ClassCastException:
> org.eclipse.emf.ecore.impl.EObjectImpl incompatible with
> commonj.sdo.DataObject
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira