Topic
1 reply Latest Post - ‏2012-11-13T20:34:50Z by SystemAdmin
zbc
zbc
3 Posts
ACCEPTED ANSWER

Pinned topic tuscany beginner

‏2012-11-13T16:16:59Z |
hello,

my first tuscany sdo program:
HelperContext ctx = HelperProvider.getDefaultContext();
FileInputStream is = new FileInputStream("......\\test.xml");
XMLDocument doc = ctx.getXMLHelper().load(is);
DataObject root = doc.getRootObject();
root.getString("person/name");

i import all jar under lib dir of tuscany_sdo1.1 package, when i run it, the following exception thrown at "root.getString("person/name")":

Exception in thread "main" java.lang.ClassCastException: org.eclipse.emf.ecore.util.FeatureMapUtil$FeatureEList incompatible with org.eclipse.emf.ecore.EObject
at org.apache.tuscany.sdo.util.DataObjectUtil$Accessor.process(DataObjectUtil.java:2237)
at org.apache.tuscany.sdo.util.DataObjectUtil$Accessor.init(DataObjectUtil.java:2017)
at org.apache.tuscany.sdo.util.DataObjectUtil$Accessor.create(DataObjectUtil.java:1932)
at org.apache.tuscany.sdo.util.DataObjectUtil$Accessor.create(DataObjectUtil.java:1926)
at org.apache.tuscany.sdo.util.DataObjectUtil.get(DataObjectUtil.java:776)
at org.apache.tuscany.sdo.impl.DataObjectImpl.get(DataObjectImpl.java:221)
at org.apache.tuscany.sdo.impl.DataObjectImpl.getString(DataObjectImpl.java:426)
at Test.main(Test.java:19)
why is it? who can help, appreciated first.
Updated on 2012-11-13T20:34:50Z at 2012-11-13T20:34:50Z by SystemAdmin
  • SystemAdmin
    SystemAdmin
    126 Posts
    ACCEPTED ANSWER

    Re: tuscany beginner

    ‏2012-11-13T20:34:50Z  in response to zbc
    Hello, I do not really understand your question, if you could just elaborate a bit more your question it would be great, but in these links you can find information about how to use SDO's:

    http://pic.dhe.ibm.com/infocenter/wasinfo/v7r0/index.jsp?topic=%2Fcom.ibm.websphere.soafep.multiplatform.doc%2Finfo%2Fae%2Fae%2Ftsca_sdo_use.html

    and

    http://pic.dhe.ibm.com/infocenter/wasinfo/v7r0/topic/com.ibm.websphere.soafep.multiplatform.doc/info/ae/ae/tsca_sdo_hypercontext.html