Never mind guys, I found my problem when getting the URL of mapping.xml from the servlet context.


Thanks anyways,
Luis

Luis Felipe Chaves Mendes wrote:

All, I am having problems loading the mapping.xml file. This is the error I get:

org.xml.sax.SAXException: Parsing Error : Content is not allowed in prolog.
Line : 1
Column : 1


at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.exolab.castor.xml.Unmarshaller.unmarshal(Unmarshaller.java:605)
at org.exolab.castor.mapping.Mapping.loadMappingInternal(Mapping.java:532)
at org.exolab.castor.mapping.Mapping.loadMapping(Mapping.java:435)



I have tried many different things:
1) leave the prolog out (<?xml version.....?>)
2) Edit the file with diferent editors - Emacs, vi, Eclipse
3) Change the parser version to use the one distributed with the full castor distribution - xerces-J_1.4.0.jar
4) Use the mapping.xml file from the examples/servlets without any changes
4) Change the econding from the prolog, and also with no encoding at all


Does anyone have another suggestion?

P.S. here is my file:

-----------------------------
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapping PUBLIC "-//EXOLAB/Castor Object Mapping DTD Version 1.0//EN" "http://castor.exolab.org/mapping.dtd";>
<mapping>
<class name="edu.udel.dining.beans.Screen1HP"
identity="termid">
<description>MVS Screen 1HP</description>
<map-to table="dining_1hp_screen" />
<field name="termid" type="string" >
<sql name="termid" type="char"/>
</field>
</class>
</mapping>


------------------------------


Thanks in adavance, Luis


----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev




Reply via email to