473,614 Members | 2,335 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Java Castor Exception : The prefix 'xml' is reserved

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.Illeg alArgumentExcep tion: The prefix 'xml' is reserved (XML 1.0
Specification) and cannot be declared.

at org.exolab.cast or.xml.Namespac es.addNamespace (Namespaces.jav a:130)

at
org.exolab.cast or.xml.Unmarsha lHandler.startP refixMapping(Un marshalHandler. j
ava:1953)

at
org.apache.xerc es.parsers.Abst ractSAXParser.s tartNamespaceMa pping(Unknown
Source)

at org.apache.xerc es.parsers.Abst ractSAXParser.s tartElement(Unk nown Source)

at org.apache.xerc es.impl.dtd.XML DTDValidator.st artElement(Unkn own Source)

at
org.apache.xerc es.impl.XMLDocu mentFragmentSca nnerImpl.scanSt artElement(Unkn o
wn Source)

at
org.apache.xerc es.impl.XMLDocu mentScannerImpl $ContentDispatc her.scanRootEle m
entHook(Unknown Source)

at
org.apache.xerc es.impl.XMLDocu mentFragmentSca nnerImpl$Fragme ntContentDispat c
her.dispatch(Un known Source)

at
org.apache.xerc es.impl.XMLDocu mentFragmentSca nnerImpl.scanDo cument(Unknown
Source)

at org.apache.xerc es.parsers.XML1 1Configuration. parse(Unknown Source)

at org.apache.xerc es.parsers.DTDC onfiguration.pa rse(Unknown Source)

at org.apache.xerc es.parsers.XMLP arser.parse(Unk nown Source)

at org.apache.xerc es.parsers.Abst ractSAXParser.p arse(Unknown Source)

at org.exolab.cast or.xml.Unmarsha ller.unmarshal( Unmarshaller.ja va:583)

at org.exolab.cast or.mapping.Mapp ing.loadMapping Internal(Mappin g.java:515)

at org.exolab.cast or.mapping.Mapp ing.loadMapping Internal(Mappin g.java:468)

at org.exolab.cast or.mapping.Mapp ing.loadMapping (Mapping.java:3 95)

at Test.main(Test. java:41)

Exception in thread "main"

Jul 20 '05 #1
2 3775
"Christophe Geraud" <no***********@ magnus.fr> wrote in message
news:3f******** *************** @news.free.fr
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
Jul 20 '05 #2

"Martin Boehm" <ng********@arc or.de> a écrit dans le message de news:
3f************* **********@news read2.arcor-online.net...
"Christophe Geraud" <no***********@ magnus.fr> wrote in message
news:3f******** *************** @news.free.fr
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 !! ?
Jul 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
2612
by: Przemyslaw Wegrzyn | last post by:
Hi! I'm quite new to Python. Is there anything like Castor or JAXB available for Python ? All I have found is generateDS.py, but it seems to be very limited and a bit buggy - it seems to be sensitive to the order in which I declare elements in my XML Schema file. In my upcoming project I need a robust XML support, and I wanted to give Python a try, unfortunately I'll probably have to switch back to Java for this project :(
0
2098
by: homi | last post by:
Hi All, I am writing a Java code that uses a XML Config file to configure itself. Sample of the XML file has shown below. I want to have a peace of java code to reads that config file and import all the data to a class structure that I have designed before. In this case I will have a class name AppGroup and the whole config file will be stored in array of AppGroup objects. What is the best was of doing such a thing. I’ve already looked...
0
1400
by: George Palmer | last post by:
Hi, I'm writing an xml file using Castor. It looks something like this: <a> .... </a> <b> .... </b>
2
3673
by: timothy ma and constance lee | last post by:
Do anyone know how to popluate xml file to a java object?
0
1553
by: Cees Wesseling | last post by:
For a couple of years I am using now my own data binding tool that can create C++ classes from a DTD. At this moment I need to reconsider this tool since I want to use W3C XML Schemas and need to output to more languages: C, C++, C#, python and Java. In reviewing existing tools I came the following preliminary conclusions on which I like your comments: - there is no single open source tools capable of supporting all the mentioned...
18
7726
by: jacksu | last post by:
I have a simple program to run xpath with xerces 1_2_7 XPathFactory factory = XPathFactory.newInstance(); XPath xPath = factory.newXPath(); XPathExpression xp = xPath.compile(strXpr); System.out.println(xp.evaluate(new InputSource(new FileInputStream("a.xml"))));
5
2166
by: David Moskowitz | last post by:
Infoblazer LLC is pleased to release the XX Framework under the LGPL open source license. Version 1.0 is available for immediate download. The XX framework is a configurable, XML-centric implementation of the MVC development paradigm that incorporates simple and commonly used patterns of development. The framework promotes a use case oriented development approach.
0
1456
by: manas589 | last post by:
Hi Can any one tell me how to use binding.xml while generating castor bean from an xsd file. i have one xsd file where two element are conflicting. so i thought to use binding file while generating castor bean. i have created my binding.xml file. but i don't know how to use this binding.xml file while creating beans. is it required to put the binding.xml file in classpath or where can i mentioned the path of this file so that while...
1
2410
by: ksrashmi | last post by:
HI I am getting following exception when i use mxml tags in jsp <%@ taglib uri="FlexTagLib" prefix="mm" %> can any one tell why i am getting this exception type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request.
0
8197
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8142
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8640
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8287
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8443
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5548
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4058
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
1757
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1438
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.