Search Mailing List Archives

Limit search to: Subject & Body Subject Author
Sort by: Reverse Sort
Limit to: All This Week Last Week This Month Last Month
Select Date Range     through    

[protege-owl] How to read an OWL file nade by protege

Samuel Owen tin2_k47_dhbkhn at
Tue Apr 17 03:50:31 PDT 2007

I am trying to read an OWL file, here is the code :
  public class Test 
  public static void main(String[] args) 
  JenaOWLModel owlModel;
  String uri = "";
  try {
  File f = new File( "C:\\setup\\Do An\\owl\\pizza.owl");
  FileInputStream fin = new FileInputStream(f);
  owlModel = ProtegeOWL.createJenaOWLModelFromInputStream(fin);
  java.util.Iterator it = owlModel.getUserDefinedOWLNamedClasses().iterator();
  } catch (Exception e) {
  // TODO Auto-generated catch block
  But I received the following errors :
  INFO: Loading triples
  Exception in thread "main" java.lang.NoSuchMethodError: org.apache.xerces.parsers.SAXParser.<init>(Lorg/apache/xerces/xni/parser/XMLParserConfiguration;)V
  at com.hp.hpl.jena.rdf.arp.impl.RDFXMLParser$MySAXParser.<init>(
  at com.hp.hpl.jena.rdf.arp.impl.RDFXMLParser.create(
  at com.hp.hpl.jena.rdf.arp.ARP.<init>(
  at edu.stanford.smi.protegex.owl.jena.parser.ProtegeOWLParser.createARP(Unknown Source)
  at edu.stanford.smi.protegex.owl.jena.parser.ProtegeOWLParser.loadTriples(Unknown Source)
  at Source)
  at Source)
  at edu.stanford.smi.protegex.owl.jena.JenaOWLModel.load(Unknown Source)
  at edu.stanford.smi.protegex.owl.ProtegeOWL.createJenaOWLModelFromInputStream(Unknown Source)
  at Test.main(
  I can't understand why? Could you explaint to me, please ? How can you read such an OWL file?
  Thank you very much !

Ahhh...imagining that irresistible "new car" smell?
 Check outnew cars at Yahoo! Autos.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the protege-owl mailing list