The castor docs clearly states the usage of schema files here http://castor.codehaus.org/schema.html and it clearly states
Mapping DTD -//EXOLAB/Castor Object Mapping DTD Version 1.0//EN http://castor.org/mapping.dtd
But when you click on the castor.org/mapping.dtd link on the schema url, it links to http://castor.codehaus.org/mapping.dtd
So, in fact, the correct dtd location is http://castor.codehaus.org/mapping.dtd , not castor.org/mapping.dtd . This is clearly an ambiguity, but solves the "referenced file contains error" problem