Hello,

I am using Apache Tuscany SDO 1.1.1 and I have a problem loading a schema file with an import statement. What happens is that I can create data objects of types that are included in the main file. However, when I try to create objects from the imported file, I get the following error:

java.lang.IllegalArgumentException in org.apache.tuscany.sdo.util.DataObjectUtil.create(DataObjectUtil.java:2549).

The code to load the schema file is:

 public static void initHelperContext () throws FileNotFoundException
 {
   hc = SDOUtil.createHelperContext();

   XSDHelper xsdHelper = hc.getXSDHelper();
File f2 = new File ("c:\temp\schema.xsd");
   InputStream is2 = new FileInputStream (f2);
   xsdHelper.define(is2, f2.getAbsolutePath());
 }

That's how the schema file gets imported:

 <xsd:import namespace="<our namespace>" schemaLocation="include.xsd"/>

When I copy the definitions from the imported file into the main file, then everything works fine...

Any help is appreciated...

Thanks
Thomas

Reply via email to