• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Junilu Lacar
  • Martin Vashko
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Scott Selikoff
  • salvin francis
  • Piet Souris

problem with loading mapping.xml

 
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

1)Please tell me the cause of this problem.

2)how to solve this problem?

i am getting this problem while loading mapping.xml

Error is
there rg.exolab.castor.mapping.MappingException:
Nested error: org.xml.sax.SAXException: The namespace associated with the prefix: xmlns is null.
org.xml.sax.SAXException: The namespace associated
with the prefix: xmlns is null.
at
org.exolab.castor.xml.UnmarshalHandler.resolveNamespace(UnmarshalHandler.java:2751)
at
org.exolab.castor.xml.UnmarshalHandler.processAttribute(UnmarshalHandler.java:2512)
at
org.exolab.castor.xml.UnmarshalHandler.processAttributes(UnmarshalHandler.java:2218)
at org.exolab.castor.xml.UnmarshalHandler.startElement(UnmarshalHandler.java:1922)
at
org.exolab.castor.xml.UnmarshalHandler.startElement(UnmarshalHandler.java:1149)
at
org.apache.xerces.parsers.SAXParser.startElement(SAXParser.java:1376)
at
org.apache.xerces.validators.common.XMLValidator.callStartElement(XMLValidator.java:1284)
at
org.apache.xerces.framework.XMLDocumentScanner.scanElement(XMLDocumentScanner.java:1806) at
org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch(XMLDocumentScanner.java:1182)
at
org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentScanner.java:381)
at
org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1098)
at
org.exolab.castor.xml.Unmarshaller.unmarshal(Unmarshaller.java:291)
at
org.exolab.castor.mapping.Mapping.loadMappingInternal(Mapping.java:296) at
org.exolab.castor.mapping.Mapping.loadMappingInternal(Mapping.java:269)
at
org.exolab.castor.mapping.Mapping.loadMapping(Mapping.java:222)
at
com.hcl.scorm.mappingbeans.manifest.organizations.sequencing.TestSeq.main(TestSeq.java:124)

if u want i can send my mapping.xml also.

its urgent so plz help me.

thanks in advance
venkataramana
[ June 02, 2006: Message edited by: Bear Bibeault ]
 
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you please post the first 5 lines of the mapping file?

Please don't put 'urgent' in the title, it won't make people get here any faster.

Dave
 
venkataramana raju
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi David O'Meara

First of all thanks for reply
and sorry for the (URGENT) word in subject


I am using castor.0.9.5.2.jar for xml binding
and i am getting problem while

mapping.loadMapping( "mappingFilePath" );
Below lines are my Mapping.xml :-

<?xml version="1.0"?>
<!DOCTYPE mapping PUBLIC "-//EXOLAB/Castor Object Mapping DTD Version 1.0//EN" "mapping.dtd" >

<mapping>
<class name="com.hcl.scorm.mappingbeans.manifest.Manifest">
<map-to xml="manifest"/>

<field name="Identifier"
type="java.lang.String">
<bind-xml name="identifier" node="attribute"/>
</field>

<field name="Xmlns"
type="java.lang.String">
<bind-xml name="xmlns" node="attribute"/>
</field>

<field name="Xsi"
type="java.lang.String">
<bind-xml name="xmlns:xsi" node="attribute"/>
</field>

<field name="Adlcp"
type="java.lang.String">
<bind-xml name="xmlns:adlcp" node="attribute"/>
</field>

<field name="Imsss"
type="java.lang.String">
<bind-xml name="xmlns:imsss" node="attribute"/>
</field>

<field name="Adlseq"
type="java.lang.String">
<bind-xml name="xmlns:adlseq" node="attribute"/>
</field>
<field name="Adlnav"
type="java.lang.String">
<bind-xml name="xmlns:adlnav" node="attribute"/>
</field>

<field name="SchemaLocation"
type="java.lang.String">
<bind-xml name="xsi:schemaLocation" node="attribute"/>
</field>


<field name="Metadata"
type="com.hcl.scorm.mappingbeans.manifest.metadata.MetaData">
<bind-xml name="metadata"/>
</field>

<field name="Organizations"
type="com.hcl.scorm.mappingbeans.manifest.organizations.Organizations">
<bind-xml name="organizations"/>
</field>
<field name="Resources"
type="com.hcl.scorm.mappingbeans.manifest.resources.Resources">
<bind-xml name="resources"/>
</field>


</class>


..............
................
</mapping>

Thanks
venkataramana
 
venkataramana raju
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All
Even Our JavaRanch people doesn't help me then,
it is better to change from castor to other Xml Binding Technologies.
Becoz as a open source castor there own website is down .
and i mailed so many castor forums but i dnt get any reply
But i will try to solve this problem for some more days
so that i may find solution and in future i can help others

Thanks
venkataramana
 
venkataramana raju
Greenhorn
Posts: 28
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
as i told u i sloved this problem

Actualy problem is with xmlns namespace
this namespace already spicifeid as "http://www.w3.org/2001/XMLSchema"

so we just need to spicify in our xml file like below

<mapping xmlns:xmlns1="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:adlcp="http://www.adlnet.org/xsd/adlcp_rootv1p2"
xmlns:imsss="http://www.imsglobal.org/xsd/imsss"
xmlns:adlnav="http://www.adlnet.org/xsd/adlnav_v1p3">

Thats it Problem is solved
 
Happily living in the valley of the dried frogs with a few tiny ads.
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!