I have several mapping files that reference other mapping files. All of the mapping
files is one directory. Here an example of a mapping file in a dir
C:/test/castor/map/other_mapping.xml:
<!DOCTYPE databases PUBLIC "-//EXOLAB/Castor Mapping DTD Version 1.0//EN"
"http://castor.exolab.org/mapping.dtd">
<mapping>
<include href="other1_mapping.xml"/>
<include href="other2_mapping.xml"/>
<include href="other3_mapping.xml"/>
...
</mapping>
___________
Here the code I have to load the mapping file:
Mapping map = new Mapping();
//Mapping map = new Mapping( getClass().getClassLoader() );
map.setBaseURL("C:/test/castor/map/");
map.loadMapping( "other_mapping.xml" );
When I run the code I get an error message :
-->Error : org.exolab.castor.mapping.MappingException: Nested error:
org.xml.sax.SAXException: Parsing Error : File
"file:///C:/test/castor/map/other_mapping.xml" not found.
Line : 0
Column : 0
org.xml.sax.SAXException: Parsing Error : File
"file:///C:/test/castor/map/other_mapping.xml" not found.
Line : 0
Column : 0
at
org.exolab.castor.xml.UnmarshalHandler.fatalError(UnmarshalHandler.java:1117)
at org.apache.xerces.framework.XMLParser.reportError(XMLParser.java:1225)
at
org.apache.xerces.readers.DefaultEntityHandler.startReadingFromDocument(DefaultEntityHandler.java:512)
at org.apache.xerces.framework.XMLParser.parseSomeSetup(XMLParser.java:312)
at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1080)
at org.exolab.castor.xml.Unmarshaller.unmarshal(Unmarshaller.java:338)
at org.exolab.castor.mapping.Mapping.loadMappingInternal(Mapping.java:477)
at org.exolab.castor.mapping.Mapping.loadMappingInternal(Mapping.java:436)
at org.exolab.castor.mapping.Mapping.loadMapping(Mapping.java:363)
at XMLConverter.<init>(XMLConverter.java:44)
at XMLConverter.main(XMLConverter.java:128)
_______________________
It seems that the setBaseURL() is not working. Could someone tell me what I'm doing
wrong?
Thanks you in advance,
Ide
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev