Skip navigation.
Home
Semantic Software Lab
Concordia University
Montréal, Canada

owlexporter plugin creation problem

Printer-friendly versionPrinter-friendly versionPDF versionPDF version

hi,
Owlexporter plugin is not getting created in GATE framework. it gives error after calling ant jar in command line.
can someone help in creating this plugin.
Error as under:

[javac] ^
[javac] C:\Program Files\GATE-5.2.1\plugins\OwlExporterV2\src\info\semantics
oftware\owlexporter\OwlExporterOntology.java:240: cannot find symbol
[javac] symbol : class OWLIndividual
[javac] location: class info.semanticsoftware.owlexporter.OwlExporterOntolog
y
[javac] OWLIndividual individual2 = (O
WLIndividual) kt.next();
[javac] ^
[javac] C:\Program Files\GATE-5.2.1\plugins\OwlExporterV2\src\info\semantics
oftware\owlexporter\OwlExporterOntology.java:240: cannot find symbol
[javac] symbol : class OWLIndividual
[javac] location: class info.semanticsoftware.owlexporter.OwlExporterOntolog
y
[javac] OWLIndividual individual2 = (O
WLIndividual) kt.next();
[javac] ^

[javac] C:\Program Files\GATE-5.2.1\plugins\OwlExporterV2\src\info\semantics
oftware\owlexporter\OwlExporterOntology.java:264: cannot find symbol
[javac] symbol : variable OWLUtil
[javac] location: class info.semanticsoftware.owlexporter.OwlExporterOntolog
y
[javac] OWLUtil.renameOntology(this.getOwlModel(),
[javac] ^
[javac] C:\Program Files\GATE-5.2.1\plugins\OwlExporterV2\src\info\semantics
oftware\owlexporter\OwlExporterOntology.java:282: cannot find symbol
[javac] symbol : variable URIUtilities
[javac] location: class info.semanticsoftware.owlexporter.OwlExporterOntolog
y
[javac] URI importUri = URIUtilities.createURI(ontology.
getExportFilePathStr());
[javac] ^
[javac] C:\Program Files\GATE-5.2.1\plugins\OwlExporterV2\src\info\semantics
oftware\owlexporter\OwlExporterOntologyPopulator.java:125: cannot find symbol
[javac] symbol : class RDFSNamedClass
[javac] location: class info.semanticsoftware.owlexporter.OwlExporterOntolog
yPopulator
[javac] RDFSNamedClass c = model.getRDFSNamedClass("Docu
ment");
[javac] ^
[javac] C:\Program Files\GATE-5.2.1\plugins\OwlExporterV2\src\info\semantics
oftware\owlexporter\OwlExporterOntologyPopulator.java:127: cannot find symbol
[javac] symbol : class RDFSClass
[javac] location: class info.semanticsoftware.owlexporter.OwlExporterOntolog
yPopulator
[javac] Collection i = c.getInstances
(true);
[javac] ^
[javac] C:\Program Files\GATE-5.2.1\plugins\OwlExporterV2\src\info\semantics
oftware\owlexporter\OwlExporterOntologyPopulator.java:128: cannot find symbol
[javac] symbol : class RDFSClass
[javac] location: class info.semanticsoftware.owlexporter.OwlExporterOntolog
yPopulator
[javac] for(Iterator instanceIt = i.i
terator(); instanceIt.hasNext();) {
[javac] ^
[javac] C:\Program Files\GATE-5.2.1\plugins\OwlExporterV2\src\info\semantics
oftware\owlexporter\OwlExporterOntologyPopulator.java:129: cannot find symbol
[javac] symbol : class OWLIndividual
[javac] location: class info.semanticsoftware.owlexporter.OwlExporterOntolog
yPopulator
[javac] OWLIndividual ind = (OWLIndividu
al) instanceIt.next();
[javac] ^
[javac] C:\Program Files\GATE-5.2.1\plugins\OwlExporterV2\src\info\semantics
oftware\owlexporter\OwlExporterOntologyPopulator.java:129: cannot find symbol
[javac] symbol : class OWLIndividual
[javac] location: class info.semanticsoftware.owlexporter.OwlExporterOntolog
yPopulator
[javac] OWLIndividual ind = (OWLIndividu
al) instanceIt.next();
[javac] ^
[javac] C:\Program Files\GATE-5.2.1\plugins\OwlExporterV2\src\info\semantics
oftware\owlexporter\OwlExporterOntologyPopulator.java:131: cannot find symbol
[javac] symbol : class RDFProperty
[javac] location: class info.semanticsoftware.owlexporter.OwlExporterOntolog
yPopulator
[javac] Collection p = ind.
getRDFProperties();
[javac] ^
[javac] C:\Program Files\GATE-5.2.1\plugins\OwlExporterV2\src\info\semantics
oftware\owlexporter\OwlExporterOntologyPopulator.java:132: cannot find symbol
[javac] symbol : class RDFProperty
[javac] location: class info.semanticsoftware.owlexporter.OwlExporterOntolog
yPopulator
[javac] for(Iterator propIt
= p.iterator(); propIt.hasNext();) {
[javac] ^
[javac] C:\Program Files\GATE-5.2.1\plugins\OwlExporterV2\src\info\semantics
oftware\owlexporter\OwlExporterOntologyPopulator.java:133: cannot find symbol
[javac] symbol : class RDFProperty
[javac] location: class info.semanticsoftware.owlexporter.OwlExporterOntolog
yPopulator
[javac] RDFProperty prop = (RDFP
roperty) propIt.next();
[javac] ^
[javac] C:\Program Files\GATE-5.2.1\plugins\OwlExporterV2\src\info\semantics
oftware\owlexporter\OwlExporterOntologyPopulator.java:133: cannot find symbol
[javac] symbol : class RDFProperty
[javac] location: class info.semanticsoftware.owlexporter.OwlExporterOntolog
yPopulator
[javac] RDFProperty prop = (RDFP
roperty) propIt.next();
[javac] ^
[javac] C:\Program Files\GATE-5.2.1\plugins\OwlExporterV2\src\info\semantics
oftware\owlexporter\OwlExporterOntologyPopulator.java:157: cannot find symbol
[javac] symbol : class OWLDatatypeProperty
[javac] location: class info.semanticsoftware.owlexporter.OwlExporterOntolog
yPopulator
[javac] OWLDatatypeProperty idProp = null;
[javac] ^
[javac] C:\Program Files\GATE-5.2.1\plugins\OwlExporterV2\src\info\semantics
oftware\owlexporter\OwlExporterOntologyPopulator.java:190: cannot find symbol
[javac] symbol : class OWLNamedClass
[javac] location: class info.semanticsoftware.owlexporter.OwlExporterOntolog
yPopulator
[javac] OWLNamedClass owlClass = this.getOwlExporterOnto
logy().getOwlModel().
[javac] ^
[javac] C:\Program Files\GATE-5.2.1\plugins\OwlExporterV2\src\info\semantics
oftware\owlexporter\OwlExporterOntologyPopulator.java:194: cannot find symbol
[javac] symbol : class RDFSClass
[javac] location: class info.semanticsoftware.owlexporter.OwlExporterOntolog
yPopulator
[javac] idProp.addUnionDomainClass((RDFSClass)ow
lClass);
[javac] ^
[javac] C:\Program Files\GATE-5.2.1\plugins\OwlExporterV2\src\info\semantics
oftware\owlexporter\OwlExporterOntologyPopulator.java:212: cannot find symbol
[javac] symbol : class OWLIndividual
[javac] location: class info.semanticsoftware.owlexporter.OwlExporterOntolog
yPopulator
[javac] OWLIndividual individual = null;
[javac] ^
[javac] C:\Program Files\GATE-5.2.1\plugins\OwlExporterV2\src\info\semantics
oftware\owlexporter\OwlExporterOntologyPopulator.java:245: cannot find symbol
[javac] symbol : class OWLNamedClass
[javac] location: class info.semanticsoftware.owlexporter.OwlExporterOntolog
yPopulator
[javac] Collection owlSuperClasse
s = owlClass.getSuperclasses(false);
[javac] ^
[javac] C:\Program Files\GATE-5.2.1\plugins\OwlExporterV2\src\info\semantics
oftware\owlexporter\OwlExporterOntologyPopulator.java:246: cannot find symbol
[javac] symbol : class OWLDatatypeProperty
[javac] location: class info.semanticsoftware.owlexporter.OwlExporterOntolog
yPopulator
[javac] Collection owlClass
Prop;
[javac] ^
[javac] C:\Program Files\GATE-5.2.1\plugins\OwlExporterV2\src\info\semantics
oftware\owlexporter\OwlExporterOntologyPopulator.java:247: cannot find symbol
[javac] symbol : class OWLDatatypeProperty
[javac] location: class info.semanticsoftware.owlexporter.OwlExporterOntolog
yPopulator
[javac] Collection owlSuper
ClassProp;
[javac] ^
[javac] C:\Program Files\GATE-5.2.1\plugins\OwlExporterV2\src\info\semantics
oftware\owlexporter\OwlExporterOntologyPopulator.java:249: cannot find symbol
[javac] symbol : class OWLDatatypeProperty
[javac] location: class info.semanticsoftware.owlexporter.OwlExporterOntolog
yPopulator
[javac] owlClassProp = (Collection) owlClass.getUnionDomainProperties(false);
[javac] ^
[javac] C:\Program Files\GATE-5.2.1\plugins\OwlExporterV2\src\info\semantics
oftware\owlexporter\OwlExporterOntologyPopulator.java:251: cannot find symbol
[javac] symbol : class OWLNamedClass
[javac] location: class info.semanticsoftware.owlexporter.OwlExporterOntolog
yPopulator
[javac] Iterator owlSuperClass =
owlSuperClasses.iterator();
[javac] ^
[javac] C:\Program Files\GATE-5.2.1\plugins\OwlExporterV2\src\info\semantics
oftware\owlexporter\OwlExporterOntologyPopulator.java:255: cannot find symbol
[javac] symbol : class OWLClass
[javac] location: class info.semanticsoftware.owlexporter.OwlExporterOntolog
yPopulator
[javac] OWLClass namedClass = (OWLClass)
owlSuperClass.next();
[javac] ^
[javac] C:\Program Files\GATE-5.2.1\plugins\OwlExporterV2\src\info\semantics
oftware\owlexporter\OwlExporterOntologyPopulator.java:255: cannot find symbol
[javac] symbol : class OWLClass
[javac] location: class info.semanticsoftware.owlexporter.OwlExporterOntolog
yPopulator
[javac] OWLClass namedClass = (OWLClass)
owlSuperClass.next();
[javac] ^
[javac] C:\Program Files\GATE-5.2.1\plugins\OwlExporterV2\src\info\semantics
oftware\owlexporter\OwlExporterOntologyPopulator.java:257: cannot find symbol
[javac] symbol : class OWLDatatypeProperty
[javac] location: class info.semanticsoftware.owlexporter.OwlExporterOntolog
yPopulator
[javac] owlSuperClassProp = (Collection<
OWLDatatypeProperty>)
[javac]
^
[javac] C:\Program Files\GATE-5.2.1\plugins\OwlExporterV2\src\info\semantics
oftware\owlexporter\OwlExporterOntologyPopulator.java:263: cannot find symbol
[javac] symbol : class OWLDatatypeProperty
[javac] location: class info.semanticsoftware.owlexporter.OwlExporterOntolog
yPopulator
[javac] Iterator oIt = owlC
lassProp.iterator();
[javac] ^
[javac] C:\Program Files\GATE-5.2.1\plugins\OwlExporterV2\src\info\semantics
oftware\owlexporter\OwlExporterOntologyPopulator.java:267: cannot find symbol
[javac] symbol : class RDFProperty
[javac] location: class info.semanticsoftware.owlexporter.OwlExporterOntolog
yPopulator
[javac] RDFProperty k = (RDFProp
erty)oIt.next();
[javac] ^
[javac] C:\Program Files\GATE-5.2.1\plugins\OwlExporterV2\src\info\semantics
oftware\owlexporter\OwlExporterOntologyPopulator.java:267: cannot find symbol
[javac] symbol : class RDFProperty
[javac] location: class info.semanticsoftware.owlexporter.OwlExporterOntolog
yPopulator
[javac] RDFProperty k = (RDFProp
erty)oIt.next();
[javac] ^
[javac] C:\Program Files\GATE-5.2.1\plugins\OwlExporterV2\src\info\semantics
oftware\owlexporter\OwlExporterOntologyPopulator.java:297: cannot find symbol
[javac] symbol : class OWLObjectProperty
[javac] location: class info.semanticsoftware.owlexporter.OwlExporterOntolog
yPopulator
[javac] OWLObjectProperty relProperty;
[javac] ^
[javac] C:\Program Files\GATE-5.2.1\plugins\OwlExporterV2\src\info\semantics
oftware\owlexporter\OwlExporterOntologyPopulator.java:298: cannot find symbol
[javac] symbol : class RDFSClass
[javac] location: class info.semanticsoftware.owlexporter.OwlExporterOntolog
yPopulator
[javac] RDFSClass owlDomainClass = null, owlRangeClass = null;
[javac] ^
[javac] C:\Program Files\GATE-5.2.1\plugins\OwlExporterV2\src\info\semantics
oftware\owlexporter\OwlExporterOntologyPopulator.java:328: cannot find symbol
[javac] symbol : class RDFSClass
[javac] location: class info.semanticsoftware.owlexporter.OwlExporterOntolog
yPopulator
[javac] relDomainStr = ((RDFSClass)relDomainIt.n
ext()).getName();
[javac] ^
[javac] C:\Program Files\GATE-5.2.1\plugins\OwlExporterV2\src\info\semantics
oftware\owlexporter\OwlExporterOntologyPopulator.java:331: cannot find symbol
[javac] symbol : class RDFSClass
[javac] location: class info.semanticsoftware.owlexporter.OwlExporterOntolog
yPopulator
[javac] relRangeStr = ((RDFSClass)relRan
geIt.next()).getName();
[javac] ^
[javac] C:\Program Files\GATE-5.2.1\plugins\OwlExporterV2\src\info\semantics
oftware\owlexporter\OwlExporterOntologyPopulator.java:356: cannot find symbol
[javac] symbol : class OWLIndividual
[javac] location: class info.semanticsoftware.owlexporter.OwlExporterOntolog
yPopulator
[javac] OWLIndividual domainInd
= (OWLIndividual) domainIt.next();
[javac] ^
[javac] C:\Program Files\GATE-5.2.1\plugins\OwlExporterV2\src\info\semantics
oftware\owlexporter\OwlExporterOntologyPopulator.java:356: cannot find symbol
[javac] symbol : class OWLIndividual
[javac] location: class info.semanticsoftware.owlexporter.OwlExporterOntolog
yPopulator
[javac] OWLIndividual domainInd
= (OWLIndividual) domainIt.next();
[javac]
^
[javac] C:\Program Files\GATE-5.2.1\plugins\OwlExporterV2\src\info\semantics
oftware\owlexporter\OwlExporterOntologyPopulator.java:362: cannot find symbol
[javac] symbol : class OWLIndividual
[javac] location: class info.semanticsoftware.owlexporter.OwlExporterOntolog
yPopulator
[javac] OWLIndiv
idual rangeInd = (OWLIndividual)rangeIt.next();
[javac] ^
[javac] C:\Program Files\GATE-5.2.1\plugins\OwlExporterV2\src\info\semantics
oftware\owlexporter\OwlExporterOntologyPopulator.java:362: cannot find symbol
[javac] symbol : class OWLIndividual
[javac] location: class info.semanticsoftware.owlexporter.OwlExporterOntolog
yPopulator
[javac] OWLIndiv
idual rangeInd = (OWLIndividual)rangeIt.next();
[javac]
^
[javac] Note: C:\Program Files\GATE-5.2.1\plugins\OwlExporterV2\src\info\sem
anticsoftware\owlexporter\OwlExporterOntologyPopulator.java uses unchecked or un
safe operations.
[javac] Note: Recompile with -Xlint:unchecked for details.
[javac] 100 errors

BUILD FAILED
C:\Program Files\GATE-5.2.1\plugins\OwlExporterV2\build.xml:87: Compile failed;
see the compiler error output for details.

regards
gaurav

OwlExporter Compile Time Error

Hello Gaurav

Sorry for the delayed response. When trying to compile the OwlExporter, both PROTEGE_HOME and GATE_HOME need to be part of your system's classpath variables. The extensive documentation for the OwlExporter can be downloaded from the OwlExporter site @ http://www.semanticsoftware.info/owlexporter.
Please let me know if you have any more questions.

Ninus.

Similar (or same) trouble

Hi Ninus!
I have almost the same problem, and I also think it depends by the environment variables: ant says "package edu.stanford.smi.protegex.owl.model does not exist".
I should say that instructions are quite hard to understand for not-Ant-expert-user :)
I'll tell you what I did, and you'll tell me what's wrong: I'm working on a Windows XP environment, and downloaded both Protégé 3.4.4 and Protégé OWL source code from http://protege.stanford.edu/download/registered.html.
I downloaded the second because it contained the missing package, which wasn't contained in Protégé's installation directory (there just was e.s.s.p.owl).
I extracted "edu" directory and subdirectories from the source ZIP file to Protégé's plugins folder, even if I saw that the installations folder were called A.B.C.D.E instead of having B subdirectory of A etc (it should be the same for the packages).
I set the "GATE and Protégé lib folders" in "system CLASSPATH" as written in your instructions, setting a new CLASSPATH system variable containing "C:\Programmi\Gate\lib;C:\Programmi\Protege_3.4.4\plugins" (without quotes).
I created two more system variables as you say here, PROTEGE_HOME containing "C:\Programmi\Protege_3.4.4" and GATE_HOME with "C:\Programmi\Gate".
I also modified two strings in your installation files: in build.xml I put
(there was a simple ../.. that I wasn't sure could work)
and in build.properties I inserted gate.home=C:/Programmi/Gate in the place of that Linux-like folder (which was being searched during the installation).
Now I think I'm in Gaurav's same situation. What should I do?
Thanks in advance!
Massi

Hello Massi, It seems that we

Hello Massi,

It seems that we were always having problems with setting protege environment variables in windows machines. What I have done is modified the ant build for such environments. You will need to modify build.properties to point to the correct locations.

################################################################
#build.properties:
###############################################################

  1. # $Id: build.properties 7419 2006-04-25 18:51:58Z ian_roberts $
  2. #
  3. # build.properties for OwlExporterV2
  4. #
  5. # gate.home - the location of your top-level GATE directory
  6. gate.home=/usr/local/durmtools/GATE_SVN/gate
  7.  
  8. # protege.home - the location of your top-level Protege directory
  9. protege.home=/usr/local/durmtools/Protege
  10.  
  11. # The name of this plugin.
  12. plugin.name=OwlExporterV2

################################################################
#build.xml:
###############################################################

  1. <!--======================================================================
  2.  
  3.    Build file for OwlExporterV2
  4.  
  5.    This file will allow you to build your plugin with Ant.  If you do not
  6.    have an Ant installation of your own, you can use the one supplied with
  7.    GATE by running
  8.  
  9.      {gate.home}/bin/ant
  10.  
  11.    or, on Windows
  12.      
  13.      {gate.home}\bin\ant
  14.  
  15.    where {gate.home} is the directory in which GATE was installed.
  16.  
  17.    $Id: build.xml 8883 2007-07-06 12:13:11Z ian_roberts $
  18.  
  19. =======================================================================-->
  20. <project name="OwlExporterV2" basedir="." default="all">
  21.  
  22.   <property file="build.properties" />
  23.  
  24.   <!--=======================================================
  25.     Property settings.  You should not need to edit these
  26.     directly, if you need to set a different value for any
  27.     property you should edit build.properties and override
  28.     them there.
  29.   ========================================================-->
  30.  
  31.   <!-- location of the top-level GATE installation directory -->
  32.   <property name="gate.home" location="../.." />
  33.   <property name="protege.home" location="../.." />
  34.  
  35.   <!-- location of GATE lib directory - should be inferred from gate.home -->
  36.   <property name="gate.lib" location="${gate.home}/lib" />
  37.  
  38.   <!-- location of Protege lib directory - should be inferred from gate.home -->
  39.   <property name="protege.lib" location="${protege.home}/plugins" />
  40.  
  41.   <!-- location of gate.jar - should be inferred from gate.home -->
  42.   <property name="gate.jar" location="${gate.home}/bin/gate.jar" />
  43.  
  44.   <!-- location of protege.jar - should be inferred from protege.home -->
  45.   <property name="protege.jar" location="${protege.home}/protege.jar" />
  46.  
  47.   <!-- Source directory - contains the Java source files for this plugin -->
  48.   <property name="src.dir" location="src" />
  49.  
  50.   <!-- directory to contain the compiled classes -->
  51.   <property name="classes.dir" location="classes" />
  52.  
  53.   <!-- documentation directory -->
  54.   <property name="doc.dir" location="doc" />
  55.  
  56.   <!-- JavaDoc documentation directory -->
  57.   <property name="javadoc.dir" location="${doc.dir}/javadoc" />
  58.  
  59.   <!-- lib directory - put any additional JAR files your plugin requires into
  60.        this directory.  You will also need to add them as <JAR> entries in
  61.        creole.xml -->
  62.   <property name="lib.dir" location="lib" />
  63.  
  64.   <!-- location for the generated JAR file -->
  65.   <property name="jar.location" location="${plugin.name}.jar" />
  66.  
  67.  
  68.  
  69.   <!-- Classpath to compile - includes gate.jar, GATE/lib/*.jar and any local
  70.        library JAR files. -->
  71.   <path id="compile.classpath">
  72.     <pathelement location="${gate.jar}" />
  73.     <fileset dir="${gate.lib}">
  74.       <include name="**/*.jar" />
  75.      <include name="**/*.zip" />
  76.     </fileset>
  77.     <pathelement location="${protege.jar}" />
  78.     <fileset dir="${protege.lib}">
  79.       <include name="**/*.jar" />
  80.      <include name="**/*.zip" />
  81.     </fileset>
  82.     <fileset dir="${lib.dir}" includes="**/*.jar" />
  83.  </path>
  84.  
  85.  
  86.  <!--====================== Targets ============================-->
  87.  
  88.  <!-- create build directory structure -->
  89.  <target name="prepare">
  90.    <mkdir dir="${classes.dir}" />
  91.  </target>
  92.  
  93.  <!-- compile the source -->
  94.  <target name="compile" depends="prepare">
  95.    <javac classpathref="compile.classpath"
  96.           srcdir="${src.dir}"
  97.           destdir="${classes.dir}"
  98.           debug="true"
  99.           debuglevel="lines,source"
  100.           source="1.5" />
  101.  </target>
  102.  
  103.  <!-- copy resources (anything non-.java) from src to classes -->
  104.  <target name="copy.resources" depends="prepare">
  105.    <copy todir="${classes.dir}">
  106.      <fileset dir="${src.dir}" excludes="**/*.java" />
  107.     </copy>
  108.   </target>
  109.  
  110.   <!-- create the JAR file -->
  111.   <target name="jar" depends="compile, copy.resources" >
  112.     <jar destfile="${jar.location}"
  113.          update="false"
  114.          basedir="${classes.dir}" />
  115.   </target>
  116.  
  117.   <!-- remove the generated .class files -->
  118.   <target name="clean.classes" >
  119.     <delete dir="${classes.dir}" />
  120.   </target>
  121.  
  122.   <!-- Clean up - remove .class and .jar files -->
  123.   <target name="clean" depends="clean.classes" >
  124.     <delete file="${jar.location}" />
  125.   </target>
  126.  
  127.   <!-- Build JavaDoc documentation -->
  128.   <target name="doc.prepare">
  129.     <mkdir dir="${javadoc.dir}" />
  130.   </target>
  131.  
  132.   <target name="javadoc" depends="doc.prepare">
  133.     <javadoc destdir="${javadoc.dir}" packagenames="*"
  134.              classpathref="compile.classpath"
  135.              encoding="UTF-8"
  136.              windowtitle="${plugin.name} JavaDoc"
  137.              source="1.5">
  138.       <sourcepath>
  139.         <pathelement location="${src.dir}" />
  140.       </sourcepath>
  141.       <link href="http://java.sun.com/j2se/1.5.0/docs/api/" />
  142.       <link href="http://gate.ac.uk/gate/doc/javadoc/" />
  143.     </javadoc>
  144.   </target>
  145.  
  146.   <!-- Build everything - the code and JavaDoc -->
  147.   <target name="all" depends="jar, javadoc" />
  148.  
  149. </project>

You will not need to modify the relative path material "../.." because java compiler will automatically do this depending on the environment the ant task is running on.
Please let me know if this works, your next problem after building the jar file will be loading plugin into gate, I have a solution for that too, I just want to address one problem at a time.

Regards,

Ninus.

Classpath problem also when running OWLExporter

Good night Ninus!
I'm still here trying to execute OWLExporter... but when I launch the pipeline it still looks for a "not findable" class:

Exception in thread "ApplicationViewer1" java.lang.NoClassDefFoundError: edu/stanford/smi/protegex/owl/model/OWLModel
at info.semanticsoftware.owlexporter.OwlExporter.execute(OwlExporter.java:224)
...

He was right at first: I don't know why I couldn't find it in Protégé 3.4.4 sources nor in 3.4.4 installation. I re-extracted the sources from the downloaded zip and compiled them. I moved the edu/stanford/... directory (with class files) to the CLASSPATH-ed directory of Protégé plugins, but nothing new happened. Anymore magic available overseas? :)
I also tried with this hack http://forums.sun.com/thread.jspa?threadID=5434012 but it didn't work....

It's 4:56 a.m. here! :O

Class Def Not Found

Hello Massi,

After some minor modifications to the GATE ant build (AKA magic ;), I have another solution to your problem. Please replace build.properties in GATE_HOME with the following:

  1. <!-- SUPPLE SWI Executable -->
  2. # protege.home - the location of your top-level Protege directory
  3. protege.home=/usr/local/durmtools/Protege
  4.  
  5. run.supple.swi.executable=/usr/local/durmtools/swi_prolog/bin/swipl

and build.xml in GATE_HOME with the following:

  1. <?xml version="1.0"?>
  2. <!-- $Id: build.xml 12788 2010-06-30 14:02:56Z nirajaswani $ -->
  3. <project name="GATE" default="all" basedir=".">
  4. <property file="build.properties" />
  5.     <description>
  6.         GATE
  7.         see <a href="http://gate.ac.uk<br />
  8. " title="http://gate.ac.uk<br />
  9. ">http://gate.ac.uk<br />
  10. </a>    </description>
  11.   <!-- *******************************************************************
  12.        ****************  USER OPTIONS ************************************
  13.        *******************************************************************
  14.  
  15.        Make changes to this section of the build file to customise your
  16.        GATE start-up and build script -->
  17.  
  18.   <!-- Load user properties from build.properties.  If you need to override
  19.        any of the properties set in this build file, you should create
  20.        build.properties in the same directory.  Property definitions in
  21.        the properties file will override those in the build file.
  22.  
  23.        Also, if you need to pass specific system properties when you run
  24.        the GATE GUI, you should set them in build.properties, prefixed with
  25.        "run.", for example to override the default directory for GATE to
  26.        create temporary files (java.io.tmpdir), you should put the following
  27.        line in build.properties:
  28.  
  29.        run.java.io.tmpdir=${user.home}/tmp
  30.  
  31.        note that Ant properties are expanded in this file, this can be a
  32.        very powerful tool. -->
  33.     <property file="build.properties" />
  34.  
  35.   <!-- TOOLS.JAR -->
  36.   <!-- GATE will normally try to guess which tools.jar library to use based on
  37.        your Java installation.
  38.        If you want to set this manually, put a line such as the following in
  39.        your build.properties:
  40.  
  41.        tools.jar.location=w:/jdk/jdk1.5.0/lib/tools.jar
  42.   -->
  43.  
  44.   <!-- RUNTIME MEMORY -->
  45.   <property name="runtime.max.memory" value="1800m"/>
  46.   <property name="runtime.start.memory" value="800m"/>
  47.  
  48.   <!-- Should Ant exit as soon as it has started the GUI? -->
  49.   <property name="runtime.spawn" value="true" />
  50.  
  51.   <!-- if deprecation warnings should be shown -->
  52.   <property name="deprecation" value="false"/>
  53.   <property name="gate.compile.maxwarnings" value="10000" />
  54.  
  55.  
  56.   <!-- OS specific properties
  57.        To set a system property for GATE running on a specific platform, define
  58.        it here:
  59.  
  60.        <property name="os.Windows XP.prop.name" value="something" />
  61.  
  62.        will set the system property prop.name to the value "something" when
  63.        GATE is run on Windows XP.
  64.   -->
  65.   <!-- If you use a 3D accelerated X server, such as Xgl or Aiglx and
  66.        your windows are not resizing properly, then you need to uncomment
  67.        the following line -->
  68. <!--  <property name="os.Linux.awt.toolkit" value="sun.awt.motif.MToolkit"/>  -->
  69.  
  70.   <!-- *******************************************************************
  71.        ****************  USER OPTIONS END HERE! **************************
  72.        ******************************************************************* -->
  73.  
  74.   <!-- set global properties for this build -->
  75.  
  76.   <!-- Directories -->
  77.   <property name="gate.home" location="${basedir}" />
  78.  
  79.   <!-- Sources -->
  80.   <property name="srcDir" location="src"/>
  81.  
  82.   <!-- Files required by the build process -->
  83.   <property name="buildDir" location="build"/>
  84.  
  85.   <!-- Files required by the build process -->
  86.   <property name="binDir" location="bin"/>
  87.  
  88.   <!-- Output directory for the build process -->
  89.   <property name="outputDir"  location="classes"/>
  90.  
  91.   <!-- Libraries directory for the build process -->
  92.   <property name="libDir"  location="lib"/>
  93.  
  94.   <property name="lib.dir" location="lib" />
  95.  
  96.   <!-- Extensions directory for the build process -->
  97.   <property name="extDir"  location="lib/ext"/>
  98.  
  99.   <!-- Documentation directory -->
  100.   <property name="docDir"  location="doc"/>
  101.  
  102.   <!-- Protege Home -->
  103.   <property name="protege.home" location="../.." />
  104.  
  105.   <!-- location of protege.jar - should be inferred from protege.home -->
  106.   <property name="protege.lib" location="${protege.home}/plugins" />
  107.   <property name="protege.jar" location="${protege.home}/protege.jar" />
  108.  
  109.   <!-- load ant-contrib for the "if" task -->
  110.   <taskdef resource="net/sf/antcontrib/antlib.xml" >
  111.     <classpath>
  112.       <pathelement location="${libDir}/ant-contrib-1.0b2.jar"/>
  113.     </classpath>
  114.   </taskdef>
  115.  
  116.   <!-- Read version and build numbers -->
  117.   <loadfile property="gate.version" srcFile="${buildDir}/version.txt"/>
  118.   <loadfile property="gate.build" srcFile="${buildDir}/build.txt"/>
  119.  
  120.   <!-- Use the new 1.3+ compiler -->
  121.   <property name="build.compiler"  value="modern"/>
  122.  
  123.         <!-- The libraries -->
  124.   <fileset id="libs" dir="${libDir}">
  125.     <include name="*.jar"/>
  126.     <include name="*.zip"/>
  127.   </fileset>
  128.  
  129.         <!-- The extensions -->
  130.   <fileset id="exts" dir="${extDir}">
  131.     <include name="*.jar"/>
  132.   </fileset>
  133.  
  134.  
  135.   <!-- tools.jar path -->
  136.  
  137.   <!-- GATE will attempt to guess where the Sun Javac classes live -->
  138.   <!-- First try the two variants of $JAVA_HOME/lib/tools.jar -->
  139.   <condition property="tools.jar.location"
  140.             value="${java.home}/../lib/tools.jar">
  141.     <and>
  142.       <not>
  143.         <isset property="tools.jar.location"/>
  144.       </not>
  145.       <available file="${java.home}/../lib/tools.jar"
  146.                  type="file"/>
  147.     </and>
  148.   </condition>
  149.   <condition property="tools.jar.location"
  150.             value="${java.home}/lib/tools.jar">
  151.     <and>
  152.       <not>
  153.         <isset property="tools.jar.location"/>
  154.       </not>
  155.       <available file="${java.home}/lib/tools.jar"
  156.                  type="file"/>
  157.     </and>
  158.   </condition>
  159.  
  160.   <!-- Maybe this is a Mac?  The following should work for a typical Mac OS X
  161.        java.home like:
  162.           /System/Library/Frameworks/JavaVM.framework[/Versions/x.y.z]/Home
  163.   -->
  164.   <condition property="tools.jar.location"
  165.              value="${java.home}/../Classes/classes.jar">
  166.     <and>
  167.       <not>
  168.         <isset property="tools.jar.location"/>
  169.       </not>
  170.       <available file="${java.home}/../Classes/classes.jar"
  171.                  type="file"/>
  172.     </and>
  173.   </condition>
  174.  
  175.   <!-- Save tools.jar as a <path>.  If no tools.jar was found, make an empty
  176.        path -->
  177.   <if>
  178.     <isset property="tools.jar.location"/>
  179.     <then>
  180.       <path id="tools.jar.path" location="${tools.jar.location}"/>
  181.       <property name="tools.jar.path.property" refid="tools.jar.path" />
  182.       <property name="toolsjar.debug"
  183.                 value="Using tools.jar at ${tools.jar.path.property}" />
  184.     </then>
  185.     <else>
  186.       <path id="tools.jar.path" />
  187.       <property name="toolsjar.debug"
  188.                 value="No tools.jar found - Sun compiler not available" />
  189.       <!-- no tools.jar means we're running on a JRE rather than a JDK.
  190.           On Windows, this means that only the client VM is available -->
  191.      <if>
  192.        <os family="windows" />
  193.        <then>
  194.          <property name="server.or.client" value="-client" />
  195.        </then>
  196.      </if>
  197.    </else>
  198.  </if>
  199.  
  200.  <!-- Default to the server VM (slower startup but faster running) unless
  201.       overridden above -->
  202.  <property name="server.or.client" value="-server" />
  203.  
  204.  <!-- The build CLASSPATH -->
  205.  <path id="build.class.path">
  206.                 <fileset refid="libs"/>
  207.    <fileset refid="exts"/>
  208.   <pathelement location="${protege.jar}" />
  209.    <fileset dir="${protege.lib}">
  210.      <include name="**/*.jar" />
  211.      <include name="**/*.zip" />
  212.    </fileset>
  213.    <fileset dir="${lib.dir}" includes="**/*.jar" />
  214.  </path>
  215.  
  216.  <!-- The run CLASSPATH -->
  217.  <path id="run.class.path">
  218.    <pathelement path="${java.class.path}"/>
  219.    <pathelement location="${binDir}" />
  220.    <pathelement location="${binDir}/gate.jar"/>
  221.    <pathelement path="${java.class.path}"/>
  222.    <path refid="tools.jar.path"/>
  223.                 <fileset refid="libs"/>
  224.  
  225.    <pathelement location="${protege.jar}" />
  226.    <fileset dir="${protege.lib}">
  227.      <include name="**/*.jar" />
  228.      <include name="**/*.zip" />
  229.    </fileset>
  230.    <fileset dir="${lib.dir}" includes="**/*.jar" />
  231.  </path>
  232.  
  233.  <!-- The test CLASSPATH -->
  234.  <path id="test.class.path">
  235.    <pathelement location="${binDir}" />
  236.    <pathelement location="${outputDir}"/>
  237.    <path refid="tools.jar.path"/>
  238.    <fileset refid="libs"/>
  239.  </path>
  240.  
  241.         <tstamp>
  242.    <format property="TODAY_UK" pattern="d-MMMM-yyyy" locale="en"/>
  243.    <format property="TSTAMP_UK" pattern="hh:mm" locale="en"/>
  244.  </tstamp>
  245.  
  246.  
  247.  <!-- Prints out some information messages -->
  248.  <echo level="info">
  249.    This is the ANT build script for GATE (<a href="http://gate.ac.uk" title="http://gate.ac.uk">http://gate.ac.uk</a>).
  250.    Type &quot;ant help&quot; for details about the targets available.
  251.    GATE ${gate.version}, build ${gate.build}
  252.    Java version ${java.version}</echo>
  253.  
  254.  <!-- Prints out details about the targets -->
  255.  <target name="help">
  256.    <echo level="info">
  257.      This is the ANT build script for gate (<a href="http://gate.ac.uk" title="http://gate.ac.uk">http://gate.ac.uk</a>).
  258.      The following targets are available
  259.        -all (default target): compiles GUK and GATE classes and makes the gate.jar archive.
  260.  
  261.        -compile: compiles all the .java files
  262.        -resources: copies the resources to the output directory (${outputDir})
  263.        -jar: creates the gate.jar archive
  264.        -run: starts GATE
  265.        -clean: cleans up the output from all previous builds
  266.  
  267.        -doc: creates the Javadoc and Java2HTML documentation
  268.        -docclean: deletes all built documentation
  269.        -jape: rebuilds the JAPE parser files and associated documentation
  270.        -guk: compiles the GUK classes and builds the guk.jar archive
  271.        -gukdemo: starts the GUK Editor (a.k.a. GATE Unicode Editor)
  272.        -test: runs the GATE test suite
  273.  
  274.        -distro: make a GATE distribution (calls all build tasks in the process)
  275.    </echo>
  276.  </target>
  277.  
  278.  <target name="check.info.plist">
  279.    <!-- we need to rebuild Info.plist if (a) this is a release build or (b)
  280.    the current Info.plist is older than version.txt or build.txt. -->
  281.    <condition property="info.plist.build.required">
  282.      <or>
  283.        <isset property="release.build" />
  284.        <and>
  285.          <!-- Check that GATE.app exists (it won't if this is a copy of GATE
  286.           installed from the installer on Windows) -->
  287.           <available file="GATE.app/Contents" />
  288.           <not>
  289.             <uptodate targetfile="GATE.app/Contents/Info.plist">
  290.               <srcfiles dir="${buildDir}" includes="version.txt, build.txt" />
  291.             </uptodate>
  292.           </not>
  293.         </and>
  294.       </or>
  295.     </condition>
  296.   </target>
  297.  
  298.   <!-- Generate the Mac launcher Info.plist file from the template, filling in
  299.   the correct version string. -->
  300.   <target name="build.info.plist" if="info.plist.build.required">
  301.     <!-- include the build number in the Info.plist version string unless
  302.          it's a release build -->
  303.    <condition property="info.plist.version"
  304.               value="${gate.version}"
  305.               else="${gate.version} (build ${gate.build})">
  306.      <isset property="release.build" />
  307.    </condition>
  308.    <copy file="${buildDir}/Info.plist.template"
  309.          tofile="GATE.app/Contents/Info.plist"
  310.          overwrite="yes" encoding="UTF-8">
  311.      <filterset>
  312.        <filter token="version" value="${info.plist.version}" />
  313.      </filterset>
  314.    </copy>
  315.    <!-- Touch GATE.app so Finder notices the .plist change -->
  316.    <touch>
  317.      <dirset dir="${basedir}" includes="GATE.app" />
  318.    </touch>
  319.  </target>
  320.  
  321.  <target name="prepare" depends="check.info.plist, build.info.plist">
  322.    <mkdir dir="${outputDir}"/>
  323.  </target>
  324.  
  325.  <!-- Copies resources to the output directory -->
  326.  <target name="resources">
  327.    <copy todir="${outputDir}/gate/resources"
  328.          includeEmptyDirs="true" >
  329.      <fileset dir="${srcDir}/gate/resources"
  330.               excludes="**/CVS,**/CVS/**,**/.cvsignore" />
  331.    </copy>
  332.    <copy file="${buildDir}/build.txt" todir="${outputDir}/gate/resources"/>
  333.    <copy file="${buildDir}/version.txt" todir="${outputDir}/gate/resources"/>
  334.    <copy todir="${outputDir}/gate/util"
  335.          includeEmptyDirs="true">
  336.      <fileset dir="${srcDir}/gate/util"
  337.               includes="*.tcl"/>
  338.    </copy>
  339.    <!-- This is for the Spring support -->
  340.    <copy todir="${outputDir}/META-INF" includeEmptyDirs="true">
  341.      <fileset dir="${srcDir}/META-INF" />
  342.    </copy>
  343.    <copy todir="${outputDir}/gate/util/spring/xml"
  344.          includeEmptyDirs="true">
  345.      <fileset dir="${srcDir}/gate/util/spring/xml"
  346.               includes="*.xsd" />
  347.    </copy>
  348.    <!-- This is for the Ant tasks -->
  349.    <copy todir="${outputDir}/gate/util/ant" includeEmptyDirs="true">
  350.      <fileset dir="${srcDir}/gate/util/ant" includes="antlib.xml" />
  351.    </copy>
  352.  </target>
  353.  
  354.  
  355.  <!-- This target compiles the GUK classes which are required by the main
  356.       GATE compile task -->
  357.  <target name="guk" depends="prepare, depend">
  358.    <javac classpathref="build.class.path"
  359.           destdir="${outputDir}"
  360.           includes="guk/**"
  361.           encoding="UTF-8"
  362.           debug="true"
  363.           debuglevel="lines,source"
  364.           source="1.5"
  365.           target="1.5"
  366.           srcdir="${srcDir}"/>
  367.                 <jar destfile="${libDir}/ext/guk.jar"
  368.         update="false"
  369.         index="true">
  370.      <fileset dir="${outputDir}"
  371.               includes="guk/**"/>
  372.      <fileset dir="${srcDir}/guk/resources"
  373.               excludes="**/CVS,**/CVS/**,**/.cvsignore"/>
  374.    </jar>
  375.  </target>
  376.  
  377.  <!-- Calculates dependencies for the source code -->
  378.  <target name="depend">
  379.    <depend srcdir="${srcDir}"
  380.            destdir="${outputDir}"
  381.            cache="${buildDir}/depcache"
  382.            closure="yes"/>
  383.  </target>
  384.  
  385.         <!-- This target compiles all the classes -->
  386.  <target name="compile"
  387.          depends="prepare, depend, guk"
  388.          description="compile the source " >
  389.    <!-- Compile the java code from ${srcDir} into ${buildDir} -->
  390.    <javac srcdir="${srcDir}"
  391.                        destdir="${outputDir}"
  392.           source="1.5"
  393.           target="1.5"
  394.           encoding="UTF-8"
  395.           debug="true"
  396.            deprecation="${deprecation}"
  397.           debuglevel="lines,source"
  398.           includes="gate/**,com/**,hepple/**"
  399.           classpathref="build.class.path">
  400.      <compilerarg value="-Xmaxwarns"/>
  401.      <compilerarg value="${gate.compile.maxwarnings}"/>
  402.    </javac>
  403.  </target>
  404.  
  405.         <!-- This target compiles all the classes including debug information -->
  406.  <target name="compile_debug"
  407.          depends="prepare, depend, guk"
  408.          description="compile the source " >
  409.    <!-- Compile the java code from ${srcDir} into ${buildDir} -->
  410.    <javac srcdir="${srcDir}"
  411.           destdir="${outputDir}"
  412.           encoding="UTF-8"
  413.           source="1.5"
  414.           target="1.5"
  415.           debug="true"
  416.           deprecation="${deprecation}"
  417.           includes="gate/**,com/**,hepple/**"
  418.           classpathref="build.class.path"/>
  419.  </target>
  420.  
  421.  
  422.  <!-- Make gate.jar archive -->
  423.  <target name="jar" depends="compile,resources">
  424.    <jar destfile="${binDir}/gate.jar"
  425.         update="false"
  426.         index="true">
  427.      <fileset dir="${outputDir}/"
  428.               includes="META-INF/**,gate/**,com/**,hepple/**"/>
  429. <!--    <zipgroupfileset refid="libs"/> -->
  430.    </jar>
  431.  </target>
  432.  
  433.    <!-- Optional target useful for creating jars for embedded apps.  It splits
  434.    the contents that would go into gate.jar into subjars for easier updating,
  435.    omitting classes and test files not required for normal execution. -->
  436.    <target name="split_jars" depends="compile,resources">
  437.      <jar destfile="${binDir}/gate-core.jar"
  438.           update="false"
  439.           index="true">
  440.        <fileset dir="${outputDir}/">
  441.            <include name="**/*.class"/>
  442.            <include name="gate/resources/creole/creole.xml"/>
  443.            <include name="gate/resources/build.txt"/>
  444.            <include name="gate/resources/version.txt"/>
  445.            <include name="gate/util/ant/antlib.xml" />
  446.            <exclude name="**/*Test*.class"/>
  447.            <exclude name="gate/creole/annic/**"/>
  448.            <exclude name="gate/**/gui/**"/>
  449.            <exclude name="gate/swing/**"/>
  450.        </fileset>
  451.      </jar>
  452.      <jar destfile="${binDir}/gate-gui.jar"
  453.           update="false"
  454.           index="true">
  455.        <fileset dir="${outputDir}/">
  456.          <include name="gate/**/gui/**/*.class"/>
  457.          <include name="gate/swing/**/*.class"/>
  458.          <exclude name="**/*Test*.class"/>
  459.        </fileset>
  460.      </jar>
  461.      <jar destfile="${binDir}/gate-annic.jar"
  462.           update="false"
  463.           index="true">
  464.        <fileset dir="${outputDir}/">
  465.          <include name="gate/creole/annic/**/*.class"/>
  466.          <exclude name="**/*Test*.class"/>
  467.        </fileset>
  468.      </jar>
  469.      <jar destfile="${binDir}/gate-resources.jar"
  470.           update="false"
  471.           index="true">
  472.        <fileset dir="${outputDir}/">
  473.          <include name="**/img/**"/>
  474.          <include name="**/icons/**"/>
  475.          <include name="gate/resources/splash.html"/>
  476.          <include name="gate/resources/**/bootstrap/**"/>
  477.          <exclude name="**/img/splash_large.png"/>
  478.        </fileset>
  479.      </jar>
  480.      <!-- I don't think any of these files are needed for running the UI.
  481.       Uncomment if this turns out to be incorrect-->
  482.       <!--
  483.       <jar destfile="${binDir}/gate-resources-ext.jar"
  484.            update="false"
  485.            index="true">
  486.         <fileset dir="${outputDir}/"
  487.                  includes="META-INF/**,gate/**,com/**,hepple/**">
  488.           <exclude name="**/test/**"/>
  489.           <exclude name="**/*.class"/>
  490.           <exclude name="**/img/**"/>
  491.         </fileset>
  492.       </jar>
  493.       -->
  494.     </target>
  495.  
  496.   <!-- Make gate.jar archive -->
  497.   <target name="bigjar" depends="compile,resources">
  498.     <jar destfile="${binDir}/gate.jar"
  499.          update="false"
  500.          index="true">
  501.       <fileset dir="${outputDir}/"
  502.                includes="gate/**,com/**,hepple/**"/>
  503.       <zipgroupfileset refid="libs"/>
  504.     </jar>
  505.   </target>
  506.  
  507.  
  508.   <!-- Plugins -->
  509.   <!-- Learning plugin needs to be before Lang_Chinese -->
  510.   <filelist id="plugins.to.build" dir="plugins"
  511.     files="
  512.      Alignment Annotation_Merging Copy_Annots_Between_Docs Gazetteer_LKB
  513.      Gazetteer_Ontology_Based Groovy Inter_Annotator_Agreement Jape_Compiler
  514.      Keyphrase_Extraction_Algorithm Lang_Arabic Lang_Cebuano Learning
  515.      Lang_Chinese Lang_Hindi Lang_Romanian Language_Identification LingPipe
  516.      Machine_Learning Ontology Ontology_BDM_Computation Ontology_OWLIM2
  517.      Ontology_Tools OpenNLP Parser_Minipar Parser_RASP Parser_Stanford
  518.      Stemmer_Snowball Tagger_Abner Tagger_Chemistry Tagger_Framework
  519.      Tagger_MetaMap Tagger_NP_Chunking Tagger_OpenCalais Tagger_TreeTagger
  520.      Tools UIMA Web_Crawler_Websphinx Web_Search_Google Web_Search_Yahoo
  521.      Web_Translate_Google WordNet
  522.    " />
  523.   <target name="plugins.build" depends="jar" >
  524.     <for param="plugin">
  525.       <path>
  526.         <filelist refid="plugins.to.build" />
  527.       </path>
  528.       <sequential>
  529.         <echo>Building plugin @{plugin}</echo>
  530.         <ant dir="@{plugin}" inheritAll="false" target="build" />
  531.       </sequential>
  532.     </for>
  533.   </target>
  534.  
  535.   <target name="plugins.javadoc" depends="jar" >
  536.     <for param="plugin">
  537.       <path>
  538.         <filelist refid="plugins.to.build" />
  539.       </path>
  540.       <sequential>
  541.         <echo>Running javadoc for plugin @{plugin}</echo>
  542.         <ant dir="@{plugin}" inheritAll="false" target="javadoc" />
  543.       </sequential>
  544.     </for>
  545.   </target>
  546.  
  547.   <target name="plugins.test" depends="jar" >
  548.     <for param="plugin">
  549.       <path>
  550.         <filelist refid="plugins.to.build" />
  551.       </path>
  552.       <sequential>
  553.         <echo>Running tests for plugin @{plugin}</echo>
  554.         <ant dir="@{plugin}" inheritAll="false" target="test" />
  555.       </sequential>
  556.     </for>
  557.   </target>
  558.   <target name="plugins.distro.prepare">
  559.     <for param="plugin">
  560.       <path>
  561.         <filelist refid="plugins.to.build" />
  562.       </path>
  563.       <sequential>
  564.         <echo>Preparing plugin @{plugin} for distribution</echo>
  565.         <ant dir="@{plugin}" inheritAll="false" target="distro.prepare" />
  566.       </sequential>
  567.     </for>
  568.   </target>
  569.  
  570.   <target name="plugins.clean">
  571.     <for param="plugin">
  572.       <path>
  573.         <filelist refid="plugins.to.build" />
  574.       </path>
  575.       <sequential>
  576.         <echo>Cleaning plugin @{plugin}</echo>
  577.         <ant dir="@{plugin}" inheritAll="false" target="clean" />
  578.       </sequential>
  579.     </for>
  580.   </target>
  581.  
  582.   <!-- Everything! -->
  583.         <target name="all" depends="jar, plugins.build">
  584.         </target>
  585.  
  586.   <!-- Run the beast -->
  587.   <target name="run" depends="run-pre,run-nonmac,run-mac" >
  588.   </target>
  589.  
  590.   <!-- Prepares for running GATE -->
  591.   <target name="run-pre">
  592.     <property name="class.path.debug" refid="run.class.path"/>
  593.     <echo>
  594.       Starting GATE ${gate.version}, build ${gate.build}
  595.       Using JVM at ${java.home}
  596.       Initial memory ${runtime.start.memory}
  597.       Maximum memory ${runtime.max.memory}
  598.       ${toolsjar.debug}
  599.       CLASSPATH=${class.path.debug}
  600.     </echo>
  601.     <!-- Prepare any user-specified "run." properties -->
  602.     <propertyset id="run.properties">
  603.       <propertyref prefix="run." />
  604.       <mapper type="glob" from="run.*" to="*" />
  605.     </propertyset>
  606.     <!-- gather os-specific properties together -->
  607.     <propertyset id="os.properties">
  608.       <propertyref prefix="os.${os.name}." />
  609.       <mapper type="glob" from="os.${os.name}.*" to="*" />
  610.     </propertyset>
  611.     <!-- Prepend extDir to the java.ext.dirs path -->
  612.     <pathconvert property="ext.dirs">
  613.       <path>
  614.         <pathelement location="${extDir}" />
  615.         <path path="${java.ext.dirs}" />
  616.       </path>
  617.     </pathconvert>
  618.     <!-- Find if the platform is MAC -->
  619.     <condition property="running.on.mac">
  620.       <os family="mac"/>
  621.     </condition>
  622.   </target>
  623.  
  624.   <!-- Starts GATE on non MAC platforms -->
  625.   <target name="run-nonmac" unless="running.on.mac">
  626.     <java classname="gate.Main"
  627.           classpathref="run.class.path"
  628.           fork="true"
  629.           spawn="${runtime.spawn}"
  630.           dir="."
  631.           maxmemory="${runtime.max.memory}">
  632. <!--         <jvmarg value="-Xms${runtime.start.memory}"/> -->
  633.       <jvmarg value="${server.or.client}"/>
  634.         <sysproperty key="gate.home" value="${basedir}"/>
  635.        <sysproperty key="java.ext.dirs" value="${ext.dirs}"/>
  636.  <!--<sysproperty key="awt.toolkit" value="sun.awt.motif.MToolkit"/>-->
  637.  <!-- <sysproperty key="sun.java2d.opengl" value="true"/>-->
  638.        <syspropertyset refid="run.properties" />
  639.        <syspropertyset refid="os.properties" />
  640.      

Running GATE with ${runtime.arch}

  1. <!--         <jvmarg value="-Xms${runtime.start.memory}"/> -->
  2.        <sysproperty key="gate.home" value="${basedir}"/>
  3.        <sysproperty key="java.ext.dirs" value="${ext.dirs}"/>
  4.        <sysproperty key="sun.java2d.opengl" value="true"/>
  5.        <sysproperty key="apple.laf.useScreenMenuBar" value="true"/>
  6.        <sysproperty key="apple.awt.antialiasing" value="true"/>
  7.        <sysproperty key="com.apple.mrj.application.growbox.intrudes" value="false"/>
  8.        <sysproperty key="com.apple.mrj.application.live-resize" value="true"/>
  9.        <!-- use "line" rather than "value" as runtime.arch may be empty -->
  10.        <jvmarg line="${runtime.arch}" />
  11.        <jvmarg value="-Xdock:name=GATE ${gate.version}"/>
  12.        <jvmarg value="-Xdock:icon=${gate.icon.location}"/>
  13.        <syspropertyset refid="run.properties" />
  14.        <syspropertyset refid="os.properties" />
  15.      

  1.       <sysproperty key="java.ext.dirs" value="${extDir}"/>
  2.      

  1.       <classpath>
  2.         <pathelement location="${libDir}/javacc.jar"/>
  3.       </classpath>
  4.       <arg value="ParseCpsl.jj"/>
  5.    

  1.       <classpath>
  2.         <pathelement location="${libDir}/javacc.jar"/>
  3.       </classpath>
  4.       <arg value="ParseCpsl.jj"/>
  5.    

  1.       <classpath>
  2.         <pathelement location="${libDir}/javacc.jar"/>
  3.       </classpath>
  4.       <arg value="-ONE_TABLE=false"/>
  5.       <arg value="ParseCpsl.jj"/>
  6.    

  1.        <sysproperty key="gate.home" value="${basedir}"/>
  2.        <sysproperty key="gate.config" value="${buildDir}/gate.xml"/>
  3.        <sysproperty key="load.plugin.path" value="file:${basedir}/plugins/ANNIE;file:${basedir}/plugins/Information_Retrieval;file:${basedir}/plugins/Machine_Learning;file:${basedir}/plugins/Obsolete;file:${basedir}/plugins/Ontology_Tools;file:${basedir}/plugins/Tools;file:${basedir}/plugins/WordNet"/>
  4.        <sysproperty key="java.ext.dirs" value="${extDir}"/>
  5.        <syspropertyset refid="run.properties" />
  6.       <arg value="gate.TestGate"/>
  7.      

After making the two modifications:

* ant clean
* ant compile
* ant run

And the OwlExporter will work like a dream!

Cheers,

Ninus.

Temporary not-ideal-solution

I temporary solved by zipping the necessary classpaths in OWLExporter jar: it "just" gives ontology problems now, but I still need to try better

Question Regarding OwlExporter

Hello Ninus,

Since that "The specified file must be a directory." error message, I
thought that it could require just the directory for the ontology
output, instead of the filename (the new ontology is created from
scratch, you said), thus I tried with
file:/C:/blahblahblah/OntologieOutPut/, but it said

OWLExporter Message: OWLExporter V2.0 Started.............
exportFilePathStr:
/C:/Documents%20and%20Settings/Massi/Desktop/Vari%20per%20GATE/OntologieOutPut/
Running Multi OWL File Export Mode.

WARNING: [Local Folder Repository] The specified file must be a
directory. (C:\Programmi\Gate\plugins\edu.stanford.smi.protegex.owl) --
LocalFolderRepository.update()
SEVERE: Error at loading file
file:/C:/Documents%20and%20Settings/Massi/Desktop/Vari%20per%20GATE/OntologieOutPut/.owl

-- Could not get input stream for
file:/C:/Documents%20and%20Settings/Massi/Desktop/Vari%20per%20GATE/OntologieOutPut/.owl

The same without the last "/". "Input stream" for an output file?

I then tried to give it already available copies of my ontology in the
same folder, and giving it
file:/C:/blahblahblah/OntologieOutPut/SoftwareEngineering (without the
".owl")

and we went back to the previuos error message: OWLExporter Message:
OWLExporter V2.0 Started.............
exportFilePathStr:
/C:/Documents%20and%20Settings/Massi/Desktop/Vari%20per%20GATE/OntologieOutPut/SoftwareEngineering

Running Multi OWL File Export Mode.
WARNING: [Local Folder Repository] The specified file must be a
directory. (C:\Programmi\Gate\plugins\edu.stanford.smi.protegex.owl) --
LocalFolderRepository.update()
WARNING: Could not get ontology from URL: http://localhost/NLP.owl --
HTTPRepository.update()

What's the "specified file" which "must be a directory"? Why doesn't
it
find my localhost ontology?

I also tried to put file:// and file:/// instead of file:/, but with
three slashes it gives the same problem, with two another one, prabably
due to bad syntax. Without the file:/ it doesn't work.

I really think it's a stupid runtime parameters how-to problem :)

Looking forward to chatting with you on Skype (text chat, I'd prefer,
due to my PC power and my not very good English understanding), I just
added both Ninus and Nick available on nkhamis@cogeco.ca!
Massi

Hello Massi, We deployed a

Hello Massi,

We deployed a new version of the OwlExporter that solves the build and run-time errors experienced by Windows users. Please:
- Remove the old OwlExporter from your GATE environment
- Download, buld and include the new OwlExporter to your GATE environment.

@ For input and output runtime parameters:
The runtime parameters need to be set to the actual owl files. In the case of the output owl file, it could be an already existing owl file that is populated using information from a different corpus, or a non existing one. If the output owl file is already populated, the owlexporter will check if it is processing the same document and will throw an error if it has already processed the document.
As input: C:/blahblahblah/OntologieOutPut/SoftwareEngineering.owl
As output: C:/blahblahblah/OntologieOutPut/SoftwareEngineeringOut.owl

The same goes for the NLP ontology.

Successful!

Hi Ninus, thanks for your answer!
And thanks God you know how to create an Ant build.xml (I really don't have time for it) :)
BUILD SUCCESSFUL! ;)
I was trying to use the version Gaurav managed to build, and now I did it with your new solution... I'd update the documentation if I was in you ;)
Another curiosity: in the package U release we can find a folder which ISN'T called OWLExporterV2 (but it's owlexporter-2.1). If I extracted it without renaming it to the "right name", would it have worked?

I think I won't have problems to make it work (I already did with Gaurav's build), but I will begin trying "annotating for it" in a few hours... so I'd have a question about the documentations... which will appear on these pages in half an hour (it's dinnertime) :)

You are very welcome Massi,

You are very welcome Massi, if you have anymore questions please don't hesitate.

I don't own any microsoft products, but I will need to borrow someone's computer at some point to figure out why it does not work with the system's environment variables. This was just a quick fix that may remain as the norm....

You could rename the folder, GATE should not complain either way.

As for the exporting of entities and relationships of type domain or nlp, I would follow the demo in the documentation at first to get acquainted with the product.

Cheers,

Ninus.

I'm also trying to make the

I'm also trying to make the Big Jump, I also have OpenSUSE installed, but I began my GATE job on Windows, and moving it to Linux would be quite hard :) (Pity for RASP: I could try it too, with MultiPaX)

How about using VirtualBox with a fabulous Windows virtual machine? Ah, right, Microsoft license says it can't be installed on virtual machines, and anyone obeys Microsoft's EULAs :D

About the folder, I mean if it could have implied some problems while compiling...

About the OWLExp usage problems, I'll start a new thread here soon!
Thanks again!
Massi

I wasn't logged in...

...it was me!