This week's book giveaway is in the Cloud/Virtualizaton forum.
We're giving away four copies of Mesos in Action and have Roger Ignazio on-line!
See this thread for details.
Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

tuscany SDO beginner

 
zb cong
Ranch Hand
Posts: 416
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello,

my first tuscany sdo program:



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.
 
Roger Sterling
Ranch Hand
Posts: 426
Eclipse IDE Fedora Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The result coming back from your DataObject call is an EReference which is not castable to a Java String type, and why the getString call fails. There is a bug on this behavior with the Tuscany team and since no development has taken place on the main code stream for over a year, I wouldn't hold your breath waiting for a fix. You might have better success with http://xml.apache.org/xalan-j/xpath_apis.html or http://jaxen.codehaus.org/ .
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic