[ http://issues.apache.org/jira/browse/TUSCANY-741?page=comments#action_12436619 ] Yang ZHONG commented on TUSCANY-741: ------------------------------------
What's the type of "purchaseDate"? I've searched the svn and can't find such element/attribute. Anyway, SDO Java spec 2.01 page 95 and 96 doesn't map anything to java.util.Date although there's one mapping seems close which is from anySimpleType to java.lang.Object. However, I doublt the type of "purchaseDate" is anySimpleType. Many date/time types are mapped to String; if you have other formats, commonj.sdo.helper.DataHelper may help. > ClassCastException while trying to set a date property > ------------------------------------------------------ > > Key: TUSCANY-741 > URL: http://issues.apache.org/jira/browse/TUSCANY-741 > Project: Tuscany > Issue Type: Bug > Components: Java BigBank Scenario, Java SDO Implementation > Affects Versions: Java-M2 > Reporter: Luciano Resende > Fix For: Java-M2 > > > Getting exception while trying to set date property : > stockPurchase.set("purchaseDate", new Date()); > Exception in thread "main" java.lang.ClassCastException: java.util.Date > at > com.bigbank.account.impl.StockSummaryImpl.eSet(StockSummaryImpl.java:514) > at > org.eclipse.emf.ecore.impl.BasicEObjectImpl.eSet(BasicEObjectImpl.java:653) > at > org.apache.tuscany.sdo.impl.DataObjectImpl.set(DataObjectImpl.java:140) > at > org.apache.tuscany.sdo.util.DataObjectUtil.set(DataObjectUtil.java:726) > at > org.apache.tuscany.sdo.impl.DataObjectImpl.set(DataObjectImpl.java:223) > at > bigbank.account.services.accountdb.AccountDBInit.testStrockPurchaseThroughDAS(AccountDBInit.java:303) > at > bigbank.account.services.accountdb.AccountDBInit.main(AccountDBInit.java:461) -- 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 --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
