Hi,

I'm trying to run the SDO samples in an OSGi environment. I'm getting different behavior under OSGi than running standalone, which I suspect has to do with load order or some missing configuration. Specifically, the ReadPurchaseOrder sample creates an XMLDocument which returns different types for getRootObject(). When running standalone, the root object is an instance of DynamicDataObjectImpl. When running under OSGi, the root object is an instance of AnyTypeDataObjectImpl.

That doesn't seem like it should be a problem, except that the following line (#132 in ReadPurchaseOrder.java) ends up throwing a class cast exception under OSGi:

        DataObject shipTo = purchaseOrder.getDataObject("shipTo");

java.lang.ClassCastException: org.eclipse.emf.ecore.util.FeatureMapUtil $FeatureEList cannot be cast to commonj.sdo.DataObject

Why would the behavior be different when creating the XMLDocument?

Thanks for any insight.

Best,
Andreas

Reply via email to