REcommend ME

Tags

Featured Links

www.axisnepal.com
RetiringbyDesign

Exception in thread

When you run the Tutorial05.java and onwards in the Jena examples, you get the following error:


ERROR [main] (RDFDefaultErrorHandler.java:40) - file:///C:/Users/Ravi/Desktop/Jena-examples/(line 4 column 60): {E201} rdf:about not allowed as attribute here.
ERROR [main] (RDFDefaultErrorHandler.java:44) - file:///C:/Users/Ravi/Desktop/Jena-examples/(line 5 column 15): The prefix "vcard" for element "vcard:fn" is not bound.
Exception in thread "main" com.hp.hpl.jena.shared.JenaException: org.xml.sax.SAXParseException: The prefix "vcard" for element "vcard:fn" is not bound.
at com.hp.hpl.jena.rdf.model.impl.RDFDefaultErrorHandler.fatalError(RDFDefaultErrorHandler.java:45)
at com.hp.hpl.jena.rdf.arp.impl.ARPSaxErrorHandler.fatalError(ARPSaxErrorHandler.java:35)
at com.hp.hpl.jena.rdf.arp.impl.XMLHandler.warning(XMLHandler.java:225)
at com.hp.hpl.jena.rdf.arp.impl.XMLHandler.fatalError(XMLHandler.java:255)
at org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLNamespaceBinder.handleStartElement(Unknown Source)
at org.apache.xerces.impl.XMLNamespaceBinder.startElement(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(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.DTDConfiguration.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 com.hp.hpl.jena.rdf.arp.impl.RDFXMLParser.parse(RDFXMLParser.java:142)

SOLUTION
This is very wierd, but the rdf (vc-db-1.rdf), which I obtained from the internet, seems to contain two different instances for vcard: viz, “vcard” and “vCard”. The namespace for “vCard” seems to be defined but “vcard” not defined. So, the solution might be just name all vcards consistently to a single name such as “vcard”.

And later I found that vc-db-1.rdf obtained from vc-db-1.rdf was not correct, and that file that the example needs is located in directory doc/tutorial/RDQL folder. Thanks to we8ver

Share and Enjoy:
  • Print
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • Blogplay
  • PDF

5 comments to org.xml.sax.SAXParseException: The prefix “vcard” for element “vcard:fn” is not bound.

  • Normally I don’t learn post on blogs, however I wish to say that this write-up very pressured me to check out and do so! Your writing style has been amazed me. Thanks, very great post.

  • Ahaa, its fastidious dialogue about this post here at this weblog, I have read all
    that, so at this time me also commenting at this place.

  • Jewel Cole is a freelance writer for a retailer company.
    So does how you configure your CPU, memory, and virtual memory settings.

    If you are searching for a qualified technician to check and spot your
    and to solve them immediately then you should take a
    look at Connect Global.

  • ” The next generation of antivirus applications for endpoints must include an integrated and centralised management console. These software want connection to their personal websites simultaneously could considerably worsen your computer performance. There are 17 products I recommend, each of which is designed to do a certain task on the PC.

  • Hey there, I think your site might be having browser compatibility issues.
    When I look at your website in Opera, it looks fine but when opening in Internet Explorer, it has some overlapping.
    I just wanted to give you a quick heads up! Other then that, wonderful blog!

Leave a Reply

 

 

 

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>