Java Castor Exception : The prefix 'xml' is reserved

Discussion in 'XML' started by Christophe Geraud, Oct 14, 2003.

  1. I got the following exception with Castor: "The prefix 'xml' is reserved
    (XML 1.0 Specification) and cannot be declared."
    I got this exception using or not a mapping file.
    Can anyone tell what it means ?

    Here is the stack trace :

    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.j
    ava: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(Unkno
    wn Source)

    at
    org.apache.xerces.impl.XMLDocumentScannerImpl$ContentDispatcher.scanRootElem
    entHook(Unknown Source)

    at
    org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatc
    her.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.mapping.Mapping.loadMappingInternal(Mapping.java:515)

    at org.exolab.castor.mapping.Mapping.loadMappingInternal(Mapping.java:468)

    at org.exolab.castor.mapping.Mapping.loadMapping(Mapping.java:395)

    at Test.main(Test.java:41)

    Exception in thread "main"
     
    Christophe Geraud, Oct 14, 2003
    #1
    1. Advertising

  2. Christophe Geraud

    Martin Boehm Guest

    "Christophe Geraud" <> wrote in message
    news:3f8c06dd$0$27604$

    > I got the following exception with Castor: "The prefix 'xml' is
    > reserved (XML 1.0 Specification) and cannot be declared."


    Not knowing your source I can only guess:
    You try to insert <xml:foo> elements?

    Martin
     
    Martin Boehm, Oct 14, 2003
    #2
    1. Advertising

  3. "Martin Boehm" <> a écrit dans le message de news:
    3f8c109d$0$27437$-online.net...
    > "Christophe Geraud" <> wrote in message
    > news:3f8c06dd$0$27604$
    >
    > > I got the following exception with Castor: "The prefix 'xml' is
    > > reserved (XML 1.0 Specification) and cannot be declared."

    >
    > Not knowing your source I can only guess:
    > You try to insert <xml:foo> elements?
    >
    > Martin
    >
    >


    Thanks for answering.
    It seems that it came from the classpath (I use JBuilder).
    I create a new set of libraries with Castor 9.5.2.0 & Xerces ... and now it
    is ok !! ?
     
    Christophe Geraud, Oct 16, 2003
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Christophe Geraud
    Replies:
    1
    Views:
    519
  2. metaperl
    Replies:
    32
    Views:
    919
    NickC
    Sep 15, 2006
  3. Delaney, Timothy (Tim)
    Replies:
    10
    Views:
    671
    Jason
    Sep 14, 2006
  4. Steve Holden
    Replies:
    0
    Views:
    396
    Steve Holden
    Sep 13, 2006
  5. Replies:
    3
    Views:
    168
    osmium
    Nov 6, 2013
Loading...

Share This Page