The attached is my test code.

Based on Castor1.3.2.

My main map xml file is TestModel1Map.xml, it includes another map file named 
TestModel2Map.xml,

I found below code cannot load the TestModel2Map.xml.

InputStream in = getClass().getClassLoader().getResourceAsStream(mappingFile);
InputSource source = new InputSource(in);

Mapping mapping = new Mapping();
mapping.loadMapping(source);

XMLContext context = new XMLContext();
context.addMapping(mapping);


and below code will work correctly

URL fileUrl = getClass().getClassLoader().getResource(mappingFile);

Mapping mapping = new Mapping();
mapping.loadMapping(fileUrl);

XMLContext context = new XMLContext();
context.addMapping(mapping);

Attachment: includeFileTest.rar
Description: includeFileTest.rar

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email

Reply via email to