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




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.