Even if you're at your wits' end, please remember to search the mailing list archive before posting:
http://www.mail-archive.com/castor-dev%40exolab.org/
The time you save may be your own.
Rhett
[EMAIL PROTECTED] wrote:
Hello,
This is my second attempt to use castor. In both cases I can create the java code via the .xsd file(schema). It builds under eclipse just fine. I can run the code that calls the marshal methods and it works just fine. I can test the 'well formed' and 'validity' of generated xml via xmlspy5 and it checks out ok!
But when I try to unmarshal the resultant .xml file the code generates an IllegalArgumentException.
This is an example from:
http://www.xml.com/pub/a/2002/07/24/databinding.html
It's really very straight forward, but I don't know what to do anymore!!!!
HELP HELP HELP I'm really stuck!!!!
Below is the stack dump from my current attempt:
java.lang.IllegalArgumentException: The prefix 'xml' is reserved (XML 1.0 Specification) and cannot be declared.
at org.exolab.castor.xml.Namespaces.addNamespace(Namespaces.java:130)
at org.exolab.castor.xml.UnmarshalHandler.startPrefixMapping(UnmarshalHandler.java:
1953)
at org.apache.xerces.parsers.AbstractSAXParser.startNamespaceMapping(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
at org.apache.xerces.impl.dtd.XMLDTDValidator.startElement(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source)
at org.apache.xerces.impl.XMLDocumentScannerImpl$ContentDispatcher.scanRootElementH
ook(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.
dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.exolab.castor.xml.Unmarshaller.unmarshal(Unmarshaller.java:583)
at org.exolab.castor.xml.Unmarshaller.unmarshal(Unmarshaller.java:491)
at org.exolab.castor.xml.Unmarshaller.unmarshal(Unmarshaller.java:669)
at org.dogshow.Show.unmarshal(Show.java:93)
at org.dogshow.LoadDogShow.main(LoadDogShow.java:10)
----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev