Hi,

I'm trying to create some test programs with sdo, and one of the tests is
that i create a datagraph using dynamic dataobjects (defined using an xsd),
save the datagraph and then try to load it using static dataobjects.
How do i redefine/reregister dataobjects? If i first define  the dynamic
types like:

        URL url =
            getClass().getResource("/nl/iteye/sdoexamples/Customer.xsd");
        XSDHelper.INSTANCE.define(url.openStream(), url.toString());

And later reregister the same types, but static generated from the same xsd:

        HelperContext scope = HelperProvider.getDefaultContext();
        StaticSdoFactory.INSTANCE.register(scope);

I get ClassCastExceptions when using the static types:

        java.lang.ClassCastException:
org.apache.tuscany.sdo.impl.DynamicDataObjectImpl cannot be cast to
nl.iteye.sdoexamples.ex2.Customers

Is it possible to clear all type definitions?

Thanks,
Andrej

Reply via email to