Hi, is this actually a regression issue with Castor 1.3.2, or are you reporting an issue that has been in place already with previous versions as well ?
Anyhow, please raise a Jira issue with this information. Kind Regards Werner On 07.04.2011 06:35, 吕晓一 wrote: > 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); > > > > > --------------------------------------------------------------------- > To unsubscribe from this list, please visit: > > http://xircles.codehaus.org/manage_email --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email

